File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727#include "py/obj.h"
2828#include "py/mpstate.h"
2929
30+ #if MICROPY_KBD_EXCEPTION
31+
3032int mp_interrupt_char ;
3133
3234void mp_hal_set_interrupt_char (int c ) {
3335 if (c != -1 ) {
34- #if MICROPY_KBD_EXCEPTION
3536 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
3937 }
4038 mp_interrupt_char = c ;
4139}
4240
4341void mp_keyboard_interrupt (void ) {
44- #if MICROPY_KBD_EXCEPTION
4542 MP_STATE_VM (mp_pending_exception ) = MP_OBJ_FROM_PTR (& MP_STATE_VM (mp_kbd_exception ));
46- #else
47- MP_STATE_VM (mp_pending_exception ) = MP_STATE_PORT (mp_kbd_exception );
48- #endif
4943 #if MICROPY_ENABLE_SCHEDULER
5044 if (MP_STATE_VM (sched_state ) == MP_SCHED_IDLE ) {
5145 MP_STATE_VM (sched_state ) = MP_SCHED_PENDING ;
5246 }
5347 #endif
5448}
49+
50+ #endif
You can’t perform that action at this time.
0 commit comments