summaryrefslogtreecommitdiff
path: root/board/hatch/board.h
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2019-02-12 17:20:23 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-02-27 13:43:44 -0800
commita9ec276b2d3417518a46db8f703b6e0a2756a9f9 (patch)
tree025a74adf679260935b3a9c0d7010c1262d8488c /board/hatch/board.h
parent62e6e0ac57958e976fd7575febe0c8d2926a39bf (diff)
downloadchrome-ec-a9ec276b2d3417518a46db8f703b6e0a2756a9f9.tar.gz
hatch: Add support for BMA253 lid accel sensor and lid angle detection
This CL adds the config options required for the BMA253 lid accel sensor. It also adds the configuration table, mutex, and rotation matrix. BUG=b:124337208 BRANCH=none TEST=Verified the sensor readings using 'accelinfo on 10000' and the numbers change on the desired axis when the sensor is moved. The signs can't be verified yet because it's not properly mounted on P0. Change-Id: I2943a82a91472d105d97dba76917f40817f5624e Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/1468865 Commit-Ready: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Tested-by: Zack Yang <zack_yang@compal.corp-partner.google.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'board/hatch/board.h')
-rw-r--r--board/hatch/board.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/board/hatch/board.h b/board/hatch/board.h
index 0b2de2f9d0..3f5ac8322a 100644
--- a/board/hatch/board.h
+++ b/board/hatch/board.h
@@ -34,6 +34,12 @@
#define CONFIG_ACCELGYRO_BMI160
#define CONFIG_ACCELGYRO_BMI160_INT_EVENT TASK_EVENT_CUSTOM(4)
#define CONFIG_ACCELGYRO_BMI160_INT2_OUTPUT
+#define CONFIG_ACCEL_BMA255
+#define CONFIG_ACCEL_FORCE_MODE_MASK (1 << LID_ACCEL)
+#define CONFIG_LID_ANGLE
+#define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL
+#define CONFIG_LID_ANGLE_SENSOR_LID LID_ACCEL
+#define CONFIG_LID_ANGLE_UPDATE
/* Fan features */
#define CONFIG_FANS 1
@@ -78,7 +84,8 @@ enum adc_channel {
};
enum sensor_id {
- BASE_ACCEL = 0,
+ LID_ACCEL = 0,
+ BASE_ACCEL,
BASE_GYRO,
SENSOR_COUNT,
};