summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/usb_descriptor.h
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/protocol/usb_descriptor.h')
-rw-r--r--tmk_core/protocol/usb_descriptor.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/tmk_core/protocol/usb_descriptor.h b/tmk_core/protocol/usb_descriptor.h
index 02a4b1ce59..aa8863f43f 100644
--- a/tmk_core/protocol/usb_descriptor.h
+++ b/tmk_core/protocol/usb_descriptor.h
@@ -205,7 +205,11 @@ enum usb_endpoints {
205 205
206#ifdef RAW_ENABLE 206#ifdef RAW_ENABLE
207 RAW_IN_EPNUM = NEXT_EPNUM, 207 RAW_IN_EPNUM = NEXT_EPNUM,
208 #if STM32_USB_USE_OTG1
209 #define RAW_OUT_EPNUM RAW_IN_EPNUM
210 #else
208 RAW_OUT_EPNUM = NEXT_EPNUM, 211 RAW_OUT_EPNUM = NEXT_EPNUM,
212 #endif
209#endif 213#endif
210 214
211#ifdef SHARED_EP_ENABLE 215#ifdef SHARED_EP_ENABLE
@@ -219,7 +223,11 @@ enum usb_endpoints {
219 // ChibiOS has enough memory and descriptor to actually enable the endpoint 223 // ChibiOS has enough memory and descriptor to actually enable the endpoint
220 // It could use the same endpoint numbers, as that's supported by ChibiOS 224 // It could use the same endpoint numbers, as that's supported by ChibiOS
221 // But the QMK code currently assumes that the endpoint numbers are different 225 // But the QMK code currently assumes that the endpoint numbers are different
226 #if STM32_USB_USE_OTG1
227 #define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM
228 #else
222 CONSOLE_OUT_EPNUM = NEXT_EPNUM, 229 CONSOLE_OUT_EPNUM = NEXT_EPNUM,
230 #endif
223# else 231# else
224# define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM 232# define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM
225# endif 233# endif
@@ -227,17 +235,29 @@ enum usb_endpoints {
227 235
228#ifdef MIDI_ENABLE 236#ifdef MIDI_ENABLE
229 MIDI_STREAM_IN_EPNUM = NEXT_EPNUM, 237 MIDI_STREAM_IN_EPNUM = NEXT_EPNUM,
238 #if STM32_USB_USE_OTG1
239 #define MIDI_STREAM_OUT_EPNUM MIDI_STREAM_IN_EPNUM
240 #else
230 MIDI_STREAM_OUT_EPNUM = NEXT_EPNUM, 241 MIDI_STREAM_OUT_EPNUM = NEXT_EPNUM,
242 #endif
231#endif 243#endif
232 244
233#ifdef VIRTSER_ENABLE 245#ifdef VIRTSER_ENABLE
234 CDC_NOTIFICATION_EPNUM = NEXT_EPNUM, 246 CDC_NOTIFICATION_EPNUM = NEXT_EPNUM,
235 CDC_IN_EPNUM = NEXT_EPNUM, 247 CDC_IN_EPNUM = NEXT_EPNUM,
248 #if STM32_USB_USE_OTG1
249 #define CDC_OUT_EPNUM CDC_IN_EPNUM
250 #else
236 CDC_OUT_EPNUM = NEXT_EPNUM, 251 CDC_OUT_EPNUM = NEXT_EPNUM,
252 #endif
237#endif 253#endif
238#ifdef JOYSTICK_ENABLE 254#ifdef JOYSTICK_ENABLE
239 JOYSTICK_IN_EPNUM = NEXT_EPNUM, 255 JOYSTICK_IN_EPNUM = NEXT_EPNUM,
256 #if STM32_USB_USE_OTG1
257 JOYSTICK_OUT_EPNUM = JOYSTICK_IN_EPNUM,
258 #else
240 JOYSTICK_OUT_EPNUM = NEXT_EPNUM, 259 JOYSTICK_OUT_EPNUM = NEXT_EPNUM,
260 #endif
241#endif 261#endif
242}; 262};
243 263