Commit 6f3b9933 authored by Paul Sokolovsky's avatar Paul Sokolovsky

esp8266/esp_mphal: Protect dupterm_task_handler() from recursive exec.

parent dde9abad
......@@ -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];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment