Add support for large Mouse Reports (#16371)

Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
This commit is contained in:
Drashna Jaelre 2022-06-08 18:39:16 -07:00 committed by GitHub
parent 84944df6a6
commit 0ab51ee29d
Failed to generate hash of commit
10 changed files with 123 additions and 39 deletions

View file

@ -482,14 +482,28 @@ const PROGMEM uchar shared_hid_report[] = {
0x75, 0x01, // Report Size (1)
0x81, 0x02, // Input (Data, Variable, Absolute)
// X/Y position (2 bytes)
# ifdef MOUSE_EXTENDED_REPORT
// Boot protocol XY ignored in Report protocol
0x95, 0x02, // Report Count (2)
0x75, 0x08, // Report Size (8)
0x81, 0x03, // Input (Constant)
# endif
// X/Y position (2 or 4 bytes)
0x05, 0x01, // Usage Page (Generic Desktop)
0x09, 0x30, // Usage (X)
0x09, 0x31, // Usage (Y)
# ifndef MOUSE_EXTENDED_REPORT
0x15, 0x81, // Logical Minimum (-127)
0x25, 0x7F, // Logical Maximum (127)
0x95, 0x02, // Report Count (2)
0x75, 0x08, // Report Size (8)
# else
0x16, 0x01, 0x80, // Logical Minimum (-32767)
0x26, 0xFF, 0x7F, // Logical Maximum (32767)
0x95, 0x02, // Report Count (2)
0x75, 0x10, // Report Size (16)
# endif
0x81, 0x06, // Input (Data, Variable, Relative)
// Vertical wheel (1 byte)