diff --git a/micropython/modules/badger2040/badger2040.cpp b/micropython/modules/badger2040/badger2040.cpp index de59c6d2..f2a38a5d 100644 --- a/micropython/modules/badger2040/badger2040.cpp +++ b/micropython/modules/badger2040/badger2040.cpp @@ -122,8 +122,8 @@ mp_obj_t Badger2040_update(mp_obj_t self_in) { _Badger2040_obj_t *self = MP_OBJ_TO_PTR2(self_in, _Badger2040_obj_t); while(self->badger2040->is_busy()) { -#ifdef MICROPY_EVENT_POLL_HOOK -MICROPY_EVENT_POLL_HOOK +#ifdef mp_event_handle_nowait +mp_event_handle_nowait(); #endif } @@ -133,8 +133,8 @@ MICROPY_EVENT_POLL_HOOK // Ensure blocking for the minimum amount of time // in cases where "is_busy" is unreliable. while(self->badger2040->is_busy() || absolute_time_diff_us(get_absolute_time(), t_end) > 0) { -#ifdef MICROPY_EVENT_POLL_HOOK -MICROPY_EVENT_POLL_HOOK +#ifdef mp_event_handle_nowait +mp_event_handle_nowait(); #endif } @@ -166,8 +166,8 @@ mp_obj_t Badger2040_partial_update(size_t n_args, const mp_obj_t *pos_args, mp_m while(self->badger2040->is_busy()) { -#ifdef MICROPY_EVENT_POLL_HOOK -MICROPY_EVENT_POLL_HOOK +#ifdef mp_event_handle_nowait +mp_event_handle_nowait(); #endif } @@ -177,8 +177,8 @@ MICROPY_EVENT_POLL_HOOK // Ensure blocking for the minimum amount of time // in cases where "is_busy" is unreliable. while(self->badger2040->is_busy() || absolute_time_diff_us(get_absolute_time(), t_end) > 0) { -#ifdef MICROPY_EVENT_POLL_HOOK -MICROPY_EVENT_POLL_HOOK +#ifdef mp_event_handle_nowait +mp_event_handle_nowait(); #endif } @@ -199,8 +199,8 @@ mp_obj_t Badger2040_halt(mp_obj_t self_in) { self->badger2040->update_button_states(); while (self->badger2040->button_states() == 0) { -#ifdef MICROPY_EVENT_POLL_HOOK -MICROPY_EVENT_POLL_HOOK +#ifdef mp_event_handle_nowait +mp_event_handle_nowait(); #endif self->badger2040->update_button_states(); } diff --git a/micropython/modules/jpegdec/jpegdec.cpp b/micropython/modules/jpegdec/jpegdec.cpp index fb440250..5c8e3405 100644 --- a/micropython/modules/jpegdec/jpegdec.cpp +++ b/micropython/modules/jpegdec/jpegdec.cpp @@ -84,8 +84,8 @@ int32_t jpegdec_seek_callback(JPEGFILE *jpeg, int32_t p) { } int JPEGDraw(JPEGDRAW *pDraw) { -#ifdef MICROPY_EVENT_POLL_HOOK -MICROPY_EVENT_POLL_HOOK +#ifdef mp_event_handle_nowait +mp_event_handle_nowait(); #endif PicoGraphics *current_graphics = (PicoGraphics *)pDraw->pUser; // "pixel" is slow and clipped, diff --git a/micropython/modules/pico_scroll/pico_scroll.cpp b/micropython/modules/pico_scroll/pico_scroll.cpp index 3effcd6f..e382788a 100644 --- a/micropython/modules/pico_scroll/pico_scroll.cpp +++ b/micropython/modules/pico_scroll/pico_scroll.cpp @@ -110,7 +110,7 @@ mp_obj_t picoscroll_scroll_text(mp_uint_t n_args, const mp_obj_t *args) { self->scroll->clear(); self->scroll->set_bitmap_1d((const char *)draw_buffer, draw_buffer_len, brightness, offset); self->scroll->update(); - MICROPY_EVENT_POLL_HOOK + mp_event_handle_nowait(); sleep_ms(delay_ms); } diff --git a/micropython/modules/picographics/picographics.cpp b/micropython/modules/picographics/picographics.cpp index e10f78c8..2a855374 100644 --- a/micropython/modules/picographics/picographics.cpp +++ b/micropython/modules/picographics/picographics.cpp @@ -623,16 +623,16 @@ mp_obj_t ModPicoGraphics_update(mp_obj_t self_in) { */ while(self->display->is_busy()) { - #ifdef MICROPY_EVENT_POLL_HOOK - MICROPY_EVENT_POLL_HOOK + #ifdef mp_event_handle_nowait + mp_event_handle_nowait(); #endif } self->display->update(self->graphics); while(self->display->is_busy()) { - #ifdef MICROPY_EVENT_POLL_HOOK - MICROPY_EVENT_POLL_HOOK + #ifdef mp_event_handle_nowait + mp_event_handle_nowait(); #endif } @@ -647,8 +647,8 @@ mp_obj_t ModPicoGraphics_partial_update(size_t n_args, const mp_obj_t *args) { ModPicoGraphics_obj_t *self = MP_OBJ_TO_PTR2(args[ARG_self], ModPicoGraphics_obj_t); while(self->display->is_busy()) { - #ifdef MICROPY_EVENT_POLL_HOOK - MICROPY_EVENT_POLL_HOOK + #ifdef mp_event_handle_nowait + mp_event_handle_nowait(); #endif } @@ -660,8 +660,8 @@ mp_obj_t ModPicoGraphics_partial_update(size_t n_args, const mp_obj_t *args) { }); while(self->display->is_busy()) { - #ifdef MICROPY_EVENT_POLL_HOOK - MICROPY_EVENT_POLL_HOOK + #ifdef mp_event_handle_nowait + mp_event_handle_nowait(); #endif } diff --git a/micropython/modules/pngdec/pngdec.cpp b/micropython/modules/pngdec/pngdec.cpp index 9e69f596..03903219 100644 --- a/micropython/modules/pngdec/pngdec.cpp +++ b/micropython/modules/pngdec/pngdec.cpp @@ -118,8 +118,8 @@ void pngdec_open_helper(_PNG_obj_t *self) { } void PNGDraw(PNGDRAW *pDraw) { -#ifdef MICROPY_EVENT_POLL_HOOK -MICROPY_EVENT_POLL_HOOK +#ifdef mp_event_handle_nowait +mp_event_handle_nowait(); #endif _PNG_decode_target *target = (_PNG_decode_target*)pDraw->pUser; PicoGraphics *current_graphics = (PicoGraphics *)target->target;