add TU_ASSERT() to check for adding new usb event

This commit is contained in:
hathach
2024-04-16 10:40:24 +07:00
parent 50738f2ab4
commit 189080b684
4 changed files with 4 additions and 6 deletions

View File

@@ -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;
}
//--------------------------------------------------------------------+