aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol/lufa/descriptor.h
diff options
context:
space:
mode:
authorGravatar Wilba6582 <Wilba6582@users.noreply.github.com>2017-09-07 03:33:00 +1000
committerGravatar skullydazed <skullydazed@users.noreply.github.com>2017-09-06 10:33:00 -0700
commit85c3c5926ca0d47e5c3a8c58a12947f2ea69cd30 (patch)
tree2047cdb5d249c4005928e2b6fbf00047717c04a4 /tmk_core/protocol/lufa/descriptor.h
parent323fa19e2d80b187627f23283930d918b0ffda89 (diff)
downloadqmk_firmware-85c3c5926ca0d47e5c3a8c58a12947f2ea69cd30.tar.gz
Force Raw HID interface number to 1 always (#1669)
Diffstat (limited to 'tmk_core/protocol/lufa/descriptor.h')
-rw-r--r--tmk_core/protocol/lufa/descriptor.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/tmk_core/protocol/lufa/descriptor.h b/tmk_core/protocol/lufa/descriptor.h
index 43001c977..61c42c9df 100644
--- a/tmk_core/protocol/lufa/descriptor.h
+++ b/tmk_core/protocol/lufa/descriptor.h
@@ -133,10 +133,19 @@ typedef struct
/* index of interface */
#define KEYBOARD_INTERFACE 0
+// It is important that the Raw HID interface is at a constant
+// interface number, to support Linux/OSX platforms and chrome.hid
+// If Raw HID is enabled, let it be always 1.
+#ifdef RAW_ENABLE
+# define RAW_INTERFACE (KEYBOARD_INTERFACE + 1)
+#else
+# define RAW_INTERFACE KEYBOARD_INTERFACE
+#endif
+
#ifdef MOUSE_ENABLE
-# define MOUSE_INTERFACE (KEYBOARD_INTERFACE + 1)
+# define MOUSE_INTERFACE (RAW_INTERFACE + 1)
#else
-# define MOUSE_INTERFACE KEYBOARD_INTERFACE
+# define MOUSE_INTERFACE RAW_INTERFACE
#endif
#ifdef EXTRAKEY_ENABLE
@@ -145,16 +154,10 @@ typedef struct
# define EXTRAKEY_INTERFACE MOUSE_INTERFACE
#endif
-#ifdef RAW_ENABLE
-# define RAW_INTERFACE (EXTRAKEY_INTERFACE + 1)
-#else
-# define RAW_INTERFACE EXTRAKEY_INTERFACE
-#endif
-
#ifdef CONSOLE_ENABLE
-# define CONSOLE_INTERFACE (RAW_INTERFACE + 1)
+# define CONSOLE_INTERFACE (EXTRAKEY_INTERFACE + 1)
#else
-# define CONSOLE_INTERFACE RAW_INTERFACE
+# define CONSOLE_INTERFACE EXTRAKEY_INTERFACE
#endif
#ifdef NKRO_ENABLE