implement INT2, accelerometer test shows sleep state on LED
This commit is contained in:
@@ -237,6 +237,10 @@ void lis2dw_configure_int1(uint8_t sources) {
|
||||
watch_i2c_write8(LIS2DW_ADDRESS, LIS2DW_REG_CTRL4_INT1, sources);
|
||||
}
|
||||
|
||||
void lis2dw_configure_int2(uint8_t sources) {
|
||||
watch_i2c_write8(LIS2DW_ADDRESS, LIS2DW_REG_CTRL5_INT2, sources);
|
||||
}
|
||||
|
||||
void lis2dw_enable_interrupts(void) {
|
||||
uint8_t configuration = watch_i2c_read8(LIS2DW_ADDRESS, LIS2DW_REG_CTRL7);
|
||||
watch_i2c_write8(LIS2DW_ADDRESS, LIS2DW_REG_CTRL7, configuration | LIS2DW_CTRL7_VAL_INTERRUPTS_ENABLE);
|
||||
|
||||
@@ -347,6 +347,8 @@ void lis2dw_configure_wakeup_threshold(uint8_t threshold);
|
||||
|
||||
void lis2dw_configure_int1(uint8_t sources);
|
||||
|
||||
void lis2dw_configure_int2(uint8_t sources);
|
||||
|
||||
void lis2dw_enable_interrupts(void);
|
||||
|
||||
void lis2dw_disable_interrupts(void);
|
||||
|
||||
Reference in New Issue
Block a user