File tree Expand file tree Collapse file tree 3 files changed +2
-3
lines changed Expand file tree Collapse file tree 3 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,6 @@ void mp_task(void *pvParameter) {
64
64
mp_stack_set_limit (MP_TASK_STACK_SIZE - 512 );
65
65
gc_init (mp_task_heap , mp_task_heap + sizeof (mp_task_heap ));
66
66
mp_init ();
67
- MP_STATE_PORT (mp_kbd_exception ) = mp_obj_new_exception (& mp_type_KeyboardInterrupt );
68
67
mp_obj_list_init (mp_sys_path , 0 );
69
68
mp_obj_list_append (mp_sys_path , MP_OBJ_NEW_QSTR (MP_QSTR_ ));
70
69
mp_obj_list_append (mp_sys_path , MP_OBJ_NEW_QSTR (MP_QSTR__slash_flash_slash_lib ));
Original file line number Diff line number Diff line change 29
29
#define MICROPY_ENABLE_FINALISER (1)
30
30
#define MICROPY_STACK_CHECK (1)
31
31
#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1)
32
+ #define MICROPY_KBD_EXCEPTION (1)
32
33
#define MICROPY_HELPER_REPL (1)
33
34
#define MICROPY_REPL_EMACS_KEYS (1)
34
35
#define MICROPY_REPL_AUTO_INDENT (1)
@@ -190,7 +191,6 @@ extern const struct _mp_obj_module_t mp_module_network;
190
191
191
192
#define MICROPY_PORT_ROOT_POINTERS \
192
193
const char *readline_hist[8]; \
193
- mp_obj_t mp_kbd_exception; \
194
194
mp_obj_t machine_pin_irq_handler[40]; \
195
195
196
196
// type definitions for the specific machine
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ STATIC void IRAM_ATTR uart_irq_handler(void *arg) {
51
51
uint8_t c = uart -> fifo .rw_byte ;
52
52
if (c == mp_interrupt_char ) {
53
53
// inline version of mp_keyboard_interrupt();
54
- MP_STATE_VM (mp_pending_exception ) = MP_STATE_PORT ( mp_kbd_exception );
54
+ MP_STATE_VM (mp_pending_exception ) = MP_OBJ_FROM_PTR ( & MP_STATE_VM ( mp_kbd_exception ) );
55
55
#if MICROPY_ENABLE_SCHEDULER
56
56
if (MP_STATE_VM (sched_state ) == MP_SCHED_IDLE ) {
57
57
MP_STATE_VM (sched_state ) = MP_SCHED_PENDING ;
You can’t perform that action at this time.
0 commit comments