preliminary accelerometer support in Movement
This commit is contained in:
@@ -233,6 +233,11 @@ void lis2dw_configure_wakeup_threshold(uint8_t threshold) {
|
||||
watch_i2c_write8(LIS2DW_ADDRESS, LIS2DW_REG_WAKE_UP_THS, configuration | threshold);
|
||||
}
|
||||
|
||||
void lis2dw_configure_6d_threshold(uint8_t threshold) {
|
||||
uint8_t configuration = watch_i2c_read8(LIS2DW_ADDRESS, LIS2DW_REG_TAP_THS_X) & 0b01100000;
|
||||
watch_i2c_write8(LIS2DW_ADDRESS, LIS2DW_REG_TAP_THS_X, configuration | ((threshold & 0b11) << 5));
|
||||
}
|
||||
|
||||
void lis2dw_configure_int1(uint8_t sources) {
|
||||
watch_i2c_write8(LIS2DW_ADDRESS, LIS2DW_REG_CTRL4_INT1, sources);
|
||||
}
|
||||
|
||||
@@ -345,6 +345,8 @@ void lis2dw_disable_tap_detection(void);
|
||||
|
||||
void lis2dw_configure_wakeup_threshold(uint8_t threshold);
|
||||
|
||||
void lis2dw_configure_6d_threshold(uint8_t threshold);
|
||||
|
||||
void lis2dw_configure_int1(uint8_t sources);
|
||||
|
||||
void lis2dw_configure_int2(uint8_t sources);
|
||||
|
||||
Reference in New Issue
Block a user