Skip to content

Commit ac1c916

Browse files
committed
drivers/esp_hosted_wifi: Replace EVENT_POLL_HOOK with mp_event_wait_ms.
Signed-off-by: Andrew Leech <[email protected]>
1 parent 956e6a1 commit ac1c916

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/esp-hosted/esp_hosted_wifi.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ static int esp_hosted_request(CtrlMsgId msg_id, void *ctrl_payload) {
243243

244244
static CtrlMsg *esp_hosted_response(CtrlMsgId msg_id, uint32_t timeout) {
245245
CtrlMsg *ctrl_msg = NULL;
246-
for (mp_uint_t start = mp_hal_ticks_ms(); ; mp_hal_delay_ms(10)) {
246+
for (mp_uint_t start = mp_hal_ticks_ms(); ; mp_event_wait_ms(10)) {
247247
if (!esp_hosted_stack_empty(&esp_state.stack)) {
248248
ctrl_msg = esp_hosted_stack_pop(&esp_state.stack, true);
249249
if (ctrl_msg->msg_id == msg_id) {
@@ -264,8 +264,6 @@ static CtrlMsg *esp_hosted_response(CtrlMsgId msg_id, uint32_t timeout) {
264264
if ((mp_hal_ticks_ms() - start) >= timeout) {
265265
return NULL;
266266
}
267-
268-
MICROPY_EVENT_POLL_HOOK
269267
}
270268

271269
// If message type is a response, check the response struct's return value.

0 commit comments

Comments
 (0)