summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/esp_mphal.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-12-20 13:58:58 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-03-05 22:01:27 +0200
commitd3a4d39687f941d12d727b80c79dd98ebae03674 (patch)
tree155e0c8a446f1cd4d8d99701c04bd271342464a6 /esp8266/esp_mphal.c
parent077448328a42e732c1ae3a063670b71914ed489c (diff)
downloadmicropython-d3a4d39687f941d12d727b80c79dd98ebae03674.tar.gz
micropython-d3a4d39687f941d12d727b80c79dd98ebae03674.zip
esp8266: Support raising KeyboardInterrupt on Ctrl+C.
Diffstat (limited to 'esp8266/esp_mphal.c')
-rw-r--r--esp8266/esp_mphal.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/esp8266/esp_mphal.c b/esp8266/esp_mphal.c
index cc0eb3eae1..c78b3600f0 100644
--- a/esp8266/esp_mphal.c
+++ b/esp8266/esp_mphal.c
@@ -98,7 +98,11 @@ void mp_hal_delay_ms(uint32_t delay) {
}
void mp_hal_set_interrupt_char(int c) {
- // TODO
+ if (c != -1) {
+ mp_obj_exception_clear_traceback(MP_STATE_PORT(mp_kbd_exception));
+ }
+ extern int interrupt_char;
+ interrupt_char = c;
}
void __assert_func(const char *file, int line, const char *func, const char *expr) {