8000 Turn off IRQ on stopWaveform after Tone timeout by earlephilhower · Pull Request #7232 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

Turn off IRQ on stopWaveform after Tone timeout #7232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix syntax error
  • Loading branch information
earlephilhower committed Apr 20, 2020
commit 70a38d7c809156a9a23f7ee639f9b6a228ab5628
3 changes: 2 additions & 1 deletion cores/esp8266/core_esp8266_waveform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,14 @@ int ICACHE_RAM_ATTR stopWaveform(uint8_t pin) {
if (!timerRunning) {
return false;
}
uint32_t mask = 1<<pin;
waveformToDisable |= mask;
// Ensure timely service....
if (T1L > microsecondsToClockCycles(10)) {
timer1_write(microsecondsToClockCycles(10));
}
while (waveformToDisable) {
/* no-op */ // Can't delay() because stopWaveform may be called from an IRQ
/* no-op */ // Can't delay() since stopWaveform may be called from an IRQ
}
if (!waveformEnabled && !timer1CB) {
deinitTimer();
Expand Down
0