We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b4d12a commit c2aa54aCopy full SHA for c2aa54a
ports/esp32s2/supervisor/port.c
@@ -203,7 +203,16 @@ void port_sleep_until_interrupt(void) {
203
if (sleep_time_duration == 0) {
204
return;
205
}
206
- vTaskDelayUntil(&sleep_time_set, sleep_time_duration);
+ // Need to run in a loop in order to check if CTRL-C was received
207
+ TickType_t start_ticks = 0;
208
+ while (sleep_time_duration > start_ticks ) {
209
+ vTaskDelayUntil(&sleep_time_set, 1);
210
+ if ( mp_hal_is_interrupted() ) {
211
+ mp_handle_pending();
212
+ }
213
+ start_ticks = start_ticks + 1;
214
215
+
216
217
218
0 commit comments