File tree 1 file changed +7
-0
lines changed 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -53,12 +53,19 @@ STATIC mp_obj_t machine_reset_cause(void) {
53
53
}
54
54
STATIC MP_DEFINE_CONST_FUN_OBJ_0 (machine_reset_cause_obj , machine_reset_cause );
55
55
56
+ STATIC mp_obj_t machine_idle (void ) {
57
+ k_yield ();
58
+ return mp_const_none ;
59
+ }
60
+ STATIC MP_DEFINE_CONST_FUN_OBJ_0 (machine_idle_obj , machine_idle );
61
+
56
62
STATIC const mp_rom_map_elem_t machine_module_globals_table [] = {
57
63
{ MP_ROM_QSTR (MP_QSTR___name__ ), MP_ROM_QSTR (MP_QSTR_umachine ) },
58
64
#ifdef CONFIG_REBOOT
59
65
{ MP_ROM_QSTR (MP_QSTR_reset ), MP_ROM_PTR (& machine_reset_obj ) },
60
66
#endif
61
67
{ MP_ROM_QSTR (MP_QSTR_reset_cause ), MP_ROM_PTR (& machine_reset_cause_obj ) },
68
+ { MP_ROM_QSTR (MP_QSTR_idle ), MP_ROM_PTR (& machine_idle_obj ) },
62
69
63
70
#if MICROPY_PY_MACHINE_I2C
64
71
{ MP_ROM_QSTR (MP_QSTR_I2C ), MP_ROM_PTR (& machine_hard_i2c_type ) },
You can’t perform that action at this time.
0 commit comments