@@ -150,7 +150,7 @@ STATIC mp_obj_t select_select(size_t n_args, const mp_obj_t *args) {
150
150
mp_map_deinit (& poll_map );
151
151
return mp_obj_new_tuple (3 , list_array );
152
152
}
153
- MICROPY_EVENT_POLL_HOOK
153
+ RUN_BACKGROUND_TASKS ;
154
154
}
155
155
}
156
156
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN (mp_select_select_obj , 3 , 4 , select_select );
@@ -229,7 +229,7 @@ STATIC mp_uint_t poll_poll_internal(uint n_args, const mp_obj_t *args) {
229
229
if (n_ready > 0 || (timeout != (mp_uint_t )- 1 && mp_hal_ticks_ms () - start_tick >= timeout )) {
230
230
break ;
231
231
}
232
- MICROPY_EVENT_POLL_HOOK
232
+ RUN_BACKGROUND_TASKS ;
233
233
}
234
234
235
235
return n_ready ;
@@ -318,10 +318,13 @@ STATIC MP_DEFINE_CONST_DICT(poll_locals_dict, poll_locals_dict_table);
318
318
319
319
STATIC const mp_obj_type_t mp_type_poll = {
320
320
{ & mp_type_type },
321
+ .flags = MP_TYPE_FLAG_EXTENDED ,
321
322
.name = MP_QSTR_poll ,
322
- .getiter = mp_identity_getiter ,
323
- .iternext = poll_iternext ,
324
323
.locals_dict = (void * )& poll_locals_dict ,
324
+ MP_TYPE_EXTENDED_FIELDS (
325
+ .getiter = mp_identity_getiter ,
326
+ .iternext = poll_iternext ,
327
+ ),
325
328
};
326
329
327
330
// poll()
@@ -354,4 +357,6 @@ const mp_obj_module_t mp_module_uselect = {
354
357
.globals = (mp_obj_dict_t * )& mp_module_select_globals ,
355
358
};
356
359
360
+ MP_REGISTER_MODULE (MP_QSTR_select , mp_module_uselect , MICROPY_PY_USELECT );
361
+
357
362
#endif // MICROPY_PY_USELECT
0 commit comments