diff options
author | Wei-Han Chen <stimim@google.com> | 2018-07-06 15:33:25 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-08-31 11:19:46 -0700 |
commit | b9841cfcdf7404c868ea9967217cf750820b9491 (patch) | |
tree | 61b73835164699c6bc44eb00c11f0bf2f9697537 /include/usb_hid_touchpad.h | |
parent | 9bb5117aa350e21f6c15257d7d7a464af4b6d08c (diff) | |
download | chrome-ec-b9841cfcdf7404c868ea9967217cf750820b9491.tar.gz |
stm32: usb_hid_touchpad: add confidence
`confidence` is expected from a PTP-compliant touchpad
BRANCH=none
BUG=b:70482333
TEST=manual
Signed-off-by: Wei-Han Chen <stimim@chromium.org>
Change-Id: Ibe7166f43cae5fb36bbcc4e6dfd9ae6525a7225e
Reviewed-on: https://chromium-review.googlesource.com/1188170
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'include/usb_hid_touchpad.h')
-rw-r--r-- | include/usb_hid_touchpad.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/include/usb_hid_touchpad.h b/include/usb_hid_touchpad.h index 39b6277b96..3d6207b19e 100644 --- a/include/usb_hid_touchpad.h +++ b/include/usb_hid_touchpad.h @@ -10,18 +10,23 @@ #define USB_HID_TOUCHPAD_TIMESTAMP_UNIT 100 /* usec */ +#define REPORT_ID_TOUCHPAD 0x01 + +#define MAX_FINGERS 5 + struct usb_hid_touchpad_report { uint8_t id; /* 0x01 */ struct { - unsigned tip:1; - unsigned inrange:1; - unsigned id:4; - unsigned pressure:10; - unsigned width:12; - unsigned height:12; - unsigned x:12; - unsigned y:12; - } __packed finger[5]; + uint16_t confidence:1; + uint16_t tip:1; + uint16_t inrange:1; + uint16_t id:4; + uint16_t pressure:9; + uint16_t width:12; + uint16_t height:12; + uint16_t x:12; + uint16_t y:12; + } __packed finger[MAX_FINGERS]; uint8_t count:7; uint8_t button:1; uint16_t timestamp; |