File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -102,15 +102,15 @@ void mp_hal_delay_ms(mp_uint_t delay) {
102
102
while (remaining > 0 ) {
103
103
RUN_BACKGROUND_TASKS ;
104
104
// Check to see if we've been CTRL-Ced by autoreload or the user.
105
- if (MP_STATE_VM (mp_pending_exception ) == MP_OBJ_FROM_PTR (& MP_STATE_VM (mp_kbd_exception )) ||
106
- MP_STATE_VM (mp_pending_exception ) == MP_OBJ_FROM_PTR (& MP_STATE_VM (mp_reload_exception )) ||
107
- WATCHDOG_EXCEPTION_CHECK ()) {
108
- if (MP_STATE_VM (mp_pending_exception ) == MP_OBJ_FROM_PTR (& MP_STATE_VM (mp_kbd_exception )))
105
+ if (MP_STATE_VM (mp_pending_exception ) == MP_OBJ_FROM_PTR (& MP_STATE_VM (mp_kbd_exception )))
109
106
{
110
107
// clear exception and generate stacktrace
111
108
MP_STATE_VM (mp_pending_exception ) = MP_OBJ_NULL ;
112
109
nlr_raise (mp_obj_new_exception (& mp_type_KeyboardInterrupt ));
113
- }
110
+ }
111
+ if ( MP_STATE_VM (mp_pending_exception ) == MP_OBJ_FROM_PTR (& MP_STATE_VM (mp_reload_exception )) ||
112
+ WATCHDOG_EXCEPTION_CHECK ()) {
113
+ // stop sleeping immediately
114
114
break ;
115
115
}
116
116
remaining = end_tick - port_get_raw_ticks (NULL );
You can’t perform that action at this time.
0 commit comments