From 7c4a2fab6d78e2f59f477bf75690a12c233b0ea7 Mon Sep 17 00:00:00 2001 From: flabbergast Date: Sat, 17 Oct 2015 18:18:47 +0100 Subject: [PATCH] Chibios/usb_main: rename a variable for clarity. --- tmk_core/protocol/chibios/usb_main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 0fc2f6e3..1ce5b4ae 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -1121,24 +1121,26 @@ void send_keyboard(report_keyboard_t *report) { } osalSysUnlock(); - bool ret; + bool ep_not_ready; #ifdef NKRO_ENABLE if(keyboard_nkro) { /* NKRO protocol */ usbPrepareTransmit(&USB_DRIVER, NKRO_ENDPOINT, (uint8_t *)report, sizeof(report_keyboard_t)); + /* need to wait until the previous packet has made it through */ do { osalSysLock(); - ret = usbStartTransmitI(&USB_DRIVER, NKRO_ENDPOINT); + ep_not_ready = usbStartTransmitI(&USB_DRIVER, NKRO_ENDPOINT); osalSysUnlock(); - } while (ret); + } while (ep_not_ready); } else #endif /* NKRO_ENABLE */ { /* boot protocol */ usbPrepareTransmit(&USB_DRIVER, KBD_ENDPOINT, (uint8_t *)report, KBD_EPSIZE); + /* need to wait until the previous packet has made it through */ do { osalSysLock(); - ret = usbStartTransmitI(&USB_DRIVER, KBD_ENDPOINT); + ep_not_ready = usbStartTransmitI(&USB_DRIVER, KBD_ENDPOINT); osalSysUnlock(); - } while (ret); + } while (ep_not_ready); } keyboard_report_sent = *report; } -- 2.39.3