aboutsummaryrefslogtreecommitdiff
path: root/tmk_core
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2020-12-18 01:06:30 +1100
committerGitHub <noreply@github.com>2020-12-17 14:06:30 +0000
commit6ea4b06f9fc19825605477cdc27f5bec0f3dc0a9 (patch)
treea5266a6ea24a9dfa1627c0273a24198c5a436b3a /tmk_core
parentd9dcb716bfa9eef32560a95ecb50274a0f2b170c (diff)
downloadqmk_firmware-6ea4b06f9fc19825605477cdc27f5bec0f3dc0a9.tar.gz
qmk_firmware-6ea4b06f9fc19825605477cdc27f5bec0f3dc0a9.zip
Run cformat and dos2unix manually (#11235)
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/protocol/arm_atsam/usb/udi_device_conf.h4
-rw-r--r--tmk_core/protocol/arm_atsam/usb/udi_hid_kbd_desc.c4
-rw-r--r--tmk_core/protocol/chibios/usb_main.c222
-rw-r--r--tmk_core/protocol/usb_descriptor.h52
4 files changed, 141 insertions, 141 deletions
diff --git a/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h b/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h
index 505db47b0..9c9d94789 100644
--- a/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h
+++ b/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h
@@ -291,7 +291,7 @@ typedef struct {
291extern uint8_t udi_hid_kbd_report_set; 291extern uint8_t udi_hid_kbd_report_set;
292 292
293// report buffer (to host) 293// report buffer (to host)
294# define UDI_HID_KBD_REPORT_SIZE 8 294#define UDI_HID_KBD_REPORT_SIZE 8
295extern uint8_t udi_hid_kbd_report[UDI_HID_KBD_REPORT_SIZE]; 295extern uint8_t udi_hid_kbd_report[UDI_HID_KBD_REPORT_SIZE];
296 296
297COMPILER_PACK_RESET() 297COMPILER_PACK_RESET()
@@ -784,7 +784,7 @@ COMPILER_PACK_RESET()
784COMPILER_PACK_SET(1) 784COMPILER_PACK_SET(1)
785 785
786typedef struct { 786typedef struct {
787 usb_conf_desc_t conf; 787 usb_conf_desc_t conf;
788 udi_hid_kbd_desc_t hid_kbd; 788 udi_hid_kbd_desc_t hid_kbd;
789#ifdef MOUSE_ENABLE 789#ifdef MOUSE_ENABLE
790 udi_hid_mou_desc_t hid_mou; 790 udi_hid_mou_desc_t hid_mou;
diff --git a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd_desc.c b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd_desc.c
index a3fb46a3d..814389b6e 100644
--- a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd_desc.c
+++ b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd_desc.c
@@ -83,7 +83,7 @@ UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc = {.bLength = sizeof(usb
83#ifdef USB_DEVICE_PRODUCT_NAME 83#ifdef USB_DEVICE_PRODUCT_NAME
84 .iProduct = 2, 84 .iProduct = 2,
85#else 85#else
86 .iProduct = 0, // No product string 86 .iProduct = 0, // No product string
87#endif 87#endif
88#if (defined USB_DEVICE_SERIAL_NAME || defined USB_DEVICE_GET_SERIAL_NAME_POINTER) 88#if (defined USB_DEVICE_SERIAL_NAME || defined USB_DEVICE_GET_SERIAL_NAME_POINTER)
89 .iSerialNumber = 3, 89 .iSerialNumber = 3,
@@ -120,7 +120,7 @@ UDC_DESC_STORAGE udc_desc_t udc_desc = {
120 .conf.iConfiguration = 0, 120 .conf.iConfiguration = 0,
121 .conf.bmAttributes = /* USB_CONFIG_ATTR_MUST_SET | */ USB_DEVICE_ATTR, 121 .conf.bmAttributes = /* USB_CONFIG_ATTR_MUST_SET | */ USB_DEVICE_ATTR,
122 .conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER), 122 .conf.bMaxPower = USB_CONFIG_MAX_POWER(USB_DEVICE_POWER),
123 .hid_kbd = UDI_HID_KBD_DESC, 123 .hid_kbd = UDI_HID_KBD_DESC,
124#ifdef RAW_ENABLE 124#ifdef RAW_ENABLE
125 .hid_raw = UDI_HID_RAW_DESC, 125 .hid_raw = UDI_HID_RAW_DESC,
126#endif 126#endif
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c
index 096e6e676..9745d147c 100644
--- a/tmk_core/protocol/chibios/usb_main.c
+++ b/tmk_core/protocol/chibios/usb_main.c
@@ -194,107 +194,107 @@ typedef struct {
194 194
195#if STM32_USB_USE_OTG1 195#if STM32_USB_USE_OTG1
196/* Reusable initialization structure - see USBEndpointConfig comment at top of file */ 196/* Reusable initialization structure - see USBEndpointConfig comment at top of file */
197#define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \ 197# define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \
198 { \ 198 { \
199 .queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \ 199 .queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \
200 .inout_ep_config = \ 200 .inout_ep_config = \
201 { \ 201 { \
202 stream##_IN_MODE, /* Interrupt EP */ \ 202 stream##_IN_MODE, /* Interrupt EP */ \
203 NULL, /* SETUP packet notification callback */ \ 203 NULL, /* SETUP packet notification callback */ \
204 qmkusbDataTransmitted, /* IN notification callback */ \ 204 qmkusbDataTransmitted, /* IN notification callback */ \
205 qmkusbDataReceived, /* OUT notification callback */ \ 205 qmkusbDataReceived, /* OUT notification callback */ \
206 stream##_EPSIZE, /* IN maximum packet size */ \ 206 stream##_EPSIZE, /* IN maximum packet size */ \
207 stream##_EPSIZE, /* OUT maximum packet size */ \ 207 stream##_EPSIZE, /* OUT maximum packet size */ \
208 NULL, /* IN Endpoint state */ \ 208 NULL, /* IN Endpoint state */ \
209 NULL, /* OUT endpoint state */ \ 209 NULL, /* OUT endpoint state */ \
210 2, /* IN multiplier */ \ 210 2, /* IN multiplier */ \
211 NULL /* SETUP buffer (not a SETUP endpoint) */ \ 211 NULL /* SETUP buffer (not a SETUP endpoint) */ \
212 }, \ 212 }, \
213 .int_ep_config = \ 213 .int_ep_config = \
214 { \ 214 { \
215 USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ \ 215 USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ \
216 NULL, /* SETUP packet notification callback */ \ 216 NULL, /* SETUP packet notification callback */ \
217 qmkusbInterruptTransmitted, /* IN notification callback */ \ 217 qmkusbInterruptTransmitted, /* IN notification callback */ \
218 NULL, /* OUT notification callback */ \ 218 NULL, /* OUT notification callback */ \
219 CDC_NOTIFICATION_EPSIZE, /* IN maximum packet size */ \ 219 CDC_NOTIFICATION_EPSIZE, /* IN maximum packet size */ \
220 0, /* OUT maximum packet size */ \ 220 0, /* OUT maximum packet size */ \
221 NULL, /* IN Endpoint state */ \ 221 NULL, /* IN Endpoint state */ \
222 NULL, /* OUT endpoint state */ \ 222 NULL, /* OUT endpoint state */ \
223 2, /* IN multiplier */ \ 223 2, /* IN multiplier */ \
224 NULL, /* SETUP buffer (not a SETUP endpoint) */ \ 224 NULL, /* SETUP buffer (not a SETUP endpoint) */ \
225 }, \ 225 }, \
226 .config = { \ 226 .config = { \
227 .usbp = &USB_DRIVER, \ 227 .usbp = &USB_DRIVER, \
228 .bulk_in = stream##_IN_EPNUM, \ 228 .bulk_in = stream##_IN_EPNUM, \
229 .bulk_out = stream##_OUT_EPNUM, \ 229 .bulk_out = stream##_OUT_EPNUM, \
230 .int_in = notification, \ 230 .int_in = notification, \
231 .in_buffers = stream##_IN_CAPACITY, \ 231 .in_buffers = stream##_IN_CAPACITY, \
232 .out_buffers = stream##_OUT_CAPACITY, \ 232 .out_buffers = stream##_OUT_CAPACITY, \
233 .in_size = stream##_EPSIZE, \ 233 .in_size = stream##_EPSIZE, \
234 .out_size = stream##_EPSIZE, \ 234 .out_size = stream##_EPSIZE, \
235 .fixed_size = fixedsize, \ 235 .fixed_size = fixedsize, \
236 .ib = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \ 236 .ib = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \
237 .ob = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \ 237 .ob = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \
238 } \ 238 } \
239 } 239 }
240#else 240#else
241/* Reusable initialization structure - see USBEndpointConfig comment at top of file */ 241/* Reusable initialization structure - see USBEndpointConfig comment at top of file */
242#define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \ 242# define QMK_USB_DRIVER_CONFIG(stream, notification, fixedsize) \
243 { \ 243 { \
244 .queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \ 244 .queue_capacity_in = stream##_IN_CAPACITY, .queue_capacity_out = stream##_OUT_CAPACITY, \
245 .in_ep_config = \ 245 .in_ep_config = \
246 { \ 246 { \
247 stream##_IN_MODE, /* Interrupt EP */ \ 247 stream##_IN_MODE, /* Interrupt EP */ \
248 NULL, /* SETUP packet notification callback */ \ 248 NULL, /* SETUP packet notification callback */ \
249 qmkusbDataTransmitted, /* IN notification callback */ \ 249 qmkusbDataTransmitted, /* IN notification callback */ \
250 NULL, /* OUT notification callback */ \ 250 NULL, /* OUT notification callback */ \
251 stream##_EPSIZE, /* IN maximum packet size */ \ 251 stream##_EPSIZE, /* IN maximum packet size */ \
252 0, /* OUT maximum packet size */ \ 252 0, /* OUT maximum packet size */ \
253 NULL, /* IN Endpoint state */ \ 253 NULL, /* IN Endpoint state */ \
254 NULL, /* OUT endpoint state */ \ 254 NULL, /* OUT endpoint state */ \
255 2, /* IN multiplier */ \ 255 2, /* IN multiplier */ \
256 NULL /* SETUP buffer (not a SETUP endpoint) */ \ 256 NULL /* SETUP buffer (not a SETUP endpoint) */ \
257 }, \ 257 }, \
258 .out_ep_config = \ 258 .out_ep_config = \
259 { \ 259 { \
260 stream##_OUT_MODE, /* Interrupt EP */ \ 260 stream##_OUT_MODE, /* Interrupt EP */ \
261 NULL, /* SETUP packet notification callback */ \ 261 NULL, /* SETUP packet notification callback */ \
262 NULL, /* IN notification callback */ \ 262 NULL, /* IN notification callback */ \
263 qmkusbDataReceived, /* OUT notification callback */ \ 263 qmkusbDataReceived, /* OUT notification callback */ \
264 0, /* IN maximum packet size */ \ 264 0, /* IN maximum packet size */ \
265 stream##_EPSIZE, /* OUT maximum packet size */ \ 265 stream##_EPSIZE, /* OUT maximum packet size */ \
266 NULL, /* IN Endpoint state */ \ 266 NULL, /* IN Endpoint state */ \
267 NULL, /* OUT endpoint state */ \ 267 NULL, /* OUT endpoint state */ \
268 2, /* IN multiplier */ \ 268 2, /* IN multiplier */ \
269 NULL, /* SETUP buffer (not a SETUP endpoint) */ \ 269 NULL, /* SETUP buffer (not a SETUP endpoint) */ \
270 }, \ 270 }, \
271 .int_ep_config = \ 271 .int_ep_config = \
272 { \ 272 { \
273 USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ \ 273 USB_EP_MODE_TYPE_INTR, /* Interrupt EP */ \
274 NULL, /* SETUP packet notification callback */ \ 274 NULL, /* SETUP packet notification callback */ \
275 qmkusbInterruptTransmitted, /* IN notification callback */ \ 275 qmkusbInterruptTransmitted, /* IN notification callback */ \
276 NULL, /* OUT notification callback */ \ 276 NULL, /* OUT notification callback */ \
277 CDC_NOTIFICATION_EPSIZE, /* IN maximum packet size */ \ 277 CDC_NOTIFICATION_EPSIZE, /* IN maximum packet size */ \
278 0, /* OUT maximum packet size */ \ 278 0, /* OUT maximum packet size */ \
279 NULL, /* IN Endpoint state */ \ 279 NULL, /* IN Endpoint state */ \
280 NULL, /* OUT endpoint state */ \ 280 NULL, /* OUT endpoint state */ \
281 2, /* IN multiplier */ \ 281 2, /* IN multiplier */ \
282 NULL, /* SETUP buffer (not a SETUP endpoint) */ \ 282 NULL, /* SETUP buffer (not a SETUP endpoint) */ \
283 }, \ 283 }, \
284 .config = { \ 284 .config = { \
285 .usbp = &USB_DRIVER, \ 285 .usbp = &USB_DRIVER, \
286 .bulk_in = stream##_IN_EPNUM, \ 286 .bulk_in = stream##_IN_EPNUM, \
287 .bulk_out = stream##_OUT_EPNUM, \ 287 .bulk_out = stream##_OUT_EPNUM, \
288 .int_in = notification, \ 288 .int_in = notification, \
289 .in_buffers = stream##_IN_CAPACITY, \ 289 .in_buffers = stream##_IN_CAPACITY, \
290 .out_buffers = stream##_OUT_CAPACITY, \ 290 .out_buffers = stream##_OUT_CAPACITY, \
291 .in_size = stream##_EPSIZE, \ 291 .in_size = stream##_EPSIZE, \
292 .out_size = stream##_EPSIZE, \ 292 .out_size = stream##_EPSIZE, \
293 .fixed_size = fixedsize, \ 293 .fixed_size = fixedsize, \
294 .ib = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \ 294 .ib = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_IN_CAPACITY, stream##_EPSIZE)]){}, \
295 .ob = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \ 295 .ob = (__attribute__((aligned(4))) uint8_t[BQ_BUFFER_SIZE(stream##_OUT_CAPACITY, stream##_EPSIZE)]){}, \
296 } \ 296 } \
297 } 297 }
298#endif 298#endif
299 299
300typedef struct { 300typedef struct {
@@ -388,12 +388,12 @@ static void usb_event_cb(USBDriver *usbp, usbevent_t event) {
388 usbInitEndpointI(usbp, SHARED_IN_EPNUM, &shared_ep_config); 388 usbInitEndpointI(usbp, SHARED_IN_EPNUM, &shared_ep_config);
389#endif 389#endif
390 for (int i = 0; i < NUM_USB_DRIVERS; i++) { 390 for (int i = 0; i < NUM_USB_DRIVERS; i++) {
391 #if STM32_USB_USE_OTG1 391#if STM32_USB_USE_OTG1
392 usbInitEndpointI(usbp, drivers.array[i].config.bulk_in, &drivers.array[i].inout_ep_config); 392 usbInitEndpointI(usbp, drivers.array[i].config.bulk_in, &drivers.array[i].inout_ep_config);
393 #else 393#else
394 usbInitEndpointI(usbp, drivers.array[i].config.bulk_in, &drivers.array[i].in_ep_config); 394 usbInitEndpointI(usbp, drivers.array[i].config.bulk_in, &drivers.array[i].in_ep_config);
395 usbInitEndpointI(usbp, drivers.array[i].config.bulk_out, &drivers.array[i].out_ep_config); 395 usbInitEndpointI(usbp, drivers.array[i].config.bulk_out, &drivers.array[i].out_ep_config);
396 #endif 396#endif
397 if (drivers.array[i].config.int_in) { 397 if (drivers.array[i].config.int_in) {
398 usbInitEndpointI(usbp, drivers.array[i].config.int_in, &drivers.array[i].int_ep_config); 398 usbInitEndpointI(usbp, drivers.array[i].config.int_in, &drivers.array[i].int_ep_config);
399 } 399 }
@@ -544,7 +544,7 @@ static bool usb_request_hook_cb(USBDriver *usbp) {
544#ifdef NKRO_ENABLE 544#ifdef NKRO_ENABLE
545 keymap_config.nkro = !!keyboard_protocol; 545 keymap_config.nkro = !!keyboard_protocol;
546 if (!keymap_config.nkro && keyboard_idle) { 546 if (!keymap_config.nkro && keyboard_idle) {
547#else /* NKRO_ENABLE */ 547#else /* NKRO_ENABLE */
548 if (keyboard_idle) { 548 if (keyboard_idle) {
549#endif /* NKRO_ENABLE */ 549#endif /* NKRO_ENABLE */
550 /* arm the idle timer if boot protocol & idle */ 550 /* arm the idle timer if boot protocol & idle */
@@ -562,7 +562,7 @@ static bool usb_request_hook_cb(USBDriver *usbp) {
562 /* arm the timer */ 562 /* arm the timer */
563#ifdef NKRO_ENABLE 563#ifdef NKRO_ENABLE
564 if (!keymap_config.nkro && keyboard_idle) { 564 if (!keymap_config.nkro && keyboard_idle) {
565#else /* NKRO_ENABLE */ 565#else /* NKRO_ENABLE */
566 if (keyboard_idle) { 566 if (keyboard_idle) {
567#endif /* NKRO_ENABLE */ 567#endif /* NKRO_ENABLE */
568 osalSysLockFromISR(); 568 osalSysLockFromISR();
@@ -618,21 +618,21 @@ static const USBConfig usbcfg = {
618 */ 618 */
619void init_usb_driver(USBDriver *usbp) { 619void init_usb_driver(USBDriver *usbp) {
620 for (int i = 0; i < NUM_USB_DRIVERS; i++) { 620 for (int i = 0; i < NUM_USB_DRIVERS; i++) {
621 #if STM32_USB_USE_OTG1 621#if STM32_USB_USE_OTG1
622 QMKUSBDriver *driver = &drivers.array[i].driver; 622 QMKUSBDriver *driver = &drivers.array[i].driver;
623 drivers.array[i].inout_ep_config.in_state = &drivers.array[i].in_ep_state; 623 drivers.array[i].inout_ep_config.in_state = &drivers.array[i].in_ep_state;
624 drivers.array[i].inout_ep_config.out_state = &drivers.array[i].out_ep_state; 624 drivers.array[i].inout_ep_config.out_state = &drivers.array[i].out_ep_state;
625 drivers.array[i].int_ep_config.in_state = &drivers.array[i].int_ep_state; 625 drivers.array[i].int_ep_config.in_state = &drivers.array[i].int_ep_state;
626 qmkusbObjectInit(driver, &drivers.array[i].config); 626 qmkusbObjectInit(driver, &drivers.array[i].config);
627 qmkusbStart(driver, &drivers.array[i].config); 627 qmkusbStart(driver, &drivers.array[i].config);
628 #else 628#else
629 QMKUSBDriver *driver = &drivers.array[i].driver; 629 QMKUSBDriver *driver = &drivers.array[i].driver;
630 drivers.array[i].in_ep_config.in_state = &drivers.array[i].in_ep_state; 630 drivers.array[i].in_ep_config.in_state = &drivers.array[i].in_ep_state;
631 drivers.array[i].out_ep_config.out_state = &drivers.array[i].out_ep_state; 631 drivers.array[i].out_ep_config.out_state = &drivers.array[i].out_ep_state;
632 drivers.array[i].int_ep_config.in_state = &drivers.array[i].int_ep_state; 632 drivers.array[i].int_ep_config.in_state = &drivers.array[i].int_ep_state;
633 qmkusbObjectInit(driver, &drivers.array[i].config); 633 qmkusbObjectInit(driver, &drivers.array[i].config);
634 qmkusbStart(driver, &drivers.array[i].config); 634 qmkusbStart(driver, &drivers.array[i].config);
635 #endif 635#endif
636 } 636 }
637 637
638 /* 638 /*
@@ -689,7 +689,7 @@ static void keyboard_idle_timer_cb(void *arg) {
689 689
690#ifdef NKRO_ENABLE 690#ifdef NKRO_ENABLE
691 if (!keymap_config.nkro && keyboard_idle && keyboard_protocol) { 691 if (!keymap_config.nkro && keyboard_idle && keyboard_protocol) {
692#else /* NKRO_ENABLE */ 692#else /* NKRO_ENABLE */
693 if (keyboard_idle && keyboard_protocol) { 693 if (keyboard_idle && keyboard_protocol) {
694#endif /* NKRO_ENABLE */ 694#endif /* NKRO_ENABLE */
695 /* TODO: are we sure we want the KBD_ENDPOINT? */ 695 /* TODO: are we sure we want the KBD_ENDPOINT? */
@@ -738,7 +738,7 @@ void send_keyboard(report_keyboard_t *report) {
738 usbStartTransmitI(&USB_DRIVER, SHARED_IN_EPNUM, (uint8_t *)report, sizeof(struct nkro_report)); 738 usbStartTransmitI(&USB_DRIVER, SHARED_IN_EPNUM, (uint8_t *)report, sizeof(struct nkro_report));
739 } else 739 } else
740#endif /* NKRO_ENABLE */ 740#endif /* NKRO_ENABLE */
741 { /* regular protocol */ 741 { /* regular protocol */
742 /* need to wait until the previous packet has made it through */ 742 /* need to wait until the previous packet has made it through */
743 /* busy wait, should be short and not very common */ 743 /* busy wait, should be short and not very common */
744 if (usbGetTransmitStatusI(&USB_DRIVER, KEYBOARD_IN_EPNUM)) { 744 if (usbGetTransmitStatusI(&USB_DRIVER, KEYBOARD_IN_EPNUM)) {
@@ -805,7 +805,7 @@ void send_mouse(report_mouse_t *report) {
805 osalSysUnlock(); 805 osalSysUnlock();
806} 806}
807 807
808#else /* MOUSE_ENABLE */ 808#else /* MOUSE_ENABLE */
809void send_mouse(report_mouse_t *report) { (void)report; } 809void send_mouse(report_mouse_t *report) { (void)report; }
810#endif /* MOUSE_ENABLE */ 810#endif /* MOUSE_ENABLE */
811 811
@@ -885,7 +885,7 @@ void console_task(void) {
885 } while (size > 0); 885 } while (size > 0);
886} 886}
887 887
888#else /* CONSOLE_ENABLE */ 888#else /* CONSOLE_ENABLE */
889int8_t sendchar(uint8_t c) { 889int8_t sendchar(uint8_t c) {
890 (void)c; 890 (void)c;
891 return 0; 891 return 0;
diff --git a/tmk_core/protocol/usb_descriptor.h b/tmk_core/protocol/usb_descriptor.h
index 1b43cbf3b..3a7c0bdba 100644
--- a/tmk_core/protocol/usb_descriptor.h
+++ b/tmk_core/protocol/usb_descriptor.h
@@ -204,12 +204,12 @@ enum usb_endpoints {
204#endif 204#endif
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 208# if STM32_USB_USE_OTG1
209 #define RAW_OUT_EPNUM RAW_IN_EPNUM 209# define RAW_OUT_EPNUM RAW_IN_EPNUM
210 #else 210# else
211 RAW_OUT_EPNUM = NEXT_EPNUM, 211 RAW_OUT_EPNUM = NEXT_EPNUM,
212 #endif 212# endif
213#endif 213#endif
214 214
215#ifdef SHARED_EP_ENABLE 215#ifdef SHARED_EP_ENABLE
@@ -220,44 +220,44 @@ enum usb_endpoints {
220 CONSOLE_IN_EPNUM = NEXT_EPNUM, 220 CONSOLE_IN_EPNUM = NEXT_EPNUM,
221 221
222# ifdef PROTOCOL_CHIBIOS 222# ifdef PROTOCOL_CHIBIOS
223 // ChibiOS has enough memory and descriptor to actually enable the endpoint 223// ChibiOS has enough memory and descriptor to actually enable the endpoint
224 // 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
225 // 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 226# if STM32_USB_USE_OTG1
227 #define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM 227# define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM
228 #else 228# else
229 CONSOLE_OUT_EPNUM = NEXT_EPNUM, 229 CONSOLE_OUT_EPNUM = NEXT_EPNUM,
230 #endif 230# endif
231# else 231# else
232# define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM 232# define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM
233# endif 233# endif
234#endif 234#endif
235 235
236#ifdef MIDI_ENABLE 236#ifdef MIDI_ENABLE
237 MIDI_STREAM_IN_EPNUM = NEXT_EPNUM, 237 MIDI_STREAM_IN_EPNUM = NEXT_EPNUM,
238 #if STM32_USB_USE_OTG1 238# if STM32_USB_USE_OTG1
239 #define MIDI_STREAM_OUT_EPNUM MIDI_STREAM_IN_EPNUM 239# define MIDI_STREAM_OUT_EPNUM MIDI_STREAM_IN_EPNUM
240 #else 240# else
241 MIDI_STREAM_OUT_EPNUM = NEXT_EPNUM, 241 MIDI_STREAM_OUT_EPNUM = NEXT_EPNUM,
242 #endif 242# endif
243#endif 243#endif
244 244
245#ifdef VIRTSER_ENABLE 245#ifdef VIRTSER_ENABLE
246 CDC_NOTIFICATION_EPNUM = NEXT_EPNUM, 246 CDC_NOTIFICATION_EPNUM = NEXT_EPNUM,
247 CDC_IN_EPNUM = NEXT_EPNUM, 247 CDC_IN_EPNUM = NEXT_EPNUM,
248 #if STM32_USB_USE_OTG1 248# if STM32_USB_USE_OTG1
249 #define CDC_OUT_EPNUM CDC_IN_EPNUM 249# define CDC_OUT_EPNUM CDC_IN_EPNUM
250 #else 250# else
251 CDC_OUT_EPNUM = NEXT_EPNUM, 251 CDC_OUT_EPNUM = NEXT_EPNUM,
252 #endif 252# endif
253#endif 253#endif
254#ifdef JOYSTICK_ENABLE 254#ifdef JOYSTICK_ENABLE
255 JOYSTICK_IN_EPNUM = NEXT_EPNUM, 255 JOYSTICK_IN_EPNUM = NEXT_EPNUM,
256 #if STM32_USB_USE_OTG1 256# if STM32_USB_USE_OTG1
257 JOYSTICK_OUT_EPNUM = JOYSTICK_IN_EPNUM, 257 JOYSTICK_OUT_EPNUM = JOYSTICK_IN_EPNUM,
258 #else 258# else
259 JOYSTICK_OUT_EPNUM = NEXT_EPNUM, 259 JOYSTICK_OUT_EPNUM = NEXT_EPNUM,
260 #endif 260# endif
261#endif 261#endif
262}; 262};
263 263