diff options
author | Maureen Helm <maureen.helm@nxp.com> | 2020-05-14 08:32:32 -0500 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-06-12 10:24:54 +1000 |
commit | 6aff27ac3c2115734e5b0181956de0c04cfbb651 (patch) | |
tree | 2a69f41cf019b234b9e823b417253e51e6abc8de | |
parent | db02cb061d8ecd4c7dec90f37e314197a6030ee8 (diff) |
zephyr: Update to new zephyr timeout API.
Updates the zephyr port to use the new timeout api introduced in zephyr
2.3.
-rw-r--r-- | ports/zephyr/mphalport.h | 2 | ||||
-rw-r--r-- | ports/zephyr/uart_core.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ports/zephyr/mphalport.h b/ports/zephyr/mphalport.h index 594f6a1f6..8434a388b 100644 --- a/ports/zephyr/mphalport.h +++ b/ports/zephyr/mphalport.h @@ -21,7 +21,7 @@ static inline void mp_hal_delay_us(mp_uint_t delay) { } static inline void mp_hal_delay_ms(mp_uint_t delay) { - k_sleep(delay); + k_msleep(delay); } #define mp_hal_delay_us_fast(us) (mp_hal_delay_us(us)) diff --git a/ports/zephyr/uart_core.c b/ports/zephyr/uart_core.c index fef9f00ab..63ecc8289 100644 --- a/ports/zephyr/uart_core.c +++ b/ports/zephyr/uart_core.c @@ -49,7 +49,7 @@ void mp_hal_stdout_tx_strn(const char *str, mp_uint_t len) { while (len--) { char c = *str++; while (console_putchar(c) == -1) { - k_sleep(1); + k_msleep(1); } } #else |