8000 nrf/mphalport: Add dummy function for mp_hal_time_ns(). · codemee/micropython@23e8729 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 23e8729

Browse files
glennrubdpgeorge
authored andcommitted
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.
1 parent aa857eb commit 23e8729

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ports/nrf/mphalport.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ mp_uint_t mp_hal_ticks_ms(void) {
150150

151151
#endif
152152

153+
uint64_t mp_hal_time_ns(void) {
154+
return 0;
155+
}
156+
153157
// this table converts from HAL_StatusTypeDef to POSIX errno
154158
const byte mp_hal_status_to_errno_table[4] = {
155159
[HAL_OK] = 0,

0 commit comments

Comments
 (0)
0