|
@@ -47,6 +47,9 @@
|
|
|
|
|
|
#ifdef PROTOCOL_CHIBIOS
|
|
#ifdef PROTOCOL_CHIBIOS
|
|
# include <hal.h>
|
|
# include <hal.h>
|
|
|
|
+# if STM32_USB_USE_OTG1 == TRUE
|
|
|
|
+# define USB_ENDPOINTS_ARE_REORDERABLE
|
|
|
|
+# endif
|
|
#endif
|
|
#endif
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -216,7 +219,7 @@ enum usb_endpoints {
|
|
|
|
|
|
#ifdef RAW_ENABLE
|
|
#ifdef RAW_ENABLE
|
|
RAW_IN_EPNUM = NEXT_EPNUM,
|
|
RAW_IN_EPNUM = NEXT_EPNUM,
|
|
-# if STM32_USB_USE_OTG1
|
|
+# ifdef USB_ENDPOINTS_ARE_REORDERABLE
|
|
# define RAW_OUT_EPNUM RAW_IN_EPNUM
|
|
# define RAW_OUT_EPNUM RAW_IN_EPNUM
|
|
# else
|
|
# else
|
|
RAW_OUT_EPNUM = NEXT_EPNUM,
|
|
RAW_OUT_EPNUM = NEXT_EPNUM,
|
|
@@ -234,7 +237,7 @@ enum usb_endpoints {
|
|
// ChibiOS has enough memory and descriptor to actually enable the endpoint
|
|
// ChibiOS has enough memory and descriptor to actually enable the endpoint
|
|
// It could use the same endpoint numbers, as that's supported by ChibiOS
|
|
// 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
|
|
// 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
|
|
# define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM
|
|
# else
|
|
# else
|
|
CONSOLE_OUT_EPNUM = NEXT_EPNUM,
|
|
CONSOLE_OUT_EPNUM = NEXT_EPNUM,
|
|
@@ -246,7 +249,7 @@ enum usb_endpoints {
|
|
|
|
|
|
#ifdef MIDI_ENABLE
|
|
#ifdef MIDI_ENABLE
|
|
MIDI_STREAM_IN_EPNUM = NEXT_EPNUM,
|
|
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
|
|
# define MIDI_STREAM_OUT_EPNUM MIDI_STREAM_IN_EPNUM
|
|
# else
|
|
# else
|
|
MIDI_STREAM_OUT_EPNUM = NEXT_EPNUM,
|
|
MIDI_STREAM_OUT_EPNUM = NEXT_EPNUM,
|
|
@@ -256,7 +259,7 @@ enum usb_endpoints {
|
|
#ifdef VIRTSER_ENABLE
|
|
#ifdef VIRTSER_ENABLE
|
|
CDC_NOTIFICATION_EPNUM = NEXT_EPNUM,
|
|
CDC_NOTIFICATION_EPNUM = NEXT_EPNUM,
|
|
CDC_IN_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
|
|
# define CDC_OUT_EPNUM CDC_IN_EPNUM
|
|
# else
|
|
# else
|
|
CDC_OUT_EPNUM = NEXT_EPNUM,
|
|
CDC_OUT_EPNUM = NEXT_EPNUM,
|
|
@@ -264,7 +267,7 @@ enum usb_endpoints {
|
|
#endif
|
|
#endif
|
|
#ifdef JOYSTICK_ENABLE
|
|
#ifdef JOYSTICK_ENABLE
|
|
JOYSTICK_IN_EPNUM = NEXT_EPNUM,
|
|
JOYSTICK_IN_EPNUM = NEXT_EPNUM,
|
|
-# if STM32_USB_USE_OTG1
|
|
+# ifdef USB_ENDPOINTS_ARE_REORDERABLE
|
|
JOYSTICK_OUT_EPNUM = JOYSTICK_IN_EPNUM,
|
|
JOYSTICK_OUT_EPNUM = JOYSTICK_IN_EPNUM,
|
|
# else
|
|
# else
|
|
JOYSTICK_OUT_EPNUM = NEXT_EPNUM,
|
|
JOYSTICK_OUT_EPNUM = NEXT_EPNUM,
|
|
@@ -274,7 +277,7 @@ enum usb_endpoints {
|
|
#ifdef DIGITIZER_ENABLE
|
|
#ifdef DIGITIZER_ENABLE
|
|
# if !defined(DIGITIZER_SHARED_EP)
|
|
# if !defined(DIGITIZER_SHARED_EP)
|
|
DIGITIZER_IN_EPNUM = NEXT_EPNUM,
|
|
DIGITIZER_IN_EPNUM = NEXT_EPNUM,
|
|
-# if STM32_USB_USE_OTG1
|
|
+# ifdef USB_ENDPOINTS_ARE_REORDERABLE
|
|
DIGITIZER_OUT_EPNUM = DIGITIZER_IN_EPNUM,
|
|
DIGITIZER_OUT_EPNUM = DIGITIZER_IN_EPNUM,
|
|
# else
|
|
# else
|
|
DIGITIZER_OUT_EPNUM = NEXT_EPNUM,
|
|
DIGITIZER_OUT_EPNUM = NEXT_EPNUM,
|