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.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/tmk_core/protocol/usb_descriptor.h b/tmk_core/protocol/usb_descriptor.h
index 6c3424145c..f8b7a863aa 100644
--- a/tmk_core/protocol/usb_descriptor.h
+++ b/tmk_core/protocol/usb_descriptor.h
@@ -47,6 +47,9 @@
#ifdef PROTOCOL_CHIBIOS
# include <hal.h>
+# if STM32_USB_USE_OTG1 == TRUE
+# define USB_ENDPOINTS_ARE_REORDERABLE
+# endif
#endif
/*
@@ -216,7 +219,7 @@ enum usb_endpoints {
#ifdef RAW_ENABLE
RAW_IN_EPNUM = NEXT_EPNUM,
-# if STM32_USB_USE_OTG1
+# ifdef USB_ENDPOINTS_ARE_REORDERABLE
# define RAW_OUT_EPNUM RAW_IN_EPNUM
# else
RAW_OUT_EPNUM = NEXT_EPNUM,
@@ -234,7 +237,7 @@ 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
+# ifdef USB_ENDPOINTS_ARE_REORDERABLE
# define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM
# else
CONSOLE_OUT_EPNUM = NEXT_EPNUM,
@@ -246,7 +249,7 @@ enum usb_endpoints {
#ifdef MIDI_ENABLE
MIDI_STREAM_IN_EPNUM = NEXT_EPNUM,
-# if STM32_USB_USE_OTG1
+# ifdef USB_ENDPOINTS_ARE_REORDERABLE
# define MIDI_STREAM_OUT_EPNUM MIDI_STREAM_IN_EPNUM
# else
MIDI_STREAM_OUT_EPNUM = NEXT_EPNUM,
@@ -256,7 +259,7 @@ enum usb_endpoints {
#ifdef VIRTSER_ENABLE
CDC_NOTIFICATION_EPNUM = NEXT_EPNUM,
CDC_IN_EPNUM = NEXT_EPNUM,
-# if STM32_USB_USE_OTG1
+# ifdef USB_ENDPOINTS_ARE_REORDERABLE
# define CDC_OUT_EPNUM CDC_IN_EPNUM
# else
CDC_OUT_EPNUM = NEXT_EPNUM,
@@ -264,7 +267,7 @@ enum usb_endpoints {
#endif
#ifdef JOYSTICK_ENABLE
JOYSTICK_IN_EPNUM = NEXT_EPNUM,
-# if STM32_USB_USE_OTG1
+# ifdef USB_ENDPOINTS_ARE_REORDERABLE
JOYSTICK_OUT_EPNUM = JOYSTICK_IN_EPNUM,
# else
JOYSTICK_OUT_EPNUM = NEXT_EPNUM,
@@ -274,7 +277,7 @@ enum usb_endpoints {
#ifdef DIGITIZER_ENABLE
# if !defined(DIGITIZER_SHARED_EP)
DIGITIZER_IN_EPNUM = NEXT_EPNUM,
-# if STM32_USB_USE_OTG1
+# ifdef USB_ENDPOINTS_ARE_REORDERABLE
DIGITIZER_OUT_EPNUM = DIGITIZER_IN_EPNUM,
# else
DIGITIZER_OUT_EPNUM = NEXT_EPNUM,