Skip to content

Commit 0c59c30

Browse files
committed
zephyr: Use core-provided keyboard exception object.
1 parent 724b825 commit 0c59c30

3 files changed

Lines changed: 1 addition & 3 deletions

File tree

zephyr/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ int real_main(void) {
7575
mp_obj_list_init(mp_sys_path, 0);
7676
mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_)); // current dir (or base dir of the script)
7777
mp_obj_list_init(mp_sys_argv, 0);
78-
MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
7978

8079
#if MICROPY_MODULE_FROZEN
8180
pyexec_frozen_module("main.py");

zephyr/mpconfigport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#define MICROPY_ENABLE_GC (1)
3838
#define MICROPY_HELPER_REPL (1)
3939
#define MICROPY_REPL_AUTO_INDENT (1)
40+
#define MICROPY_KBD_EXCEPTION (1)
4041
#define MICROPY_CPYTHON_COMPAT (0)
4142
#define MICROPY_PY_ASYNC_AWAIT (0)
4243
#define MICROPY_PY_ATTRTUPLE (0)
@@ -94,7 +95,6 @@ typedef long mp_off_t;
9495
#define MP_STATE_PORT MP_STATE_VM
9596

9697
#define MICROPY_PORT_ROOT_POINTERS \
97-
mp_obj_t mp_kbd_exception; \
9898
const char *readline_hist[8];
9999

100100
extern const struct _mp_obj_module_t mp_module_machine;

zephyr/mpconfigport_minimal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,4 @@ typedef long mp_off_t;
8787
#define MP_STATE_PORT MP_STATE_VM
8888

8989
#define MICROPY_PORT_ROOT_POINTERS \
90-
mp_obj_t mp_kbd_exception; \
9190
const char *readline_hist[8];

0 commit comments

Comments
 (0)