py/mphal.h: Introduce mp_hal_time_ns and implement on various ports.
This should return a 64-bit value being the number of nanoseconds since 1970/1/1. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -24,6 +24,11 @@ static inline void mp_hal_delay_ms(mp_uint_t delay) {
|
||||
k_msleep(delay);
|
||||
}
|
||||
|
||||
static inline uint64_t mp_hal_time_ns(void) {
|
||||
// Not currently implemented.
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define mp_hal_delay_us_fast(us) (mp_hal_delay_us(us))
|
||||
#define mp_hal_pin_od_low(p) (mp_raise_NotImplementedError("mp_hal_pin_od_low"))
|
||||
#define mp_hal_pin_od_high(p) (mp_raise_NotImplementedError("mp_hal_pin_od_high"))
|
||||
|
||||
Reference in New Issue
Block a user