diff options
| author | iabdalkader <i.abdalkader@gmail.com> | 2025-11-21 09:18:20 +0100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-11-24 12:19:12 +1100 |
| commit | db8273def84510d71cd4d3017b345d83fe8b90bc (patch) | |
| tree | 7422f7f74f061512eb97e0afd3d322087d535acd /shared/tinyusb/mp_usbd.c | |
| parent | a6864109db645045790d97b2e2b471d24a9a0560 (diff) | |
shared/tinyusb: Add macro to override TinyUSB callbacks.
Add wrapper macros that by default expand to the callback name.
Users can define this macro to add a prefix (e.g., mp_) to
callback implementations, to redirect or completely override
MicroPython's TinyUSB callbacks.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Diffstat (limited to 'shared/tinyusb/mp_usbd.c')
| -rw-r--r-- | shared/tinyusb/mp_usbd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shared/tinyusb/mp_usbd.c b/shared/tinyusb/mp_usbd.c index f03f7f7db..a21e5f027 100644 --- a/shared/tinyusb/mp_usbd.c +++ b/shared/tinyusb/mp_usbd.c @@ -44,7 +44,7 @@ void mp_usbd_task_callback(mp_sched_node_t *node) { #endif // !MICROPY_HW_ENABLE_USB_RUNTIME_DEVICE // Schedule the TinyUSB task on demand, when there is a new USB device event -TU_ATTR_FAST_FUNC void tud_event_hook_cb(uint8_t rhport, uint32_t eventid, bool in_isr) { +TU_ATTR_FAST_FUNC void MICROPY_WRAP_TUD_EVENT_HOOK_CB(tud_event_hook_cb)(uint8_t rhport, uint32_t eventid, bool in_isr) { mp_usbd_schedule_task(); mp_hal_wake_main_task_from_isr(); } |
