summaryrefslogtreecommitdiff
path: root/ports/esp8266/uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/esp8266/uart.c')
-rw-r--r--ports/esp8266/uart.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ports/esp8266/uart.c b/ports/esp8266/uart.c
index c0a33acb5..80ae5e617 100644
--- a/ports/esp8266/uart.c
+++ b/ports/esp8266/uart.c
@@ -18,6 +18,7 @@
#include "c_types.h"
#include "user_interface.h"
#include "py/mphal.h"
+#include "py/runtime.h"
// seems that this is missing in the Espressif SDK
#define FUNC_U0RXD 0
@@ -218,7 +219,7 @@ bool ICACHE_FLASH_ATTR uart_rx_wait(uint32_t timeout_us) {
if (system_get_time() - start >= timeout_us) {
return false; // timeout
}
- ets_event_poll();
+ mp_event_handle_nowait();
}
}