diff options
Diffstat (limited to 'supervisor/shared/usb/usb.c')
| -rw-r--r-- | supervisor/shared/usb/usb.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/supervisor/shared/usb/usb.c b/supervisor/shared/usb/usb.c index af34f2598..9cbb295c8 100644 --- a/supervisor/shared/usb/usb.c +++ b/supervisor/shared/usb/usb.c @@ -93,16 +93,21 @@ void usb_background(void) { } } -/*static*/ background_callback_t usb_callback; -/*static*/ void usb_background_do(void* unused) { +static background_callback_t usb_callback; +static void usb_background_do(void* unused) { usb_background(); } -void usb_irq_handler(void) { - tud_int_handler(0); \ +void usb_background_schedule(void) +{ background_callback_add(&usb_callback, usb_background_do, NULL); } +void usb_irq_handler(void) { + tud_int_handler(0); + usb_background_schedule(); +} + //--------------------------------------------------------------------+ // tinyusb callbacks //--------------------------------------------------------------------+ |
