add tusb_time_millis_api() and default/weak tusb_time_delay_ms_api(). Which is required for host and some device without RTOS.

This commit is contained in:
hathach
2024-11-04 17:20:58 +07:00
parent 5d6d905cb0
commit 80ad7c4e87
6 changed files with 43 additions and 15 deletions

View File

@@ -169,8 +169,11 @@ void tusb_int_handler(uint8_t rhport, bool in_isr);
// API Implemented by user
//--------------------------------------------------------------------+
// Get current milliseconds, maybe required by some port with no RTOS
uint32_t tusb_time_millis(void);
// 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
}