From 8bf7f3859719741ae694219b53fbfaabb2af04fe Mon Sep 17 00:00:00 2001 From: Scott Collyer Date: Tue, 30 May 2017 15:58:17 -0700 Subject: [PATCH] sensor: bmi160: Fix macro used to set double tap interstice The line to convert the desired double tap window time to its register value was using the incorrect macro. Have corrected this to use the intended one. BUG=b:62202895 BRANCH=none TEST=On Eve verified that double tap events are properly detected. Change-Id: I70d810c93a8e27a3f61f3175e1ea95d0e59554ac Signed-off-by: Scott Collyer Reviewed-on: https://chromium-review.googlesource.com/518522 Commit-Ready: Scott Collyer Tested-by: Scott Collyer Reviewed-by: Gwendal Grignou --- driver/accelgyro_bmi160.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver/accelgyro_bmi160.c b/driver/accelgyro_bmi160.c index 5db6aa2d5a..e63aefcb34 100644 --- a/driver/accelgyro_bmi160.c +++ b/driver/accelgyro_bmi160.c @@ -792,7 +792,7 @@ static int config_interrupt(const struct motion_sensor_t *s) #ifdef CONFIG_GESTURE_SENSOR_BATTERY_TAP raw_write8(s->port, s->addr, BMI160_INT_TAP_0, - BMI160_TAP_TH(s, CONFIG_GESTURE_TAP_MAX_INTERSTICE_T)); + BMI160_TAP_DUR(s, CONFIG_GESTURE_TAP_MAX_INTERSTICE_T)); ret = raw_write8(s->port, s->addr, BMI160_INT_TAP_1, BMI160_TAP_TH(s, CONFIG_GESTURE_TAP_THRES_MG)); #endif