diff options
| author | hathach <[email protected]> | 2025-09-15 16:45:41 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-09-15 16:45:41 +0700 |
| commit | 8e34ba9cf6bdcabe2c9eb73ae1aafec38d0ec46d (patch) | |
| tree | 58c2426146aa5d413706a62521ab6e2cb740b170 /src/tusb.h | |
| parent | 802819d271314298ea5a786a37ec6a1e65ef31d6 (diff) | |
| parent | feef534921446e1a3ded54a0c46191fe1709bdb4 (diff) | |
Merge branch 'master' into fork/ennebi/mtp
Diffstat (limited to 'src/tusb.h')
| -rw-r--r-- | src/tusb.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/tusb.h b/src/tusb.h index abe3e3c9b..6a469eef4 100644 --- a/src/tusb.h +++ b/src/tusb.h @@ -144,7 +144,7 @@ bool tusb_rhport_init(uint8_t rhport, const tusb_rhport_init_t* rh_init); // Initialize roothub port with device/host role // Note: when using with RTOS, this should be called after scheduler/kernel is started. -// Otherwise, it could cause kernel issue since USB IRQ handler does use RTOS queue API. +// Since USB IRQ handler does use RTOS queue API. // Note2: defined as macro for backward compatible with tusb_init(void), can be changed to function in the future. #if defined(TUD_OPT_RHPORT) || defined(TUH_OPT_RHPORT) #define _tusb_init_arg0() tusb_rhport_init(0, NULL) @@ -162,27 +162,18 @@ bool tusb_inited(void); // Called to handle usb interrupt/event. tusb_init(rhport, role) must be called before void tusb_int_handler(uint8_t rhport, bool in_isr); -// TODO -// bool tusb_teardown(void); +// Deinit usb stack on roothub port +bool tusb_deinit(uint8_t rhport); #else #define tusb_init(...) (false) #define tusb_int_handler(...) do {}while(0) #define tusb_inited() (false) +#define tusb_deinit(...) (false) #endif -//--------------------------------------------------------------------+ -// API Implemented by user -//--------------------------------------------------------------------+ - -// Get current milliseconds, required by some port/configuration without RTOS -uint32_t tusb_time_millis_api(void); - -// Delay in milliseconds, use tusb_time_millis_api() by default. required by some port/configuration with no RTOS -void tusb_time_delay_ms_api(uint32_t ms); - #ifdef __cplusplus } #endif |
