From 67ebe086a8948b083d84da1bf83ec82e1a9f1b85 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Thu, 1 Aug 2024 17:05:11 +0300 Subject: [PATCH] stm32/mpmetalport: Use mp_event_handle_nowait() for metal_poll. Signed-off-by: iabdalkader --- ports/stm32/mpmetalport.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/stm32/mpmetalport.h b/ports/stm32/mpmetalport.h index 53f329d15b09..706249b6aa41 100644 --- a/ports/stm32/mpmetalport.h +++ b/ports/stm32/mpmetalport.h @@ -70,7 +70,8 @@ static inline int __metal_sleep_usec(unsigned int usec) { } static inline void metal_generic_default_poll(void) { - MICROPY_EVENT_POLL_HOOK + mp_event_handle_nowait(); + __WFI(); } #endif // MICROPY_INCLUDED_STM32_METAL_PORT_H