From 97c5151b34158f08fbfb51684cbfbc807abd77e5 Mon Sep 17 00:00:00 2001 From: HiFiPhile Date: Fri, 28 Nov 2025 13:27:09 +0100 Subject: Update note Signed-off-by: HiFiPhile --- src/device/usbd.h | 2 ++ src/host/usbh.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src') diff --git a/src/device/usbd.h b/src/device/usbd.h index c446638c3..3cf195452 100644 --- a/src/device/usbd.h +++ b/src/device/usbd.h @@ -38,6 +38,7 @@ extern "C" { //--------------------------------------------------------------------+ // New API to replace tud_init() to init device stack on specific roothub port +// Must be called in the same task/context as tud_task() if RTOS is used bool tud_rhport_init(uint8_t rhport, const tusb_rhport_init_t* rh_init); // Init device stack on roothub port @@ -53,6 +54,7 @@ TU_ATTR_ALWAYS_INLINE static inline bool tud_init (uint8_t rhport) { } // Deinit device stack on roothub port +// Must be called in the same task/context as tud_task() if RTOS is used bool tud_deinit(uint8_t rhport); // Check if device stack is already initialized diff --git a/src/host/usbh.h b/src/host/usbh.h index 697c911ff..d86efbcb2 100644 --- a/src/host/usbh.h +++ b/src/host/usbh.h @@ -150,6 +150,7 @@ void tuh_event_hook_cb(uint8_t rhport, uint32_t eventid, bool in_isr); bool tuh_configure(uint8_t rhport, uint32_t cfg_id, const void* cfg_param); // New API to replace tuh_init() to init host stack on specific roothub port +// Must be called in the same task/context as tuh_task() if RTOS is used bool tuh_rhport_init(uint8_t rhport, const tusb_rhport_init_t* rh_init); // Init host stack @@ -165,6 +166,7 @@ TU_ATTR_ALWAYS_INLINE static inline bool tuh_init(uint8_t rhport) { } // Deinit host stack on rhport +// Must be called in the same task/context as tuh_task() if RTOS is used bool tuh_deinit(uint8_t rhport); // Check if host stack is already initialized with any roothub ports -- cgit v1.3.1