summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorhathach <[email protected]>2022-04-20 13:25:38 +0700
committerhathach <[email protected]>2022-04-20 13:25:38 +0700
commita90839688c11338451729838e45ae3aaa58864fe (patch)
treeac572a052f4bd242d39b89376d11255f69de5dc4 /src/device
parent9c8c5c1c53214b8954bb28c33a496b5b423d5ecc (diff)
add msec timeout to osal_queue_receive(), tud_task() and tuh_task() both pending for event queue with timeout of 1 ms
Diffstat (limited to 'src/device')
-rw-r--r--src/device/usbd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index 7ab2660f4..36b9c7cff 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -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