Skip to content

Commit ca28263

Browse files
committed
Must always recompute new waveform.nextEventCcy if there is any busy pin.
1 parent 0e8361c commit ca28263

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp8266/core_esp8266_waveform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ static ICACHE_RAM_ATTR void timer1Interrupt() {
308308
// Exit the loop if the next event, if any, is sufficiently distant.
309309
const uint32_t isrTimeoutCcy = isrStartCcy + ISRTIMEOUTCCYS;
310310
uint32_t busyPins = (static_cast<int32_t>(waveform.nextEventCcy - isrTimeoutCcy) < 0) ? waveform.enabled : 0;
311-
if (!waveform.enabled) {
311+
if (!waveform.enabled || busyPins) {
312312
waveform.nextEventCcy = isrStartCcy + MAXIRQTICKSCCYS;
313313
}
314314

0 commit comments

Comments
 (0)