Skip to content

Commit f1c4c30

Browse files
committed
fix digitizer range bug
1 parent 6fb6877 commit f1c4c30

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

STM32F1/libraries/USBComposite/USBHID.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@
167167
0x09, 0x30, /* Usage (X) */ \
168168
0x09, 0x31, /* Usage (Y) */ \
169169
0x16, 0x00, 0x00, /* Logical Minimum (0) */ \
170-
0x26, 0xFF, 0x3F, /* Logical Maximum (16383) */ \
170+
0x26, 0xFF, 0x0F, /* Logical Maximum (4095) */ \
171171
0x36, 0x00, 0x00, /* Physical Minimum (0) */ \
172-
0x46, 0xFF, 0x3F, /* Physical Maximum (16383) */ \
172+
0x46, 0xFF, 0x0F, /* Physical Maximum (4095) */ \
173173
0x66, 0x00, 0x00, /* UNIT (None) */ \
174174
0x75, 0x0C, /* Report Size (12), */ \
175175
0x95, 0x02, /* Report Count (2), */ \
@@ -180,8 +180,8 @@
180180
0xc0 /* END_COLLECTION */
181181
// With this declaration a data packet must be sent as:
182182
// bits 0-7 -> "touch" state (bit 0 = pen up/down, bit 1 = In Range)
183-
// bits 8-19 -> absolute X coordinate (0...16383)
184-
// bits 20-31-> absolute Y coordinate (0...16383)
183+
// bits 8-19 -> absolute X coordinate (0...4095)
184+
// bits 20-31-> absolute Y coordinate (0...4095)
185185

186186
#define HID_KEYBOARD_REPORT_DESCRIPTOR(...) \
187187
0x05, 0x01, /* USAGE_PAGE (Generic Desktop) // 47 */ \

0 commit comments

Comments
 (0)