diff options
author | Ching-Kang Yen <chingkang@chromium.org> | 2020-12-09 17:28:03 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-12-11 03:09:10 +0000 |
commit | b5b267fbfe2493c38f920f610de4d79d2c6f50ee (patch) | |
tree | f04385fa9947686cb7c43fa265c794564983058a /include | |
parent | ea56421c9b616669898b6cea3a57fc824e1e4340 (diff) | |
download | chrome-ec-b5b267fbfe2493c38f920f610de4d79d2c6f50ee.tar.gz |
ec_commands: add struct ec_response_activity_data
Add struct ec_response_activity_data to handle activity data in
include/ec_commands.h.
BRANCH=None
BUG=b:169374265
TEST=make buildall
Signed-off-by: Ching-Kang Yen <chingkang@chromium.org>
Change-Id: I5f40d45d656ae91acc6e9364261c548f302383ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2581708
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/ec_commands.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index 0ff5c4e571..658e0183e4 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -2620,6 +2620,11 @@ enum motionsensor_orientation { MOTIONSENSE_ORIENTATION_UNKNOWN = 4, }; +struct ec_response_activity_data { + uint8_t activity; /* motionsensor_activity */ + uint8_t state; +} __ec_todo_packed; + struct ec_response_motion_sensor_data { /* Flags for each sensor. */ uint8_t flags; @@ -2627,17 +2632,16 @@ struct ec_response_motion_sensor_data { uint8_t sensor_num; /* Each sensor is up to 3-axis. */ union { - int16_t data[3]; + int16_t data[3]; /* for sensors using unsigned data */ - uint16_t udata[3]; + uint16_t udata[3]; struct __ec_todo_packed { - uint16_t reserved; - uint32_t timestamp; + uint16_t reserved; + uint32_t timestamp; }; struct __ec_todo_unpacked { - uint8_t activity; /* motionsensor_activity */ - uint8_t state; - int16_t add_info[2]; + struct ec_response_activity_data activity_data; + int16_t add_info[2]; }; }; } __ec_todo_packed; |