|
|
@ -153,6 +153,13 @@ STATIC mp_obj_t machine_soft_reset(void) { |
|
|
|
} |
|
|
|
MP_DEFINE_CONST_FUN_OBJ_0(machine_soft_reset_obj, machine_soft_reset); |
|
|
|
|
|
|
|
NORETURN mp_obj_t machine_bootloader(size_t n_args, const mp_obj_t *args) { |
|
|
|
MICROPY_BOARD_ENTER_BOOTLOADER(n_args, args); |
|
|
|
for (;;) { |
|
|
|
} |
|
|
|
} |
|
|
|
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_bootloader_obj, 0, 1, machine_bootloader); |
|
|
|
|
|
|
|
STATIC mp_obj_t machine_lightsleep(void) { |
|
|
|
__WFE(); |
|
|
|
return mp_const_none; |
|
|
@ -196,6 +203,7 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { |
|
|
|
{ MP_ROM_QSTR(MP_QSTR_info), MP_ROM_PTR(&machine_info_obj) }, |
|
|
|
{ MP_ROM_QSTR(MP_QSTR_reset), MP_ROM_PTR(&machine_reset_obj) }, |
|
|
|
{ MP_ROM_QSTR(MP_QSTR_soft_reset), MP_ROM_PTR(&machine_soft_reset_obj) }, |
|
|
|
{ MP_ROM_QSTR(MP_QSTR_bootloader), MP_ROM_PTR(&machine_bootloader_obj) }, |
|
|
|
{ MP_ROM_QSTR(MP_QSTR_enable_irq), MP_ROM_PTR(&machine_enable_irq_obj) }, |
|
|
|
{ MP_ROM_QSTR(MP_QSTR_disable_irq), MP_ROM_PTR(&machine_disable_irq_obj) }, |
|
|
|
{ MP_ROM_QSTR(MP_QSTR_sleep), MP_ROM_PTR(&machine_lightsleep_obj) }, |
|
|
|