esp8266/modmachine: Call ets_event_poll after waiti in machine.idle.
Because "waiti 0" may have waited for a while (eg 500ms) and the internal WDT may need to be fed immediately. Fixes issue #4459.
This commit is contained in:
parent
9b2a97a903
commit
8ce22662fe
@ -92,6 +92,7 @@ STATIC mp_obj_t machine_idle(void) {
|
||||
uint32_t t = mp_hal_ticks_cpu();
|
||||
asm("waiti 0");
|
||||
t = mp_hal_ticks_cpu() - t;
|
||||
ets_event_poll(); // handle any events after possibly a long wait (eg feed WDT)
|
||||
return MP_OBJ_NEW_SMALL_INT(t);
|
||||
}
|
||||
STATIC MP_DEFINE_CONST_FUN_OBJ_0(machine_idle_obj, machine_idle);
|
||||
|
Loading…
Reference in New Issue
Block a user