diff options
author | Ikjoon Jang <ikjn@chromium.org> | 2020-07-29 17:58:05 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-26 03:33:37 +0000 |
commit | a4dd3719bc582aee57cb7de8c4b61080d738d91b (patch) | |
tree | b1479fbe1a19b447da2397b50148f875b6019fee | |
parent | 323b44830c3b36d7b82434f74db3bb6338e7a6ae (diff) | |
download | chrome-ec-a4dd3719bc582aee57cb7de8c4b61080d738d91b.tar.gz |
ec_commands: add uint16_t alias to motion_sensor_data for light sensors
Current EC protocol defines motion sensor's 3-axis raw data type as i16
but in case of light sensor, this should be u16 to support up to 65535.
This patch explicitly declares u16 type in protocol definition
BUG=b:162396219
TEST=Build
BRANCH=none
Change-Id: Ie38c7d72d9a8ab5d83d23edfa3faeb7fccaa0082
Signed-off-by: Ikjoon Jang <ikjn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2328948
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
(cherry picked from commit dc72e1d946422ea3359c35c15f30cd68e1ce9ca4)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2721094
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
-rw-r--r-- | include/ec_commands.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index 6caba3849f..e064d1eb2a 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -2507,6 +2507,8 @@ struct ec_response_motion_sensor_data { /* Each sensor is up to 3-axis. */ union { int16_t data[3]; + /* for sensors using unsigned data */ + uint16_t udata[3]; struct __ec_todo_packed { uint16_t reserved; uint32_t timestamp; |