summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Ruben Bakke <glennbakke@gmail.com>2020-12-09 21:01:28 +0100
committerDamien George <damien@micropython.org>2021-08-08 23:17:55 +1000
commit23e8729d3e256a38ae4bbe68c8aa66a40e31e2e8 (patch)
tree6bb9a06f62a7a15313a111a7e16d68d5dcae9b68
parentaa857eb65e57a935ec3757abc35b007996433298 (diff)
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.
-rw-r--r--ports/nrf/mphalport.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/nrf/mphalport.c b/ports/nrf/mphalport.c
index b8e4c2e4d..8ffb25601 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,