From e182f3862e2c8ab731d169b70e83a6535c01a3f2 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 14 Nov 2023 16:18:55 +1100 Subject: [PATCH] rp2/cyw43_configport: Implement cyw43_delay_ms as mp_hal_delay_ms. They do the same thing. Signed-off-by: Damien George --- ports/rp2/cyw43_configport.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ports/rp2/cyw43_configport.h b/ports/rp2/cyw43_configport.h index a3a5c48e5..96324ee5e 100644 --- a/ports/rp2/cyw43_configport.h +++ b/ports/rp2/cyw43_configport.h @@ -116,12 +116,7 @@ static inline void cyw43_delay_us(uint32_t us) { } static inline void cyw43_delay_ms(uint32_t ms) { - uint32_t us = ms * 1000; - int32_t start = mp_hal_ticks_us(); - while (mp_hal_ticks_us() - start < us) { - cyw43_yield(); - MICROPY_EVENT_POLL_HOOK_FAST; - } + mp_hal_delay_ms(ms); } #define CYW43_EVENT_POLL_HOOK MICROPY_EVENT_POLL_HOOK_FAST