diff options
author | QMK Bot <hello@qmk.fm> | 2021-10-23 04:04:47 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2021-10-23 04:04:47 +0000 |
commit | 3b04425f1abe61d773b34285ff8093496c7243cb (patch) | |
tree | 4210b2cf06c3635e786336e2a7bf65cb43b8d3e5 /tmk_core | |
parent | 203b87a7d550c5ec48e6017519e09bb7f23482a3 (diff) | |
parent | 1953a968c51630cc2badfade9ee54f59c878b422 (diff) | |
download | qmk_firmware-3b04425f1abe61d773b34285ff8093496c7243cb.tar.gz qmk_firmware-3b04425f1abe61d773b34285ff8093496c7243cb.zip |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'tmk_core')
-rw-r--r-- | tmk_core/protocol/chibios/usb_main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 9b139b399..3b16a0ff7 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c | |||
@@ -934,6 +934,17 @@ static void send_extra(uint8_t report_id, uint16_t data) { | |||
934 | return; | 934 | return; |
935 | } | 935 | } |
936 | 936 | ||
937 | if (usbGetTransmitStatusI(&USB_DRIVER, SHARED_IN_EPNUM)) { | ||
938 | /* Need to either suspend, or loop and call unlock/lock during | ||
939 | * every iteration - otherwise the system will remain locked, | ||
940 | * no interrupts served, so USB not going through as well. | ||
941 | * Note: for suspend, need USB_USE_WAIT == TRUE in halconf.h */ | ||
942 | if (osalThreadSuspendTimeoutS(&(&USB_DRIVER)->epc[SHARED_IN_EPNUM]->in_state->thread, TIME_MS2I(10)) == MSG_TIMEOUT) { | ||
943 | osalSysUnlock(); | ||
944 | return; | ||
945 | } | ||
946 | } | ||
947 | |||
937 | static report_extra_t report; | 948 | static report_extra_t report; |
938 | report = (report_extra_t){.report_id = report_id, .usage = data}; | 949 | report = (report_extra_t){.report_id = report_id, .usage = data}; |
939 | 950 | ||