summaryrefslogtreecommitdiff
path: root/common/body_detection.c
diff options
context:
space:
mode:
authorChing-Kang Yen <chingkang@chromium.org>2020-12-09 17:28:03 +0800
committerCommit Bot <commit-bot@chromium.org>2020-12-11 03:09:10 +0000
commitb5b267fbfe2493c38f920f610de4d79d2c6f50ee (patch)
treef04385fa9947686cb7c43fa265c794564983058a /common/body_detection.c
parentea56421c9b616669898b6cea3a57fc824e1e4340 (diff)
downloadchrome-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 'common/body_detection.c')
-rw-r--r--common/body_detection.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/body_detection.c b/common/body_detection.c
index ed74a2545d..34257dd633 100644
--- a/common/body_detection.c
+++ b/common/body_detection.c
@@ -98,8 +98,10 @@ void body_detect_change_state(enum body_detect_states state, bool spoof)
if (IS_ENABLED(CONFIG_GESTURE_HOST_DETECTION)) {
struct ec_response_motion_sensor_data vector = {
.flags = MOTIONSENSE_SENSOR_FLAG_WAKEUP,
- .activity = MOTIONSENSE_ACTIVITY_BODY_DETECTION,
- .state = state,
+ .activity_data = {
+ .activity = MOTIONSENSE_ACTIVITY_BODY_DETECTION,
+ .state = state,
+ },
.sensor_num = MOTION_SENSE_ACTIVITY_SENSOR_ID,
};
motion_sense_fifo_stage_data(&vector, NULL, 0,