esp8266: Support raising KeyboardInterrupt on Ctrl+C.
diff --git a/esp8266/uart.c b/esp8266/uart.c
index 49fc9bb..aa3d368 100644
--- a/esp8266/uart.c
+++ b/esp8266/uart.c
@@ -210,10 +210,15 @@
 #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;