Skip to content

Commit 9fa5137

Browse files
committed
Update note
Signed-off-by: HiFiPhile <[email protected]>
1 parent ae4e3c0 commit 9fa5137

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/device/usbd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ extern "C" {
3838
//--------------------------------------------------------------------+
3939

4040
// New API to replace tud_init() to init device stack on specific roothub port
41+
// Must be called in the same task/context as tud_task() if RTOS is used
4142
bool tud_rhport_init(uint8_t rhport, const tusb_rhport_init_t* rh_init);
4243

4344
// Init device stack on roothub port
@@ -53,6 +54,7 @@ TU_ATTR_ALWAYS_INLINE static inline bool tud_init (uint8_t rhport) {
5354
}
5455

5556
// Deinit device stack on roothub port
57+
// Must be called in the same task/context as tud_task() if RTOS is used
5658
bool tud_deinit(uint8_t rhport);
5759

5860
// Check if device stack is already initialized

src/host/usbh.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ void tuh_event_hook_cb(uint8_t rhport, uint32_t eventid, bool in_isr);
150150
bool tuh_configure(uint8_t rhport, uint32_t cfg_id, const void* cfg_param);
151151

152152
// New API to replace tuh_init() to init host stack on specific roothub port
153+
// Must be called in the same task/context as tuh_task() if RTOS is used
153154
bool tuh_rhport_init(uint8_t rhport, const tusb_rhport_init_t* rh_init);
154155

155156
// Init host stack
@@ -165,6 +166,7 @@ TU_ATTR_ALWAYS_INLINE static inline bool tuh_init(uint8_t rhport) {
165166
}
166167

167168
// Deinit host stack on rhport
169+
// Must be called in the same task/context as tuh_task() if RTOS is used
168170
bool tuh_deinit(uint8_t rhport);
169171

170172
// Check if host stack is already initialized with any roothub ports

0 commit comments

Comments
 (0)