8000 Updating "now" in the inner loop should lessen interference · dok-net/arduino-esp8266@f1ac5c4 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f1ac5c4

Browse files
committed
Updating "now" in the inner loop should lessen interference
1 parent 3ecb369 commit f1ac5c4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cores/esp8266/core_esp8266_waveform.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,10 +389,9 @@ static ICACHE_RAM_ATTR void timer1Interrupt() {
389389
nextTimerCcy = wave.nextEventCcy;
390390
nextPin = pin;
391391
}
392-
392+
now = ESP.getCycleCount();
393393
} while ((pin = (pin < endPin) ? pin + 1 : startPin, pin != stopPin));
394394

395-
now = ESP.getCycleCount();
396395
const int32_t timerMarginCcys = isrTimeoutCcy - nextTimerCcy;
397396
busy = timerMarginCcys > 0;
398397
if (busy) {

0 commit comments

Comments
 (0)
0