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 {
#ifdef RAW_ENABLE
RAW_IN_EPNUM = NEXT_EPNUM,
+ #if STM32_USB_USE_OTG1
+ #define RAW_OUT_EPNUM RAW_IN_EPNUM
+ #else
RAW_OUT_EPNUM = NEXT_EPNUM,
+ #endif
#endif
#ifdef SHARED_EP_ENABLE
@@ -219,7 +223,11 @@ enum usb_endpoints {
// ChibiOS has enough memory and descriptor to actually enable the endpoint
// It could use the same endpoint numbers, as that's supported by ChibiOS
// But the QMK code currently assumes that the endpoint numbers are different
+ #if STM32_USB_USE_OTG1
+ #define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM
+ #else
CONSOLE_OUT_EPNUM = NEXT_EPNUM,
+ #endif
# else
# define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM
# endif
@@ -227,17 +235,29 @@ enum usb_endpoints {
#ifdef MIDI_ENABLE
MIDI_STREAM_IN_EPNUM = NEXT_EPNUM,
+ #if STM32_USB_USE_OTG1
+ #define MIDI_STREAM_OUT_EPNUM MIDI_STREAM_IN_EPNUM
+ #else
MIDI_STREAM_OUT_EPNUM = NEXT_EPNUM,
+ #endif
#endif
#ifdef VIRTSER_ENABLE
CDC_NOTIFICATION_EPNUM = NEXT_EPNUM,
CDC_IN_EPNUM = NEXT_EPNUM,
+ #if STM32_USB_USE_OTG1
+ #define CDC_OUT_EPNUM CDC_IN_EPNUM
+ #else
CDC_OUT_EPNUM = NEXT_EPNUM,
+ #endif
#endif
#ifdef JOYSTICK_ENABLE
JOYSTICK_IN_EPNUM = NEXT_EPNUM,
+ #if STM32_USB_USE_OTG1
+ JOYSTICK_OUT_EPNUM = JOYSTICK_IN_EPNUM,
+ #else
JOYSTICK_OUT_EPNUM = NEXT_EPNUM,
+ #endif
#endif
};