diff options
author | Jonas Smedegaard <dr@jones.dk> | 2023-10-11 10:46:05 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2023-10-11 10:46:05 +0200 |
commit | 55dbb48c882fe50ecc32ba710414ec4da74eddbb (patch) | |
tree | 648f9358b7120306731e32c20eac502c89cf327c | |
parent | e8b5d5cb0840d3da931fe87b5e9b5cb3e3e77d5d (diff) |
set IRAM_ATTR on ESP32, to avoid complex to debug crash
-rw-r--r-- | main.ino | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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(); |