We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f1da0a commit d89cafdCopy full SHA for d89cafd
lib/utils/interrupt_char.c
@@ -31,11 +31,19 @@ int mp_interrupt_char;
31
32
void mp_hal_set_interrupt_char(int c) {
33
if (c != -1) {
34
+ #if MICROPY_KBD_EXCEPTION
35
+ mp_obj_exception_clear_traceback(MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)));
36
+ #else
37
mp_obj_exception_clear_traceback(MP_STATE_PORT(mp_kbd_exception));
38
+ #endif
39
}
40
mp_interrupt_char = c;
41
42
43
void mp_keyboard_interrupt(void) {
44
45
+ MP_STATE_VM(mp_pending_exception) = MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception));
46
47
MP_STATE_VM(mp_pending_exception) = MP_STATE_PORT(mp_kbd_exception);
48
49
0 commit comments