We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d89091e commit 9d20ef5Copy full SHA for 9d20ef5
libraries/FunctionalInterrupt/examples/Functional/Functional.ino
@@ -1,5 +1,9 @@
1
#include <FunctionalInterrupt.h>
2
3
+#ifndef IRAM_ATTR
4
+#define IRAM_ATTR ICACHE_RAM_ATTR
5
+#endif
6
+
7
#if defined(ESP32)
8
#define BUTTON1 16
9
#define BUTTON2 17
@@ -32,21 +36,13 @@ class Button {
32
36
detachInterrupt(PIN);
33
37
}
34
38
35
-#if defined(ESP8266)
- void ICACHE_RAM_ATTR buttonIsr()
-#elif defined(ESP32)
39
void IRAM_ATTR buttonIsr()
-#endif
40
{
41
numberKeyPresses += 1;
42
pressed = true;
43
44
45
46
- static void ICACHE_RAM_ATTR buttonIsr_static(Button* const self)
47
48
static void IRAM_ATTR buttonIsr_static(Button* const self)
49
50
51
self->buttonIsr();
52
0 commit comments