summaryrefslogtreecommitdiff
path: root/common/motion_sense.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2020-10-20 16:52:49 -0700
committerCommit Bot <commit-bot@chromium.org>2020-11-06 01:43:10 +0000
commit6ff3be3921c19c00826252c685d9cb29d8c37bd4 (patch)
tree9395b4bfd0ba7fd50c1baed2d4d1303a180213e3 /common/motion_sense.c
parent851daf728dca124f4bb2b6d27238d3952be5cf2b (diff)
downloadchrome-ec-6ff3be3921c19c00826252c685d9cb29d8c37bd4.tar.gz
motion: Use empty CONFIG_ variable to use IS_ENABLED()
Split information in a boolean variable and another variable that contains a property. For instance, CONFIG_GESTURE_SENSOR_DOUBLE_TAP becomes: CONFIG_GESTURE_SENSOR_DOUBLE_TAP : boolean variable CONFIG_GESTURE_TAP_SENSOR : property that contains the sensor number. BUG=chromium:1140877 BRANCH=none TEST=buildall Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Change-Id: I27ba462f8a12b14882104b9f983f2dc17f917314 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2488937
Diffstat (limited to 'common/motion_sense.c')
-rw-r--r--common/motion_sense.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/motion_sense.c b/common/motion_sense.c
index e3b6e71943..d18128633a 100644
--- a/common/motion_sense.c
+++ b/common/motion_sense.c
@@ -717,7 +717,7 @@ static int motion_sense_process(struct motion_sensor_t *sensor,
if (has_data_read) {
#ifdef CONFIG_GESTURE_SW_DETECTION
/* Run gesture recognition engine */
- if (sensor_num == CONFIG_GESTURE_SENSOR_DOUBLE_TAP)
+ if (sensor_num == CONFIG_GESTURE_TAP_SENSOR)
gesture_calc(event);
#endif
#ifdef CONFIG_BODY_DETECTION
@@ -1088,7 +1088,7 @@ static enum ec_status host_cmd_motion_sense(struct host_cmd_handler_args *args)
if (args->version >= 3) {
out->info_3.min_frequency = sensor->min_frequency;
out->info_3.max_frequency = sensor->max_frequency;
- out->info_3.fifo_max_event_count = MAX_FIFO_EVENT_COUNT;
+ out->info_3.fifo_max_event_count = CONFIG_ACCEL_FIFO_SIZE;
args->response_size = sizeof(out->info_3);
}
if (args->version >= 4) {