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_rtx4.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_rtx4.h')
| -rw-r--r-- | src/osal/osal_rtx4.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/osal/osal_rtx4.h b/src/osal/osal_rtx4.h index 35860ddd5..e1930c96c 100644 --- a/src/osal/osal_rtx4.h +++ b/src/osal/osal_rtx4.h @@ -46,6 +46,10 @@ TU_ATTR_ALWAYS_INLINE static inline void osal_task_delay(uint32_t msec) { os_dly_wait(lo); } +TU_ATTR_ALWAYS_INLINE static inline uint32_t osal_time_millis(void) { + return os_time_get(); +} + TU_ATTR_ALWAYS_INLINE static inline uint16_t msec2wait(uint32_t msec) { if (msec == OSAL_TIMEOUT_WAIT_FOREVER) { return 0xFFFF; |
