summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-09-10 16:59:26 +0700
committerhathach <[email protected]>2025-09-10 16:59:26 +0700
commitd70d4043dcccb1628424c39c231ed1f95fb52f8e (patch)
tree667214a70b916ce3724661fc9586cbbc43a01c01 /src/common
parent4f4ba3b16d9bcb98a1cb51cb6030f0be4dfd7513 (diff)
use tusb_time_delay_ms_api for delay, also move tusb_time api to common.h
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_common.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common/tusb_common.h b/src/common/tusb_common.h
index 0351a3d8f..b5bdb76e3 100644
--- a/src/common/tusb_common.h
+++ b/src/common/tusb_common.h
@@ -78,10 +78,16 @@
#include "tusb_debug.h"
//--------------------------------------------------------------------+
-// Optional API implemented by application if needed
+// API implemented by application if needed
// TODO move to a more obvious place/file
//--------------------------------------------------------------------+
+// Get current milliseconds, required by some port/configuration without RTOS
+extern 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
+extern void tusb_time_delay_ms_api(uint32_t ms);
+
// flush data cache
TU_ATTR_WEAK extern void tusb_app_dcache_flush(uintptr_t addr, uint32_t data_size);