diff options
-rw-r--r-- | tmk_core/protocol/lufa/descriptor.h | 23 |
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 | |||
133 | /* index of interface */ | 133 | /* index of interface */ |
134 | #define KEYBOARD_INTERFACE 0 | 134 | #define KEYBOARD_INTERFACE 0 |
135 | 135 | ||
136 | // It is important that the Raw HID interface is at a constant | ||
137 | // interface number, to support Linux/OSX platforms and chrome.hid | ||
138 | // If Raw HID is enabled, let it be always 1. | ||
139 | #ifdef RAW_ENABLE | ||
140 | # define RAW_INTERFACE (KEYBOARD_INTERFACE + 1) | ||
141 | #else | ||
142 | # define RAW_INTERFACE KEYBOARD_INTERFACE | ||
143 | #endif | ||
144 | |||
136 | #ifdef MOUSE_ENABLE | 145 | #ifdef MOUSE_ENABLE |
137 | # define MOUSE_INTERFACE (KEYBOARD_INTERFACE + 1) | 146 | # define MOUSE_INTERFACE (RAW_INTERFACE + 1) |
138 | #else | 147 | #else |
139 | # define MOUSE_INTERFACE KEYBOARD_INTERFACE | 148 | # define MOUSE_INTERFACE RAW_INTERFACE |
140 | #endif | 149 | #endif |
141 | 150 | ||
142 | #ifdef EXTRAKEY_ENABLE | 151 | #ifdef EXTRAKEY_ENABLE |
@@ -145,16 +154,10 @@ typedef struct | |||
145 | # define EXTRAKEY_INTERFACE MOUSE_INTERFACE | 154 | # define EXTRAKEY_INTERFACE MOUSE_INTERFACE |
146 | #endif | 155 | #endif |
147 | 156 | ||
148 | #ifdef RAW_ENABLE | ||
149 | # define RAW_INTERFACE (EXTRAKEY_INTERFACE + 1) | ||
150 | #else | ||
151 | # define RAW_INTERFACE EXTRAKEY_INTERFACE | ||
152 | #endif | ||
153 | |||
154 | #ifdef CONSOLE_ENABLE | 157 | #ifdef CONSOLE_ENABLE |
155 | # define CONSOLE_INTERFACE (RAW_INTERFACE + 1) | 158 | # define CONSOLE_INTERFACE (EXTRAKEY_INTERFACE + 1) |
156 | #else | 159 | #else |
157 | # define CONSOLE_INTERFACE RAW_INTERFACE | 160 | # define CONSOLE_INTERFACE EXTRAKEY_INTERFACE |
158 | #endif | 161 | #endif |
159 | 162 | ||
160 | #ifdef NKRO_ENABLE | 163 | #ifdef NKRO_ENABLE |