diff options
author | Peter Johanson <peter@peterjohanson.com> | 2021-11-08 21:21:01 +0000 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2021-11-09 10:38:49 -0500 |
commit | f8018b22d0bcba97e54652a01e8bdefb15f83c4c (patch) | |
tree | f04a4d6a8d999857218d472a71abf97e14454985 /app | |
parent | c412fad40da718b5df518c92b08b4913d26621c6 (diff) |
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.
Diffstat (limited to 'app')
-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 95b82d4..e23caff 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) */ |