summaryrefslogtreecommitdiff
path: root/app/include/zmk/hid.h
diff options
context:
space:
mode:
authorinnovaker <66737976+innovaker@users.noreply.github.com>2020-10-27 18:42:41 +0000
committerinnovaker <66737976+innovaker@users.noreply.github.com>2020-10-27 22:36:26 +0000
commit8ce7d8de0133242d5896333add10be9ba2ae9363 (patch)
tree5c9ba776a8d46543b0b1be849fe905aea7b084af /app/include/zmk/hid.h
parentf4596fc784d11aa2d03ff0b7fa0a921600fc2db2 (diff)
refactor(hid): Refactor consumer report to a configurable size
Diffstat (limited to 'app/include/zmk/hid.h')
-rw-r--r--app/include/zmk/hid.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/include/zmk/hid.h b/app/include/zmk/hid.h
index aa024dc..d09ffde 100644
--- a/app/include/zmk/hid.h
+++ b/app/include/zmk/hid.h
@@ -15,6 +15,8 @@
#define ZMK_HID_KEYPAD_NKRO_SIZE 6
+#define ZMK_HID_CONSUMER_NKRO_SIZE 6
+
static const u8_t zmk_hid_report_desc[] = {
/* USAGE_PAGE (Generic Desktop) */
HID_GI_USAGE_PAGE,
@@ -111,9 +113,9 @@ static const u8_t zmk_hid_report_desc[] = {
/* REPORT_SIZE (8) */
HID_GI_REPORT_SIZE,
0x08,
- /* REPORT_COUNT (8) */
+ /* REPORT_COUNT (ZMK_HID_CONSUMER_NKRO_SIZE) */
HID_GI_REPORT_COUNT,
- 0x06,
+ ZMK_HID_CONSUMER_NKRO_SIZE,
HID_MI_INPUT,
0x00,
/* END COLLECTION */
@@ -138,7 +140,7 @@ struct zmk_hid_keypad_report {
} __packed;
struct zmk_hid_consumer_report_body {
- u8_t keys[6];
+ u8_t keys[ZMK_HID_CONSUMER_NKRO_SIZE];
} __packed;
struct zmk_hid_consumer_report {