diff options
-rw-r--r-- | chip/stm32/usb_hid_touchpad.c | 2 | ||||
-rw-r--r-- | driver/touchpad_st.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/chip/stm32/usb_hid_touchpad.c b/chip/stm32/usb_hid_touchpad.c index ca1cb85cb7..0ead660432 100644 --- a/chip/stm32/usb_hid_touchpad.c +++ b/chip/stm32/usb_hid_touchpad.c @@ -89,7 +89,7 @@ const struct usb_endpoint_descriptor USB_EP_DESC(USB_IFACE_HID_TOUCHPAD, 81) = { 0x75, 0x09, /* Report Size (9) */ \ 0x09, 0x30, /* Usage (Tip pressure) */ \ 0x81, 0x02, /* Input (Data,Var,Abs) */ \ - 0x26, 0xFF, 0x00, /* Logical Maximum (255) */ \ + 0x26, 0xFF, 0x0F, /* Logical Maximum (4095) */ \ 0x75, 0x0C, /* Report Size (12) */ \ 0x09, 0x48, /* Usage (WIDTH) */ \ 0x81, 0x02, /* Input (Data,Var,Abs) */ \ diff --git a/driver/touchpad_st.c b/driver/touchpad_st.c index 9704e8c0ac..be6628815a 100644 --- a/driver/touchpad_st.c +++ b/driver/touchpad_st.c @@ -191,9 +191,10 @@ static int st_tp_parse_finger(struct usb_hid_touchpad_report *report, report->finger[i].id = event->finger.touch_id; report->finger[i].pressure = event->finger.z; report->finger[i].width = (event->finger.minor | - (event->minor_high << 4)); + (event->minor_high << 4)) << 4; report->finger[i].height = (event->finger.major | - (event->major_high << 4)); + (event->major_high << 4)) << 4; + report->finger[i].x = (CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_X - event->finger.x); report->finger[i].y = (CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_Y - |