diff options
author | Damien George <damien.p.george@gmail.com> | 2016-03-23 13:01:21 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-03-23 13:01:21 +0200 |
commit | e673714cfe6284370d4917f0292db1c5b6fcc3a3 (patch) | |
tree | db66baa06e3f92372bd161cfca8629d3feb9a28e | |
parent | 58e2ad42ae982e38dde0fa1b4bdf3a1a32bc2fac (diff) |
esp8266: Make mp_hal_delay_us work with new event framework.
-rw-r--r-- | esp8266/esp_mphal.c | 5 |
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) { |