tinyusb/src/device/usbd.c
void usbd_defer_func(osal_task_func_t func, void* param, bool in_isr)
{
  dcd_event_t event =
  {
      .rhport   = 0,
      .event_id = USBD_EVT_FUNC_CALL,
  };

  event.func_call.func  = func;
  event.func_call.param = param;

  dcd_event_handler(&event, in_isr);
}
// Helper to defer an isr function

Helper to defer an isr function
Helper to defer an isr function
void usbd_defer_func(osal_task_func_t func, void* param, bool in_isr)
{
  dcd_event_t event =
  {
      .rhport   = 0,
      .event_id = USBD_EVT_FUNC_CALL,
  };
  event.func_call.func  = func;
  event.func_call.param = param;
  dcd_event_handler(&event, in_isr);
}
void usbd_defer_func ( osal_task_func_t func , void * param , bool in_isr ) { dcd_event_t event = { . rhport = 0 , . event_id = USBD_EVT_FUNC_CALL , } ; event . func_call . func = func ; event . func_call . param = param ; dcd_event_handler ( & event , in_isr ) ; }
Helper to defer an isr function
Helper to defer an isr function