8000 esp8266/esp_mphal: Add tentative change to mp_hal_stdin_rx_chr() to w… · sparkfun/circuitpython@4b3f1d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4b3f1d7

Browse files
committed
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.
1 parent 3fe047f commit 4b3f1d7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

esp8266/esp_mphal.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ int mp_hal_stdin_rx_chr(void) {
6060
if (c != -1) {
6161
return c;
6262
}
63+
#if 0
64+
// Idles CPU but need more testing before enabling
65+
if (!ets_loop_iter()) {
66+
asm("waiti 0");
67+
}
68+
#else
6369
mp_hal_delay_us(1);
70+
#endif
6471
}
6572
}
6673

0 commit comments

Comments
 (0)
0