summaryrefslogtreecommitdiff
path: root/hw/bsp/board.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/bsp/board.h')
-rw-r--r--hw/bsp/board.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/bsp/board.h b/hw/bsp/board.h
index 97c80e7c7..7b77def50 100644
--- a/hw/bsp/board.h
+++ b/hw/bsp/board.h
@@ -86,6 +86,11 @@ static inline uint32_t board_millis(void)
{
return to_ms_since_boot(get_absolute_time());
}
+#elif CFG_TUSB_OS == OPT_OS_RTTHREAD
+ static inline uint32_t board_millis(void)
+ {
+ return (((uint64_t)rt_tick_get()) * 1000 / RT_TICK_PER_SECOND);
+ }
#else
#error "board_millis() is not implemented for this OS"