From 55dbb48c882fe50ecc32ba710414ec4da74eddbb Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 11 Oct 2023 10:46:05 +0200 Subject: set IRAM_ATTR on ESP32, to avoid complex to debug crash --- main.ino | 9 +++++++++ 1 file changed, 9 insertions(+) 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(); -- cgit v1.2.3