You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
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.
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user