diff options
author | Nick Vaccaro <nvaccaro@chromium.org> | 2017-04-25 19:09:03 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-05-18 21:05:23 -0700 |
commit | 9a0d0aa70d483be79c71a459dfd5f5e89da2638d (patch) | |
tree | 5e61d14a77ec938ce1508dbc61a271e0dfb15ee0 /include/ec_commands.h | |
parent | d7eefeffb927cfd311d40c00ce817937eab4cb61 (diff) | |
download | chrome-ec-9a0d0aa70d483be79c71a459dfd5f5e89da2638d.tar.gz |
common: sensors: add extra sensor attributes
Adds min_frequency and max_frequency to struct motion_sensor_t.
New attributes min_frequency and max_frequency are now returned in
ectool's MOTIONSENSE_CMD_INFO response.
Incremented ectool's MOTIONSENSE_CMD_INFO version to version 3.
Add constants for MIN_FREQUENCY and MAX_FREQUENCY to each sensor's
header file.
BRANCH=none
BUG=chromium:615059
TEST=build/boot and verify MOTIONSENSE_CMD_INFO response on kevin,
make buildall -j passes.
Change-Id: I66db9715c122ef6bb4665ad5d086a9ecc9c7c93a
Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/482703
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r-- | include/ec_commands.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index 84aa055d04..abc71517bd 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -2100,7 +2100,8 @@ struct __ec_todo_packed ec_params_motion_sense { * and MOTIONSENSE_CMD_PERFORM_CALIB. */ struct __ec_todo_unpacked { uint8_t sensor_num; - } info, data, fifo_flush, perform_calib, list_activities; + } info, info_3, data, fifo_flush, perform_calib, + list_activities; /* * Used for MOTIONSENSE_CMD_EC_RATE, MOTIONSENSE_CMD_SENSOR_ODR @@ -2220,6 +2221,27 @@ struct __ec_todo_packed ec_response_motion_sense { uint8_t chip; } info; + /* Used for MOTIONSENSE_CMD_INFO version 3 */ + struct __ec_todo_unpacked { + /* Should be element of enum motionsensor_type. */ + uint8_t type; + + /* Should be element of enum motionsensor_location. */ + uint8_t location; + + /* Should be element of enum motionsensor_chip. */ + uint8_t chip; + + /* Minimum sensor sampling frequency */ + uint32_t min_frequency; + + /* Maximum sensor sampling frequency */ + uint32_t max_frequency; + + /* Max number of sensor events that could be in fifo */ + uint32_t fifo_max_event_count; + } info_3; + /* Used for MOTIONSENSE_CMD_DATA */ struct ec_response_motion_sensor_data data; |