forked from espressif/arduino-esp32
Disable IRAM ISRs and functions by default
This commit is contained in:
@ -15,7 +15,7 @@ public:
|
||||
detachInterrupt(PIN);
|
||||
}
|
||||
|
||||
void IRAM_ATTR isr() {
|
||||
void ARDUINO_ISR_ATTR isr() {
|
||||
numberKeyPresses += 1;
|
||||
pressed = true;
|
||||
}
|
||||
|
@ -9,13 +9,13 @@ struct Button {
|
||||
Button button1 = {23, 0, false};
|
||||
Button button2 = {18, 0, false};
|
||||
|
||||
void IRAM_ATTR isr(void* arg) {
|
||||
void ARDUINO_ISR_ATTR isr(void* arg) {
|
||||
Button* s = static_cast<Button*>(arg);
|
||||
s->numberKeyPresses += 1;
|
||||
s->pressed = true;
|
||||
}
|
||||
|
||||
void IRAM_ATTR isr() {
|
||||
void ARDUINO_ISR_ATTR isr() {
|
||||
button2.numberKeyPresses += 1;
|
||||
button2.pressed = true;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ portMUX_TYPE timerMux = portMUX_INITIALIZER_UNLOCKED;
|
||||
volatile uint32_t isrCounter = 0;
|
||||
volatile uint32_t lastIsrAt = 0;
|
||||
|
||||
void IRAM_ATTR onTimer(){
|
||||
void ARDUINO_ISR_ATTR onTimer(){
|
||||
// Increment the counter and set the time of ISR
|
||||
portENTER_CRITICAL_ISR(&timerMux);
|
||||
isrCounter++;
|
||||
|
@ -4,7 +4,7 @@ const int button = 0; //gpio to use to trigger delay
|
||||
const int wdtTimeout = 3000; //time in ms to trigger the watchdog
|
||||
hw_timer_t *timer = NULL;
|
||||
|
||||
void IRAM_ATTR resetModule() {
|
||||
void ARDUINO_ISR_ATTR resetModule() {
|
||||
ets_printf("reboot\n");
|
||||
esp_restart();
|
||||
}
|
||||
|
Reference in New Issue
Block a user