File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,13 @@ STATIC mp_obj_t pyb_udelay(mp_obj_t usec) {
132
132
133
133
STATIC MP_DEFINE_CONST_FUN_OBJ_1 (pyb_udelay_obj , pyb_udelay );
134
134
135
+ STATIC mp_obj_t pyb_wfi (void ) {
136
+ __WFI ();
137
+ return mp_const_none ;
138
+ }
139
+
140
+ MP_DEFINE_CONST_FUN_OBJ_0 (pyb_wfi_obj , pyb_wfi );
141
+
135
142
#if 0
136
143
STATIC void SYSCLKConfig_STOP (void ) {
137
144
/* After wake-up from STOP reconfigure the system clock */
@@ -221,6 +228,7 @@ STATIC const mp_map_elem_t pyb_module_globals_table[] = {
221
228
{ MP_OBJ_NEW_QSTR (MP_QSTR_gc ), (mp_obj_t )& pyb_gc_obj },
222
229
{ MP_OBJ_NEW_QSTR (MP_QSTR_repl_info ), (mp_obj_t )& pyb_set_repl_info_obj },
223
230
231
+ { MP_OBJ_NEW_QSTR (MP_QSTR_wfi ), (mp_obj_t )& pyb_wfi_obj },
224
232
{ MP_OBJ_NEW_QSTR (MP_QSTR_stop ), (mp_obj_t )& pyb_stop_obj },
225
233
{ MP_OBJ_NEW_QSTR (MP_QSTR_standby ), (mp_obj_t )& pyb_standby_obj },
226
234
{ MP_OBJ_NEW_QSTR (MP_QSTR_source_dir ), (mp_obj_t )& pyb_source_dir_obj },
Original file line number Diff line number Diff line change 6
6
Q (sd_test )
7
7
Q (present )
8
8
Q (power )
9
+ Q (wfi )
9
10
Q (stop )
10
11
Q (standby )
11
12
Q (source_dir )
You can’t perform that action at this time.
0 commit comments