diff options
| author | Ha Thach <[email protected]> | 2026-03-04 15:24:11 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-03-04 15:24:11 +0700 |
| commit | 13e0b0c4f149016c829f039dc082151bca01174f (patch) | |
| tree | 512d9340830a3cab772a7e89a1dc271d31446cf7 /src/osal/osal_rtthread.h | |
| parent | a8a4db3721cccd32c8e998a7aa816719294d7a66 (diff) | |
| parent | e4950e9b693171f7bb47d8c1f800ece8827242ec (diff) | |
Merge pull request #3490 from Precidata/non-blocking-host-v2
Fully asynchrounous host code (v2)
Diffstat (limited to 'src/osal/osal_rtthread.h')
| -rw-r--r-- | src/osal/osal_rtthread.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/osal/osal_rtthread.h b/src/osal/osal_rtthread.h index a778f5425..f560281c5 100644 --- a/src/osal/osal_rtthread.h +++ b/src/osal/osal_rtthread.h @@ -42,6 +42,10 @@ TU_ATTR_ALWAYS_INLINE static inline void osal_task_delay(uint32_t msec) { rt_thread_mdelay(msec); } +TU_ATTR_ALWAYS_INLINE static inline uint32_t osal_time_millis(void) { + return (uint32_t)((((uint64_t)rt_tick_get()) * 1000) / RT_TICK_PER_SECOND); +} + //--------------------------------------------------------------------+ // Spinlock API //--------------------------------------------------------------------+ |
