summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2023-10-11 10:46:05 +0200
committerJonas Smedegaard <dr@jones.dk>2023-10-11 10:46:05 +0200
commit55dbb48c882fe50ecc32ba710414ec4da74eddbb (patch)
tree648f9358b7120306731e32c20eac502c89cf327c
parente8b5d5cb0840d3da931fe87b5e9b5cb3e3e77d5d (diff)
set IRAM_ATTR on ESP32, to avoid complex to debug crash
-rw-r--r--main.ino9
1 files changed, 9 insertions, 0 deletions
diff --git a/main.ino b/main.ino
index 88d132f..a4c64bc 100644
--- a/main.ino
+++ b/main.ino
@@ -54,16 +54,25 @@ void loop() {
button_select.read();
}
+#if (ESP32)
+IRAM_ATTR // avoid crash e.g. when other code reads SD card
+#endif
void onButtonMovePressed() {
Serial.println("button MOVE clicked");
led.blink2();
}
+#if (ESP32)
+IRAM_ATTR // avoid crash e.g. when other code reads SD card
+#endif
void onButtonMoveLongpressed() {
Serial.println("button MOVE long-clicked");
led.off();
}
+#if (ESP32)
+IRAM_ATTR // avoid crash e.g. when other code reads SD card
+#endif
void onButtonSelectPressed() {
Serial.println("button SELECT clicked");
led.on();