summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266
diff options
context:
space:
mode:
Diffstat (limited to 'esp8266')
-rw-r--r--esp8266/esp_mphal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/esp8266/esp_mphal.c b/esp8266/esp_mphal.c
index 72c3b8b59b..914097f9b5 100644
--- a/esp8266/esp_mphal.c
+++ b/esp8266/esp_mphal.c
@@ -194,6 +194,11 @@ static int call_dupterm_read(void) {
}
STATIC void dupterm_task_handler(os_event_t *evt) {
+ static byte lock;
+ if (lock) {
+ return;
+ }
+ lock = 1;
while (1) {
int c = call_dupterm_read();
if (c < 0) {
@@ -202,6 +207,7 @@ STATIC void dupterm_task_handler(os_event_t *evt) {
ringbuf_put(&input_buf, c);
}
mp_hal_signal_input();
+ lock = 0;
}
STATIC os_event_t dupterm_evt_queue[4];