add msec timeout to osal_queue_receive(), tud_task() and tuh_task() both pending for event queue with timeout of 1 ms

This commit is contained in:
hathach
2022-04-20 13:25:38 +07:00
parent 9c8c5c1c53
commit a90839688c
11 changed files with 109 additions and 101 deletions

View File

@@ -475,8 +475,7 @@ void tud_task (void)
while (1)
{
dcd_event_t event;
if ( !osal_queue_receive(_usbd_q, &event) ) return;
if ( !osal_queue_receive(_usbd_q, &event, 1) ) return;
#if CFG_TUSB_DEBUG >= 2
if (event.event_id == DCD_EVENT_SETUP_RECEIVED) TU_LOG2("\r\n"); // extra line for setup