accelerometer: clarify purpose of this bit
This commit is contained in:
parent
9719567047
commit
a6f80ceb61
@ -233,14 +233,14 @@ void lis2dw_disable_stationary_motion_detection(void) {
|
||||
watch_i2c_write8(LIS2DW_ADDRESS, LIS2DW_REG_WAKE_UP_DUR, configuration & ~LIS2DW_WAKE_UP_DUR_STATIONARY);
|
||||
}
|
||||
|
||||
void lis2dw_enable_tap_detection(void) {
|
||||
void lis2dw_enable_double_tap_event(void) {
|
||||
uint8_t configuration = watch_i2c_read8(LIS2DW_ADDRESS, LIS2DW_REG_WAKE_UP_THS);
|
||||
watch_i2c_write8(LIS2DW_ADDRESS, LIS2DW_REG_WAKE_UP_THS, configuration | LIS2DW_WAKE_UP_THS_VAL_TAP_EVENT_ENABLED);
|
||||
watch_i2c_write8(LIS2DW_ADDRESS, LIS2DW_REG_WAKE_UP_THS, configuration | LIS2DW_WAKE_UP_THS_ENABLE_DOUBLE_TAP);
|
||||
}
|
||||
|
||||
void lis2dw_disable_tap_detection(void) {
|
||||
void lis2dw_disable_double_tap_event(void) {
|
||||
uint8_t configuration = watch_i2c_read8(LIS2DW_ADDRESS, LIS2DW_REG_WAKE_UP_THS);
|
||||
watch_i2c_write8(LIS2DW_ADDRESS, LIS2DW_REG_WAKE_UP_THS, configuration & ~LIS2DW_WAKE_UP_THS_VAL_TAP_EVENT_ENABLED);
|
||||
watch_i2c_write8(LIS2DW_ADDRESS, LIS2DW_REG_WAKE_UP_THS, configuration & ~LIS2DW_WAKE_UP_THS_ENABLE_DOUBLE_TAP);
|
||||
}
|
||||
|
||||
void lis2dw_configure_wakeup_threshold(uint8_t threshold) {
|
||||
|
||||
@ -232,7 +232,7 @@ typedef enum {
|
||||
#define LIS2DW_REG_INT1_DUR 0x33
|
||||
|
||||
#define LIS2DW_REG_WAKE_UP_THS 0x34
|
||||
#define LIS2DW_WAKE_UP_THS_VAL_TAP_EVENT_ENABLED 0b10000000
|
||||
#define LIS2DW_WAKE_UP_THS_ENABLE_DOUBLE_TAP 0b10000000 // by default, only single tap is enabled
|
||||
#define LIS2DW_WAKE_UP_THS_VAL_SLEEP_ON 0b01000000
|
||||
|
||||
#define LIS2DW_REG_WAKE_UP_DUR 0x35
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user