summaryrefslogtreecommitdiff
path: root/include/motion_sense.h
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2015-08-30 21:07:03 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-09-18 20:57:22 -0700
commit6b5a49ef15354c5b31be51f32006dbb4d7dc7c62 (patch)
tree7df76a93bfedaecdfda598278591a7411e3602f8 /include/motion_sense.h
parent13a7ae7b6fe5c67446adeb95256271547a0c777b (diff)
downloadchrome-ec-6b5a49ef15354c5b31be51f32006dbb4d7dc7c62.tar.gz
motion: Add Gesture Interface
Add an interface with the host to set up gesture recognition. Today, only significant motion is supported. Add a virtual sensor for concentrating gesture support from host. BRANCH=smaug BUG=b:23570481 TEST=On ryu, enable significant motion from host. Change-Id: I906fa2d2d7b4ca2771ea2f58b91de8d97bf4e2e3 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/296213
Diffstat (limited to 'include/motion_sense.h')
-rw-r--r--include/motion_sense.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/motion_sense.h b/include/motion_sense.h
index 4185573b41..ec2219a0e3 100644
--- a/include/motion_sense.h
+++ b/include/motion_sense.h
@@ -177,4 +177,12 @@ void motion_sense_fifo_add_unit(struct ec_response_motion_sensor_data *data,
int valid_data);
#endif
+
+#ifdef CONFIG_GESTURE_HOST_DETECTION
+/* Add an extra sensor. We may need to add more */
+#define MOTION_SENSE_ACTIVITY_SENSOR_ID (motion_sensor_count)
+#define ALL_MOTION_SENSORS (MOTION_SENSE_ACTIVITY_SENSOR_ID + 1)
+#else
+#define ALL_MOTION_SENSORS motion_sensor_count
+#endif
#endif /* __CROS_EC_MOTION_SENSE_H */