diff options
author | Jett Rink <jettrink@chromium.org> | 2019-03-08 10:01:29 -0700 |
---|---|---|
committer | Jett Rink <jettrink@chromium.org> | 2019-03-18 22:18:49 +0000 |
commit | 53d08058ce107f0529c45f910d84e9d5de5620e6 (patch) | |
tree | f209c6da08aec0a6941d23f34955c9528c77f90f /board/arcada_ish/board.h | |
parent | 6c022cf36fb039f6edcf3c22d0a1a0ea9e4f0fae (diff) | |
download | chrome-ec-53d08058ce107f0529c45f910d84e9d5de5620e6.tar.gz |
arcada_ish: add base lis2dh accel sensor
Add base accelerometer to arcada_ish image. Lid angle detection using
base and lid accel sensors in EC is still pending.
With draft CLs, I successfully calibrated this sensor and calculated lid
angle successfully using the AccelerometersLidAngleTest factory test in
the AP.
BRANCH=none
BUG=b:122281217
TEST=sensors is calibratable with normal factory calibration process and
usable for lid angle calculation using factory tests.
Change-Id: I1c512cd4016d75c5bfece12475787189a99e6ee0
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1512133
Reviewed-by: Mathew King <mathewk@chromium.org>
Diffstat (limited to 'board/arcada_ish/board.h')
-rw-r--r-- | board/arcada_ish/board.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/board/arcada_ish/board.h b/board/arcada_ish/board.h index fbc8ad1c8a..fe5e82777a 100644 --- a/board/arcada_ish/board.h +++ b/board/arcada_ish/board.h @@ -31,11 +31,14 @@ #define CONFIG_I2C #define CONFIG_I2C_MASTER -#define CONFIG_ACCELGYRO_LSM6DSM /* For LSM6DS3 */ +#define CONFIG_ACCEL_LNG2DM /* Base sensor: LNG2DM (uses LIS2DH driver) */ +#define CONFIG_ACCELGYRO_LSM6DSM /* Lid sensor: LSM6DS3 (uses LSM6DSM driver) */ #define CONFIG_ACCEL_INTERRUPTS #define CONFIG_ACCEL_FIFO 256 #define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO / 3) +/* Sensors without hardware FIFO are in forced mode */ +#define CONFIG_ACCEL_FORCE_MODE_MASK (1 << BASE_ACCEL) #define CONFIG_ACCEL_LSM6DSM_INT_EVENT TASK_EVENT_CUSTOM(1 << 2) @@ -83,10 +86,15 @@ #include "gpio_signal.h" #include "registers.h" -/* Motion sensors */ +/* Motion sensors + * + * Note: Since we aren't using LPC memory map to transmit sensor data, the + * order of this enum does not need to be accel, accel, gyro + */ enum sensor_id { LID_ACCEL, LID_GYRO, + BASE_ACCEL, /* TODO(b/122281217): Add remain sensors */ SENSOR_COUNT }; |