diff options
Diffstat (limited to 'src/device/usbd.c')
| -rw-r--r-- | src/device/usbd.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c index 06e724cb3..f7918c07e 100644 --- a/src/device/usbd.c +++ b/src/device/usbd.c @@ -339,6 +339,14 @@ static void usbd_reset(uint8_t rhport) } } +bool tud_task_event_ready(void) +{ + // Skip if stack is not initialized + if ( !tusb_inited() ) return false; + + return !osal_queue_empty(_usbd_q); +} + /* USB Device Driver task * This top level thread manages all device controller event and delegates events to class-specific drivers. * This should be called periodically within the mainloop or rtos thread. |
