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.
This commit is contained in:
Glenn Ruben Bakke 2020-12-09 21:01:28 +01:00 committed by Damien George
parent aa857eb65e
commit 23e8729d3e
1 changed files with 4 additions and 0 deletions

View File

@ -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,