File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -49,12 +49,17 @@ void mp_usbd_task_callback(mp_sched_node_t *node) {
4949
5050extern void __real_dcd_event_handler (dcd_event_t const * event , bool in_isr );
5151
52+ // Provide stub for ports that don't have/need the wake main task function.
53+ void __attribute((weak )) mp_hal_wake_main_task_from_isr (void ) {
54+ }
55+
5256// If -Wl,--wrap=dcd_event_handler is passed to the linker, then this wrapper
5357// will be called and allows MicroPython to schedule the TinyUSB task when
5458// dcd_event_handler() is called from an ISR.
5559TU_ATTR_FAST_FUNC void __wrap_dcd_event_handler (dcd_event_t const * event , bool in_isr ) {
5660 __real_dcd_event_handler (event , in_isr );
5761 mp_usbd_schedule_task ();
62+ mp_hal_wake_main_task_from_isr ();
5863}
5964
6065TU_ATTR_FAST_FUNC void mp_usbd_schedule_task (void ) {
You can’t perform that action at this time.
0 commit comments