From 543f54a483842474d2333581597dd4691bb77fac Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 4 Aug 2022 21:05:16 +1000 Subject: [Core] `STM32_USB_USE_OTG1` => `USB_ENDPOINTS_ARE_REORDERABLE` (#17647) --- tmk_core/protocol/usb_descriptor.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'tmk_core/protocol/usb_descriptor.h') 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 +# 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, -- cgit v1.2.3