extmod: Switch to use new event functions.
See previous commit for details of these functions. As of this commit, these still call the old hook macros on all ports. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
committed by
Damien George
parent
f5be0128e4
commit
df3948d3c2
@@ -331,11 +331,7 @@ STATIC mp_obj_t machine_i2c_scan(mp_obj_t self_in) {
|
||||
// This scan loop may run for some time, so process any pending events/exceptions,
|
||||
// or allow the port to run any necessary background tasks. But do it as fast as
|
||||
// possible, in particular we are not waiting on any events.
|
||||
#if defined(MICROPY_EVENT_POLL_HOOK_FAST)
|
||||
MICROPY_EVENT_POLL_HOOK_FAST;
|
||||
#elif defined(MICROPY_EVENT_POLL_HOOK)
|
||||
MICROPY_EVENT_POLL_HOOK
|
||||
#endif
|
||||
mp_event_handle_nowait();
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user