diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-09-19 00:23:38 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-09-19 00:23:38 +0300 |
commit | 4b3f1d712b845a44a0d2680197cfb6c3fe4478bd (patch) | |
tree | abd77c22dc32fe8ea5b7f8bdb14417882b2f7b6f /esp8266/esp_mphal.c | |
parent | 3fe047f08f12ac922e5486284a2f2254670cd9a9 (diff) | |
download | micropython-4b3f1d712b845a44a0d2680197cfb6c3fe4478bd.tar.gz micropython-4b3f1d712b845a44a0d2680197cfb6c3fe4478bd.zip |
esp8266/esp_mphal: Add tentative change to mp_hal_stdin_rx_chr() to wait IRQ.
Instead of busy-looping waiting for UART input. Not enabled by default,
needs more testing.
Diffstat (limited to 'esp8266/esp_mphal.c')
-rw-r--r-- | esp8266/esp_mphal.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/esp8266/esp_mphal.c b/esp8266/esp_mphal.c index dc6944fd4c..7c9590ab67 100644 --- a/esp8266/esp_mphal.c +++ b/esp8266/esp_mphal.c @@ -60,7 +60,14 @@ int mp_hal_stdin_rx_chr(void) { if (c != -1) { return c; } + #if 0 + // Idles CPU but need more testing before enabling + if (!ets_loop_iter()) { + asm("waiti 0"); + } + #else mp_hal_delay_us(1); + #endif } } |