feat(hid): Enhance consumer report to support higher codes
Switch from single byte to double byte usages. Allow the entire 0x0C page for future compatibility. Closes #234. Co-requisite of #21.
This commit is contained in:
parent
711658206f
commit
7e795bf4f9
1 changed files with 9 additions and 7 deletions
|
@ -116,18 +116,20 @@ static const u8_t zmk_hid_report_desc[] = {
|
|||
/* LOGICAL_MINIMUM (0) */
|
||||
HID_GI_LOGICAL_MIN(1),
|
||||
0x00,
|
||||
/* LOGICAL_MAXIMUM (1) */
|
||||
HID_GI_LOGICAL_MAX(1),
|
||||
/* LOGICAL_MAXIMUM (0xFFFF) */
|
||||
HID_GI_LOGICAL_MAX(2),
|
||||
0xFF,
|
||||
0xFF,
|
||||
HID_LI_USAGE_MIN(1),
|
||||
0x00,
|
||||
/* USAGE_MAXIMUM (Keyboard Application) */
|
||||
HID_LI_USAGE_MAX(1),
|
||||
/* USAGE_MAXIMUM (0xFFFF) */
|
||||
HID_LI_USAGE_MAX(2),
|
||||
0xFF,
|
||||
0xFF,
|
||||
/* INPUT (Data,Ary,Abs) */
|
||||
/* REPORT_SIZE (8) */
|
||||
/* REPORT_SIZE (16) */
|
||||
HID_GI_REPORT_SIZE,
|
||||
0x08,
|
||||
0x10,
|
||||
/* REPORT_COUNT (ZMK_HID_CONSUMER_NKRO_SIZE) */
|
||||
HID_GI_REPORT_COUNT,
|
||||
ZMK_HID_CONSUMER_NKRO_SIZE,
|
||||
|
@ -156,7 +158,7 @@ struct zmk_hid_keypad_report {
|
|||
} __packed;
|
||||
|
||||
struct zmk_hid_consumer_report_body {
|
||||
u8_t keys[ZMK_HID_CONSUMER_NKRO_SIZE];
|
||||
u16_t keys[ZMK_HID_CONSUMER_NKRO_SIZE];
|
||||
} __packed;
|
||||
|
||||
struct zmk_hid_consumer_report {
|
||||
|
|
Loading…
Reference in a new issue