@@ -122,8 +122,8 @@ mp_obj_t Badger2040_update(mp_obj_t self_in) {
122
122
_Badger2040_obj_t *self = MP_OBJ_TO_PTR2 (self_in, _Badger2040_obj_t);
123
123
124
124
while (self->badger2040 ->is_busy ()) {
125
- #ifdef MICROPY_EVENT_POLL_HOOK
126
- MICROPY_EVENT_POLL_HOOK
125
+ #ifdef mp_event_handle_nowait
126
+ mp_event_handle_nowait ();
127
127
#endif
128
128
}
129
129
@@ -133,8 +133,8 @@ MICROPY_EVENT_POLL_HOOK
133
133
// Ensure blocking for the minimum amount of time
134
134
// in cases where "is_busy" is unreliable.
135
135
while (self->badger2040 ->is_busy () || absolute_time_diff_us (get_absolute_time (), t_end) > 0 ) {
136
- #ifdef MICROPY_EVENT_POLL_HOOK
137
- MICROPY_EVENT_POLL_HOOK
136
+ #ifdef mp_event_handle_nowait
137
+ mp_event_handle_nowait ();
138
138
#endif
139
139
}
140
140
@@ -166,8 +166,8 @@ mp_obj_t Badger2040_partial_update(size_t n_args, const mp_obj_t *pos_args, mp_m
166
166
167
167
168
168
while (self->badger2040 ->is_busy ()) {
169
- #ifdef MICROPY_EVENT_POLL_HOOK
170
- MICROPY_EVENT_POLL_HOOK
169
+ #ifdef mp_event_handle_nowait
170
+ mp_event_handle_nowait ();
171
171
#endif
172
172
}
173
173
@@ -177,8 +177,8 @@ MICROPY_EVENT_POLL_HOOK
177
177
// Ensure blocking for the minimum amount of time
178
178
// in cases where "is_busy" is unreliable.
179
179
while (self->badger2040 ->is_busy () || absolute_time_diff_us (get_absolute_time (), t_end) > 0 ) {
180
- #ifdef MICROPY_EVENT_POLL_HOOK
181
- MICROPY_EVENT_POLL_HOOK
180
+ #ifdef mp_event_handle_nowait
181
+ mp_event_handle_nowait ();
182
182
#endif
183
183
}
184
184
@@ -199,8 +199,8 @@ mp_obj_t Badger2040_halt(mp_obj_t self_in) {
199
199
200
200
self->badger2040 ->update_button_states ();
201
201
while (self->badger2040 ->button_states () == 0 ) {
202
- #ifdef MICROPY_EVENT_POLL_HOOK
203
- MICROPY_EVENT_POLL_HOOK
202
+ #ifdef mp_event_handle_nowait
203
+ mp_event_handle_nowait ();
204
204
#endif
205
205
self->badger2040 ->update_button_states ();
206
206
}
0 commit comments