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:
Angus Gratton
2023-11-30 14:32:41 +11:00
committed by Damien George
parent f5be0128e4
commit df3948d3c2
7 changed files with 29 additions and 27 deletions

View File

@@ -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;
}