Add optional hooks for DCD and HCD events

These are intended to allow bare metal platforms with one-shot scheduling
capabilities to schedule the TinyUSB task handlers whenever they know there is
work for them to do.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
Angus Gratton
2023-11-01 15:45:44 +11:00
committed by Angus Gratton
parent 08f9ed67c9
commit 68894398af
3 changed files with 25 additions and 4 deletions

View File

@@ -780,6 +780,7 @@ void usbh_defer_func(osal_task_func_t func, void *param, bool in_isr) {
event.func_call.param = param;
osal_queue_send(_usbh_q, &event, in_isr);
CFG_TUH_EVENT_HOOK(event, in_isr);
}
//--------------------------------------------------------------------+
@@ -936,6 +937,7 @@ TU_ATTR_FAST_FUNC void hcd_event_handler(hcd_event_t const* event, bool in_isr)
}
osal_queue_send(_usbh_q, event, in_isr);
CFG_TUH_EVENT_HOOK(event, in_isr);
}
//--------------------------------------------------------------------+