summaryrefslogtreecommitdiff
path: root/esp8266/esp_mphal.c
diff options
context:
space:
mode:
Diffstat (limited to 'esp8266/esp_mphal.c')
-rw-r--r--esp8266/esp_mphal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/esp8266/esp_mphal.c b/esp8266/esp_mphal.c
index 3fd2c636d..b522e87e3 100644
--- a/esp8266/esp_mphal.c
+++ b/esp8266/esp_mphal.c
@@ -51,7 +51,10 @@ void mp_hal_feed_watchdog(void) {
}
void mp_hal_delay_us(uint32_t us) {
- ets_delay_us(us);
+ uint32_t start = system_get_time();
+ while (system_get_time() - start < us) {
+ ets_event_poll();
+ }
}
int mp_hal_stdin_rx_chr(void) {