diff options
| author | hathach <[email protected]> | 2026-02-27 23:34:48 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-02-27 23:42:40 +0700 |
| commit | 7ea02fd6c9e376679bc1fe025bb73e43664e17c6 (patch) | |
| tree | 8ff5476245cfb8fe7d885512a4ec03c05167dfa9 /src/osal/osal_freertos.h | |
| parent | 8302adfab8727896c4a10935a15c32fbdcba3b8e (diff) | |
add osal_time_millis() to osal requirement
implement tusb_time_millis_api() with osal_time_millis() when OS is not NONE
Diffstat (limited to 'src/osal/osal_freertos.h')
| -rw-r--r-- | src/osal/osal_freertos.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/osal/osal_freertos.h b/src/osal/osal_freertos.h index 9aeda4d01..32ee2d55c 100644 --- a/src/osal/osal_freertos.h +++ b/src/osal/osal_freertos.h @@ -99,6 +99,10 @@ TU_ATTR_ALWAYS_INLINE static inline void osal_task_delay(uint32_t msec) { vTaskDelay(pdMS_TO_TICKS(msec)); } +TU_ATTR_ALWAYS_INLINE static inline uint32_t osal_time_millis(void) { + return pdTICKS_TO_MS(xTaskGetTickCount()); +} + //--------------------------------------------------------------------+ // Spinlock API //--------------------------------------------------------------------+ |
