summaryrefslogtreecommitdiffstatshomepage
path: root/extmod
diff options
context:
space:
mode:
authoriabdalkader <i.abdalkader@gmail.com>2024-08-01 17:02:17 +0300
committerDamien George <damien@micropython.org>2024-08-08 18:02:21 +1000
commit1743a7d7218646c2ebce5c36691638d2a60cc59a (patch)
tree598372a798740419b9c2a87a69ff2aa1e6db9f32 /extmod
parent9a48ce3051744fac20762199d67ffc380c1de1f6 (diff)
downloadmicropython-1743a7d7218646c2ebce5c36691638d2a60cc59a.tar.gz
micropython-1743a7d7218646c2ebce5c36691638d2a60cc59a.zip
extmod/modopenamp: Use mp_event_* functions for poll/wait.
These are the new helper functions to use for polling/waiting. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Diffstat (limited to 'extmod')
-rw-r--r--extmod/modopenamp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/extmod/modopenamp.c b/extmod/modopenamp.c
index 4ba8096f93..7d5841c400 100644
--- a/extmod/modopenamp.c
+++ b/extmod/modopenamp.c
@@ -192,13 +192,13 @@ static mp_obj_t endpoint_send(uint n_args, const mp_obj_t *pos_args, mp_map_t *k
for (mp_uint_t start = mp_hal_ticks_ms(); ;) {
bytes = rpmsg_send_offchannel_raw(&self->ep, src, dest, rbuf.buf, rbuf.len, false);
if (bytes > 0 || timeout == 0) {
- MICROPY_EVENT_POLL_HOOK
+ mp_event_handle_nowait();
break;
}
if (timeout > 0 && (mp_hal_ticks_ms() - start > timeout)) {
mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("timeout waiting for a free buffer"));
}
- MICROPY_EVENT_POLL_HOOK
+ mp_event_wait_ms(1);
}
return mp_obj_new_int(bytes);
}