summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/machine_i2c.c
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2023-11-30 14:32:41 +1100
committerDamien George <damien@micropython.org>2023-12-08 12:48:50 +1100
commitdf3948d3c23e3572c49d18ede03bf3ac97ee601c (patch)
tree7435061520a222a0ef859535a6c814d9eaffb486 /extmod/machine_i2c.c
parentf5be0128e4da1417136495c20888f8291cd22386 (diff)
downloadmicropython-df3948d3c23e3572c49d18ede03bf3ac97ee601c.tar.gz
micropython-df3948d3c23e3572c49d18ede03bf3ac97ee601c.zip
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>
Diffstat (limited to 'extmod/machine_i2c.c')
-rw-r--r--extmod/machine_i2c.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/extmod/machine_i2c.c b/extmod/machine_i2c.c
index 6cc2aa5bbf..1964284ec8 100644
--- a/extmod/machine_i2c.c
+++ b/extmod/machine_i2c.c
@@ -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;
}