Decouple USB events from the USB interrupt handler. (#10437)

This commit is contained in:
Nick Brassel 2021-02-01 08:19:00 +11:00 committed by GitHub
parent 0fa2e7c790
commit db11a2a1fd
Failed to generate hash of commit
3 changed files with 80 additions and 9 deletions

View file

@ -163,6 +163,7 @@ int main(void) {
keyboard_setup();
/* Init USB */
usb_event_queue_init();
init_usb_driver(&USB_DRIVER);
#ifdef MIDI_ENABLE
@ -221,6 +222,8 @@ int main(void) {
/* Main loop */
while (true) {
usb_event_queue_task();
#if !defined(NO_USB_STARTUP_CHECK)
if (USB_DRIVER.state == USB_SUSPENDED) {
print("[s]");