diff options
author | Peter Johanson <[email protected]> | 2021-11-08 21:21:01 +0000 |
---|---|---|
committer | Pete Johanson <[email protected]> | 2021-11-09 10:38:49 -0500 |
commit | f8018b22d0bcba97e54652a01e8bdefb15f83c4c (patch) | |
tree | f04a4d6a8d999857218d472a71abf97e14454985 | |
parent | c412fad40da718b5df518c92b08b4913d26621c6 (diff) | |
download | zmk-f8018b22d0bcba97e54652a01e8bdefb15f83c4c.tar.gz zmk-f8018b22d0bcba97e54652a01e8bdefb15f83c4c.zip |
fix(hid): Basic consumer code fixes for signed logical max.
* Logical max values are signed, so for the report descriptor, use a two
byte logical max descriptor item to impart proper 0xFF max logical
value.
-rw-r--r-- | app/include/zmk/hid.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/include/zmk/hid.h b/app/include/zmk/hid.h index 95b82d4685..e23caff99d 100644 --- a/app/include/zmk/hid.h +++ b/app/include/zmk/hid.h @@ -143,12 +143,14 @@ static const uint8_t zmk_hid_report_desc[] = { /* LOGICAL_MINIMUM (0) */ HID_GI_LOGICAL_MIN(1), 0x00, - /* LOGICAL_MAXIMUM (0xFFFF) */ - HID_GI_LOGICAL_MAX(1), + /* LOGICAL_MAXIMUM (0x00FF) - little endian, and requires two bytes because logical max is + signed */ + HID_GI_LOGICAL_MAX(2), 0xFF, + 0x00, HID_LI_USAGE_MIN(1), 0x00, - /* USAGE_MAXIMUM (0xFFFF) */ + /* USAGE_MAXIMUM (0xFF) */ HID_LI_USAGE_MAX(1), 0xFF, /* INPUT (Data,Ary,Abs) */ |