summaryrefslogtreecommitdiff
path: root/src/device/usbd.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-11-24 18:21:24 +0700
committerhathach <[email protected]>2023-11-24 18:21:24 +0700
commit188fbd8ed9b5e0f5cc3ddb5e89f7afd421fc7c06 (patch)
treed1bb915fbc21a6ec2ef59ac083e4db1a388d733d /src/device/usbd.h
parent111b21e76703ee0d2d0190c349b1aa3d797a72e5 (diff)
add optional event hook callback tud_event_hook_cb() and tuh_event_hook_cb()
Diffstat (limited to 'src/device/usbd.h')
-rw-r--r--src/device/usbd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/device/usbd.h b/src/device/usbd.h
index 93a2033c4..1e2f31b06 100644
--- a/src/device/usbd.h
+++ b/src/device/usbd.h
@@ -146,6 +146,9 @@ TU_ATTR_WEAK void tud_suspend_cb(bool remote_wakeup_en);
// Invoked when usb bus is resumed
TU_ATTR_WEAK void tud_resume_cb(void);
+// Invoked when there is a new usb event, which need to be processed by tud_task()/tud_task_ext()
+TU_ATTR_WEAK void tud_event_hook_cb(uint8_t rhport, uint32_t eventid, bool in_isr);
+
// Invoked when received control request with VENDOR TYPE
TU_ATTR_WEAK bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t const * request);