diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2015-08-30 21:07:03 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-18 20:57:22 -0700 |
commit | 6b5a49ef15354c5b31be51f32006dbb4d7dc7c62 (patch) | |
tree | 7df76a93bfedaecdfda598278591a7411e3602f8 /include/accelgyro.h | |
parent | 13a7ae7b6fe5c67446adeb95256271547a0c777b (diff) | |
download | chrome-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/accelgyro.h')
-rw-r--r-- | include/accelgyro.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/accelgyro.h b/include/accelgyro.h index 756c2e0e9d..f9b68f0e36 100644 --- a/include/accelgyro.h +++ b/include/accelgyro.h @@ -118,6 +118,30 @@ struct accelgyro_drv { */ int (*load_fifo)(struct motion_sensor_t *s); #endif +#ifdef CONFIG_GESTURE_HOST_DETECTION + /** + * handler for setting/getting activity information. + * Manage the high level activity detection of the chip. + * @s Pointer to sensor data. + * @activity activity to work on + * @enable 1 to enable, 0 to disable + * @data addtional data if needed, activity dependant. + */ + int (*manage_activity)(struct motion_sensor_t *s, + enum motionsensor_activity activity, + int enable, + struct ec_motion_sense_activity *data); + /** + * List activities managed by the sensors. + * @s Pointer to sensor data. + * @enable bit mask of activities currently enabled. + * @disabled bit mask of activities currently disabled. + */ + int (*list_activities)(struct motion_sensor_t *s, + uint32_t *enabled, + uint32_t *disabled); + +#endif }; /* Used to save sensor information */ |