File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,20 +148,3 @@ typedef long mp_off_t;
148148#endif
149149
150150#define MP_STATE_PORT MP_STATE_VM
151-
152- #if MICROPY_PY_THREAD
153- #define MICROPY_EVENT_POLL_HOOK \
154- do { \
155- extern void mp_handle_pending(mp_handle_pending_behaviour_t behavior); \
156- mp_handle_pending(true); \
157- MP_THREAD_GIL_EXIT(); \
158- MP_THREAD_GIL_ENTER(); \
159- } while (0);
160- #else
161- #define MICROPY_EVENT_POLL_HOOK \
162- do { \
163- extern void mp_handle_pending(mp_handle_pending_behaviour_t behavior); \
164- mp_handle_pending(true); \
165- asm ("waiti 0"); \
166- } while (0);
167- #endif
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ int mp_hal_stdin_rx_chr(void) {
187187 }
188188 MP_THREAD_GIL_ENTER ();
189189
190- MICROPY_EVENT_POLL_HOOK
190+ mp_event_wait_ms ( 1 );
191191 }
192192}
193193
@@ -247,7 +247,7 @@ void mp_hal_delay_ms(mp_uint_t ms) {
247247 if (wait_time >= ms ) {
248248 return ;
249249 }
250- MICROPY_EVENT_POLL_HOOK ;
250+ mp_event_wait_ms ( 1 ) ;
251251 t1 = mp_hal_ticks_us ();
252252 dt = t1 - t0 ;
253253 if (dt / 1000 >= ms ) {
You can’t perform that action at this time.
0 commit comments