From 23e8729d3e256a38ae4bbe68c8aa66a40e31e2e8 Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Wed, 9 Dec 2020 21:01:28 +0100 Subject: [PATCH] nrf/mphalport: Add dummy function for mp_hal_time_ns(). extmod/vfs_lfs.c needs to resolve `mp_hal_time_ns()` in order to calculate a timestamp from 1970 epoch. A wall clock is not available in the nrf port, hence the function is implemented to resolve compilation linkage error. The function always return 0. --- ports/nrf/mphalport.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/nrf/mphalport.c b/ports/nrf/mphalport.c index b8e4c2e4d8..8ffb256018 100644 --- a/ports/nrf/mphalport.c +++ b/ports/nrf/mphalport.c @@ -150,6 +150,10 @@ mp_uint_t mp_hal_ticks_ms(void) { #endif +uint64_t mp_hal_time_ns(void) { + return 0; +} + // this table converts from HAL_StatusTypeDef to POSIX errno const byte mp_hal_status_to_errno_table[4] = { [HAL_OK] = 0,