LibDriver ADXL345  2.0.0
ADXL345 full-featured driver
driver_adxl345_interrupt.h File Reference

driver adxl345 interrupt header file More...

Go to the source code of this file.

Macros

#define ADXL345_INTERRUPT_DEFAULT_RATE   ADXL345_RATE_12P5
 adxl345 interrupt example default definition More...
 
#define ADXL345_INTERRUPT_DEFAULT_SPI_WIRE   ADXL345_SPI_WIRE_4
 
#define ADXL345_INTERRUPT_DEFAULT_INTERRUPT_ACTIVE_LEVEL   ADXL345_INTERRUPT_ACTIVE_LEVEL_LOW
 
#define ADXL345_INTERRUPT_DEFAULT_FULL_RESOLUTION   ADXL345_BOOL_TRUE
 
#define ADXL345_INTERRUPT_DEFAULT_AUTO_SLEEP   ADXL345_BOOL_FALSE
 
#define ADXL345_INTERRUPT_DEFAULT_SLEEP   ADXL345_BOOL_FALSE
 
#define ADXL345_INTERRUPT_DEFAULT_SLEEP_FREQUENCY   ADXL345_SLEEP_FREQUENCY_1HZ
 
#define ADXL345_INTERRUPT_DEFAULT_JUSTIFY   ADXL345_JUSTIFY_RIGHT
 
#define ADXL345_INTERRUPT_DEFAULT_RANGE   ADXL345_RANGE_2G
 
#define ADXL345_INTERRUPT_DEFAULT_MODE   ADXL345_MODE_BYPASS
 
#define ADXL345_INTERRUPT_DEFAULT_TRIGGER_PIN   ADXL345_INTERRUPT_PIN2
 
#define ADXL345_INTERRUPT_DEFAULT_TAP_SUPPRESS   ADXL345_BOOL_FALSE
 
#define ADXL345_INTERRUPT_DEFAULT_INTERRUPT_SINGLE_TAP_MAP   ADXL345_INTERRUPT_PIN1
 
#define ADXL345_INTERRUPT_DEFAULT_INTERRUPT_DOUBLE_TAP_MAP   ADXL345_INTERRUPT_PIN1
 
#define ADXL345_INTERRUPT_DEFAULT_INTERRUPT_ACTIVITY_MAP   ADXL345_INTERRUPT_PIN1
 
#define ADXL345_INTERRUPT_DEFAULT_INTERRUPT_INACTIVITY_MAP   ADXL345_INTERRUPT_PIN1
 
#define ADXL345_INTERRUPT_DEFAULT_INTERRUPT_FREE_FALL_MAP   ADXL345_INTERRUPT_PIN1
 
#define ADXL345_INTERRUPT_DEFAULT_INTERRUPT_DATA_READY_MAP   ADXL345_INTERRUPT_PIN1
 
#define ADXL345_INTERRUPT_DEFAULT_INTERRUPT_WATERMARK_MAP   ADXL345_INTERRUPT_PIN1
 
#define ADXL345_INTERRUPT_DEFAULT_INTERRUPT_OVERRUN_MAP   ADXL345_INTERRUPT_PIN1
 
#define ADXL345_INTERRUPT_DEFAULT_LINK_ACTIVITY_INACTIVITY   ADXL345_BOOL_TRUE
 
#define ADXL345_INTERRUPT_DEFAULT_INTERRUPT_DATA_READY   ADXL345_BOOL_FALSE
 
#define ADXL345_INTERRUPT_DEFAULT_INTERRUPT_WATERMARK   ADXL345_BOOL_FALSE
 
#define ADXL345_INTERRUPT_DEFAULT_INTERRUPT_OVERRUN   ADXL345_BOOL_FALSE
 
#define ADXL345_INTERRUPT_DEFAULT_ACTION_COUPLED   ADXL345_COUPLED_AC
 
#define ADXL345_INTERRUPT_DEFAULT_INACTION_COUPLED   ADXL345_COUPLED_DC
 
#define ADXL345_INTERRUPT_DEFAULT_WATERMARK   16
 
#define ADXL345_INTERRUPT_DEFAULT_OFFSET   0.0f
 
#define ADXL345_INTERRUPT_DEFAULT_TAP_THRESHOLD   3.0f
 
#define ADXL345_INTERRUPT_DEFAULT_DURATION   10 * 1000
 
#define ADXL345_INTERRUPT_DEFAULT_LATENT   20.0f
 
#define ADXL345_INTERRUPT_DEFAULT_WINDOW   80.0f
 
#define ADXL345_INTERRUPT_DEFAULT_ACTION_THRESHOLD   2.0f
 
#define ADXL345_INTERRUPT_DEFAULT_INACTION_THRESHOLD   1.0f
 
#define ADXL345_INTERRUPT_DEFAULT_INACTION_TIME   3
 
#define ADXL345_INTERRUPT_DEFAULT_FREE_FALL_THRESHOLD   0.8f
 
#define ADXL345_INTERRUPT_DEFAULT_FREE_FALL_TIME   10
 

Functions

uint8_t adxl345_interrupt_irq_handler (void)
 interrupt irq More...
 
uint8_t adxl345_interrupt_init (adxl345_interface_t interface, adxl345_address_t addr_pin, void(*callback)(uint8_t type), adxl345_bool_t tap_enable, adxl345_bool_t action_enable, adxl345_bool_t inaction_enable, adxl345_bool_t fall_enable)
 interrupt example init More...
 
uint8_t adxl345_interrupt_server (void)
 interrupt server More...
 
uint8_t adxl345_interrupt_deinit (void)
 interrupt example deinit More...
 

Detailed Description

driver adxl345 interrupt header file

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version
2.0.0
Author
Shifeng Li
Date
2021-04-20

history

Date Version Author Description
2021/04/20 2.0 Shifeng Li format the code
2020/12/23 1.0 Shifeng Li first upload

Definition in file driver_adxl345_interrupt.h.