Skip to content
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

Make stopWaveform call interrupt callable #5248

Merged
merged 3 commits into from
Oct 16, 2018
Merged
Changes from all commits
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
6 changes: 3 additions & 3 deletions cores/esp8266/core_esp8266_waveform.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include "core_esp8266_waveform.h"

// Need speed, not size, here
#pragma GCC optimize ("O3")
#pragma GCC optimize ("O2")

// Maximum delay between IRQs
#define MAXIRQUS (10000)
Expand Down Expand Up @@ -137,7 +137,7 @@ static void initTimer() {
timerRunning = true;
}

static void deinitTimer() {
static void ICACHE_RAM_ATTR deinitTimer() {
timer1_attachInterrupt(NULL);
timer1_disable();
timer1_isr_init();
Expand Down Expand Up @@ -202,7 +202,7 @@ int startWaveform(uint8_t pin, uint32_t timeHighUS, uint32_t timeLowUS, uint32_t
}

// Stops a waveform on a pin
int stopWaveform(uint8_t pin) {
int ICACHE_RAM_ATTR stopWaveform(uint8_t pin) {
// Can't possibly need to stop anything if there is no timer active
if (!timerRunning) {
return false;
Expand Down