Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions py/modmicropython.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@
static MP_DEFINE_CONST_FUN_OBJ_2(mp_micropython_schedule_obj, mp_micropython_schedule);
#endif

#if MICROPY_KBD_EXCEPTION
static mp_obj_t mp_micropython_keyboard_interrupt(void) {
mp_sched_keyboard_interrupt();
return mp_const_none;

Check warning on line 172 in py/modmicropython.c

View check run for this annotation

Codecov / codecov/patch

py/modmicropython.c#L171-L172

Added lines #L171 - L172 were not covered by tests
}
static MP_DEFINE_CONST_FUN_OBJ_0(mp_micropython_keyboard_interrupt_obj, mp_micropython_keyboard_interrupt);
#endif

static const mp_rom_map_elem_t mp_module_micropython_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_micropython) },
{ MP_ROM_QSTR(MP_QSTR_const), MP_ROM_PTR(&mp_identity_obj) },
Expand Down Expand Up @@ -206,6 +214,9 @@
#if MICROPY_ENABLE_SCHEDULER
{ MP_ROM_QSTR(MP_QSTR_schedule), MP_ROM_PTR(&mp_micropython_schedule_obj) },
#endif
#if MICROPY_KBD_EXCEPTION
{MP_ROM_QSTR(MP_QSTR_keyboard_interrupt), MP_ROM_PTR(&mp_micropython_keyboard_interrupt_obj)},
#endif
};

static MP_DEFINE_CONST_DICT(mp_module_micropython_globals, mp_module_micropython_globals_table);
Expand Down
Loading