From c5b283bd8ccc59351dfb6231ecd46c2ca8640412 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sun, 31 Oct 2021 01:10:13 +0200 Subject: [PATCH] should compile for all boards --- DCCEXParser.cpp | 2 +- DCCTimer.h | 9 +++++++++ DCCWaveform.cpp | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp index c8d7fde..c83c0e0 100644 --- a/DCCEXParser.cpp +++ b/DCCEXParser.cpp @@ -17,10 +17,10 @@ * You should have received a copy of the GNU General Public License * along with CommandStation. If not, see . */ +#include "DCC.h" // includes "Motordriver.h" and #include "defines.h" #include "StringFormatter.h" #include "DCCEXParser.h" -#include "DCC.h" #include "DCCWaveform.h" #include "Turnouts.h" #include "Outputs.h" diff --git a/DCCTimer.h b/DCCTimer.h index d421828..0af3614 100644 --- a/DCCTimer.h +++ b/DCCTimer.h @@ -37,5 +37,14 @@ class DCCTimer { private: }; +#if defined(ARDUINO_ARCH_ESP32) extern portMUX_TYPE timerMux; #endif + +#if !(defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266)) +#ifndef IRAM_ATTR +#define IRAM_ATTR +#endif +#endif + +#endif //DCCTimer.h diff --git a/DCCWaveform.cpp b/DCCWaveform.cpp index 439e781..a8b83e4 100644 --- a/DCCWaveform.cpp +++ b/DCCWaveform.cpp @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with CommandStation. If not, see . */ - #pragma GCC optimize ("-O3") +#pragma GCC optimize ("-O3") #include #include "defines.h"