From 01fd86385bdcf633db0acd91b5f60733097a84a3 Mon Sep 17 00:00:00 2001 From: Yuval Peress Date: Thu, 30 May 2019 12:02:10 -0600 Subject: common: motion_sense: Require CONFIG_MOTION_SENSOR_MAX_COUNT This changes requires all boards to define the maximum number of sensors they support. This will allow us to later create static arrays with the appropriate length. BUG=chromium:966506 BRANCH=None TEST=make buildall Change-Id: I5a2fa8f0fdcaef69065dfd4c2bfea4e3f371e986 Signed-off-by: Yuval Peress Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1637414 Reviewed-by: Jett Rink --- board/samus/board.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'board/samus') diff --git a/board/samus/board.h b/board/samus/board.h index 2bfb1574c8..a3a6b97448 100644 --- a/board/samus/board.h +++ b/board/samus/board.h @@ -173,6 +173,13 @@ enum temp_sensor_id { TEMP_SENSOR_COUNT }; +enum sensor_id { + BASE_ACCEL, + LID_ACCEL, + BASE_GYRO, + SENSOR_COUNT, +}; + /* The number of TMP006 sensor chips on the board. */ #define TMP006_COUNT 6 @@ -213,8 +220,8 @@ void set_pp5000_in_g3(int mask, int enable); #define CONFIG_GESTURE_TAP_MIN_INTERSTICE_T 120 #define CONFIG_GESTURE_TAP_MAX_INTERSTICE_T 500 -#define CONFIG_LID_ANGLE_SENSOR_BASE 0 -#define CONFIG_LID_ANGLE_SENSOR_LID 1 +#define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL +#define CONFIG_LID_ANGLE_SENSOR_LID LID_ACCEL #endif /* !__ASSEMBLER__ */ -- cgit v1.2.1