diff options
Diffstat (limited to 'esp8266/uart.c')
-rw-r--r-- | esp8266/uart.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/esp8266/uart.c b/esp8266/uart.c index 49fc9bb87c..aa3d368b7c 100644 --- a/esp8266/uart.c +++ b/esp8266/uart.c @@ -210,10 +210,15 @@ void ICACHE_FLASH_ATTR uart_reattach() { #include "lib/utils/pyexec.h" void soft_reset(void); +void mp_keyboard_interrupt(void); +int interrupt_char; void uart_task_handler(os_event_t *evt) { int c, ret = 0; while ((c = uart_rx_one_char(UART_REPL)) >= 0) { + if (c == interrupt_char) { + mp_keyboard_interrupt(); + } ret = pyexec_event_repl_process_char(c); if (ret & PYEXEC_FORCED_EXIT) { break; |