From 6aff27ac3c2115734e5b0181956de0c04cfbb651 Mon Sep 17 00:00:00 2001 From: Maureen Helm Date: Thu, 14 May 2020 08:32:32 -0500 Subject: zephyr: Update to new zephyr timeout API. Updates the zephyr port to use the new timeout api introduced in zephyr 2.3. --- ports/zephyr/mphalport.h | 2 +- ports/zephyr/uart_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ports/zephyr') 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 -- cgit v1.2.3