diff options
Diffstat (limited to 'esp8266/esp_mphal.c')
-rw-r--r-- | esp8266/esp_mphal.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/esp8266/esp_mphal.c b/esp8266/esp_mphal.c index eabf8ca208..04154a3781 100644 --- a/esp8266/esp_mphal.c +++ b/esp8266/esp_mphal.c @@ -176,6 +176,10 @@ static int call_dupterm_read(void) { mp_uos_deactivate("dupterm: EOF received, deactivating\n", MP_OBJ_NULL); return -1; } + if (*(byte*)bufinfo.buf == interrupt_char) { + mp_keyboard_interrupt(); + return -2; + } return *(byte*)bufinfo.buf; } else { mp_uos_deactivate("dupterm: Exception in read() method, deactivating: ", nlr.ret_val); |