zephyr: Replace deprecated time conversion macro.
The SYS_CLOCK_HW_CYCLES_TO_NS macro was deprecated in zephyr commit 8892406c1de21bd5de5877f39099e3663a5f3af1. This commit updates MicroPython to use the new k_cyc_to_ns_floor64 api and fix build warnings in the zephyr port. This change is compatible with Zephyr v2.1 and later.
This commit is contained in:
parent
c25e12d0dd
commit
a7663b862e
@ -2,7 +2,7 @@
|
||||
#include "lib/utils/interrupt_char.h"
|
||||
|
||||
static inline mp_uint_t mp_hal_ticks_us(void) {
|
||||
return SYS_CLOCK_HW_CYCLES_TO_NS(k_cycle_get_32()) / 1000;
|
||||
return k_cyc_to_ns_floor64(k_cycle_get_32()) / 1000;
|
||||
}
|
||||
|
||||
static inline mp_uint_t mp_hal_ticks_ms(void) {
|
||||
|
Loading…
Reference in New Issue
Block a user