mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-14 18:40:37 +00:00
Merge pull request #1662 from Erlkoenig90/check-usbd-queue-overflow
Check for event queue overflow in usbd / dcd_event_handler
This commit is contained in:
commit
f3781a45d8
@ -296,9 +296,9 @@ tu_static osal_queue_t _usbd_q;
|
||||
#endif
|
||||
|
||||
TU_ATTR_ALWAYS_INLINE static inline bool queue_event(dcd_event_t const * event, bool in_isr) {
|
||||
bool ret = osal_queue_send(_usbd_q, event, in_isr);
|
||||
TU_ASSERT(osal_queue_send(_usbd_q, event, in_isr));
|
||||
tud_event_hook_cb(event->rhport, event->event_id, in_isr);
|
||||
return ret;
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
|
@ -288,9 +288,9 @@ TU_ATTR_WEAK void osal_task_delay(uint32_t msec) {
|
||||
#endif
|
||||
|
||||
TU_ATTR_ALWAYS_INLINE static inline bool queue_event(hcd_event_t const * event, bool in_isr) {
|
||||
bool ret = osal_queue_send(_usbh_q, event, in_isr);
|
||||
TU_ASSERT(osal_queue_send(_usbh_q, event, in_isr));
|
||||
tuh_event_hook_cb(event->rhport, event->event_id, in_isr);
|
||||
return ret;
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
|
@ -180,7 +180,6 @@ TU_ATTR_ALWAYS_INLINE static inline bool osal_queue_send(osal_queue_t qhdl, void
|
||||
_osal_q_unlock(qhdl);
|
||||
}
|
||||
|
||||
TU_ASSERT(success);
|
||||
return success;
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,6 @@ TU_ATTR_ALWAYS_INLINE static inline bool osal_queue_send(osal_queue_t qhdl, void
|
||||
bool success = tu_fifo_write(&qhdl->ff, data);
|
||||
critical_section_exit(&qhdl->critsec);
|
||||
|
||||
TU_ASSERT(success);
|
||||
return success;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user