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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/bsp/board.h b/hw/bsp/board.h
index a8f973a7f..97c80e7c7 100644
--- a/hw/bsp/board.h
+++ b/hw/bsp/board.h
@@ -80,6 +80,13 @@ int board_uart_write(void const * buf, int len);
return os_time_ticks_to_ms32( os_time_get() );
}
+#elif CFG_TUSB_OS == OPT_OS_PICO
+#include "pico/time.h"
+static inline uint32_t board_millis(void)
+ {
+ return to_ms_since_boot(get_absolute_time());
+ }
+
#else
#error "board_millis() is not implemented for this OS"
#endif