summaryrefslogtreecommitdiff
path: root/chip/stm32/usb_hid_touchpad.c
diff options
context:
space:
mode:
authorWei-Han Chen <stimim@google.com>2018-07-17 19:50:28 +0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-11-19 01:24:15 +0000
commit0040af5c9cdfa2f04e748c810faca80863b2c941 (patch)
treed562b5ab926dd359c738c69bd74fdd19ab09d899 /chip/stm32/usb_hid_touchpad.c
parent08500a9f30f50a56942b2e136e298ad9c8448582 (diff)
downloadchrome-ec-0040af5c9cdfa2f04e748c810faca80863b2c941.tar.gz
usb_hid_touchpad: make max pressure configurable
Maximum pressure is now defined by CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_Z. `hammer` is the only board using usb_hid_touchpad, the board.h is updated to reflect the change (for old boards "HAMMER" and "STAFF", we keep the value 1023, so they should behave the same). BRANCH=none BUG=b:70482333 BUG=chromium:904711 TEST=make BOARD=whiskers TEST=make buildall -j TEST=manually on device Signed-off-by: Wei-Han Chen <stimim@chromium.org> Change-Id: I70b0a5b19dfbe3ac731ef2ead08578a7f7a1cb0b Reviewed-on: https://chromium-review.googlesource.com/1141676 Commit-Ready: Wei-Han Chen <stimim@chromium.org> Tested-by: Wei-Han Chen <stimim@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1333948 Commit-Queue: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'chip/stm32/usb_hid_touchpad.c')
-rw-r--r--chip/stm32/usb_hid_touchpad.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/chip/stm32/usb_hid_touchpad.c b/chip/stm32/usb_hid_touchpad.c
index 6646ad2e09..06082fdb1f 100644
--- a/chip/stm32/usb_hid_touchpad.c
+++ b/chip/stm32/usb_hid_touchpad.c
@@ -82,7 +82,9 @@ const struct usb_endpoint_descriptor USB_EP_DESC(USB_IFACE_HID_TOUCHPAD, 81) = {
0x25, 0x0F, /* Logical Maximum (15) */ \
0x81, 0x02, /* Input (Data,Var,Abs) */ \
0x05, 0x0D, /* Usage Page (Digitizer) */ \
- 0x26, 0xFF, 0x03, /* Logical Maximum (1023) */ \
+ /* Logical Maximum of Pressure */ \
+ 0x26, (CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_PRESSURE & 0xFF), \
+ (CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_PRESSURE >> 8), \
0x75, 0x0A, /* Report Size (10) */ \
0x09, 0x30, /* Usage (Tip pressure) */ \
0x81, 0x02, /* Input (Data,Var,Abs) */ \