summaryrefslogtreecommitdiffstatshomepage
path: root/drivers/esp-hosted/esp_hosted_wifi.c
diff options
context:
space:
mode:
authorAndrew Leech <andrew.leech@planetinnovation.com.au>2024-10-01 20:41:23 +1000
committerDamien George <damien@micropython.org>2025-06-16 16:36:39 +1000
commitcfcc53da72d330d2eb9728d5f75c3ef5b459f1cf (patch)
tree379cbd6b6f287bc005d18e7414383275b2c679f5 /drivers/esp-hosted/esp_hosted_wifi.c
parent573180f7884112e2bc5bf279549b4941f7fab06b (diff)
downloadmicropython-cfcc53da72d330d2eb9728d5f75c3ef5b459f1cf.tar.gz
micropython-cfcc53da72d330d2eb9728d5f75c3ef5b459f1cf.zip
drivers/esp-hosted: Replace EVENT_POLL_HOOK with mp_event_wait_ms.
Signed-off-by: Andrew Leech <andrew@alelec.net>
Diffstat (limited to 'drivers/esp-hosted/esp_hosted_wifi.c')
-rw-r--r--drivers/esp-hosted/esp_hosted_wifi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/esp-hosted/esp_hosted_wifi.c b/drivers/esp-hosted/esp_hosted_wifi.c
index d1b6333aa0..763b04db37 100644
--- a/drivers/esp-hosted/esp_hosted_wifi.c
+++ b/drivers/esp-hosted/esp_hosted_wifi.c
@@ -243,7 +243,7 @@ static int esp_hosted_request(CtrlMsgId msg_id, void *ctrl_payload) {
static CtrlMsg *esp_hosted_response(CtrlMsgId msg_id, uint32_t timeout) {
CtrlMsg *ctrl_msg = NULL;
- for (mp_uint_t start = mp_hal_ticks_ms(); ; mp_hal_delay_ms(10)) {
+ for (mp_uint_t start = mp_hal_ticks_ms(); ; mp_event_wait_ms(10)) {
if (!esp_hosted_stack_empty(&esp_state.stack)) {
ctrl_msg = esp_hosted_stack_pop(&esp_state.stack, true);
if (ctrl_msg->msg_id == msg_id) {
@@ -264,8 +264,6 @@ static CtrlMsg *esp_hosted_response(CtrlMsgId msg_id, uint32_t timeout) {
if ((mp_hal_ticks_ms() - start) >= timeout) {
return NULL;
}
-
- MICROPY_EVENT_POLL_HOOK
}
// If message type is a response, check the response struct's return value.