summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/samus/board.c4
-rw-r--r--include/gesture.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/board/samus/board.c b/board/samus/board.c
index c26f08137d..d95975bb18 100644
--- a/board/samus/board.c
+++ b/board/samus/board.c
@@ -337,11 +337,11 @@ struct motion_sensor_t motion_sensors[] = {
},
/* Used for double tap */
[SENSOR_CONFIG_EC_S3] = {
- .odr = TAP_ODR | ROUND_UP_FLAG,
+ .odr = TAP_ODR_LSM6DS0 | ROUND_UP_FLAG,
.ec_rate = CONFIG_GESTURE_SAMPLING_INTERVAL_MS * MSEC,
},
[SENSOR_CONFIG_EC_S5] = {
- .odr = TAP_ODR | ROUND_UP_FLAG,
+ .odr = TAP_ODR_LSM6DS0 | ROUND_UP_FLAG,
.ec_rate = CONFIG_GESTURE_SAMPLING_INTERVAL_MS * MSEC,
},
},
diff --git a/include/gesture.h b/include/gesture.h
index d480794758..85419c20fc 100644
--- a/include/gesture.h
+++ b/include/gesture.h
@@ -21,6 +21,7 @@ void gesture_calc(uint32_t *event);
* Note: lsm6ds0 accel needs twice the expected data rate in order to guarantee
* that we have a new data sample every reading.
*/
-#define TAP_ODR (2 * (1000000 / CONFIG_GESTURE_SAMPLING_INTERVAL_MS))
+#define TAP_ODR (1000000 / CONFIG_GESTURE_SAMPLING_INTERVAL_MS)
+#define TAP_ODR_LSM6DS0 (2 * TAP_ODR)
#endif /* __CROS_EC_GESTURE_H */