diff --git a/DCC.h b/DCC.h index a224fb9..c4a6ae3 100644 --- a/DCC.h +++ b/DCC.h @@ -168,8 +168,16 @@ private: #define ARDUINO_TYPE "MEGA" #elif defined(ARDUINO_ARCH_MEGAAVR) #define ARDUINO_TYPE "MEGAAVR" -#elif defined(TEENSYDUINO) -#define ARDUINO_TYPE "TEENSY" +#elif defined(ARDUINO_TEENSY32) +#define ARDUINO_TYPE "TEENSY32" +#elif defined(ARDUINO_TEENSY35) +#define ARDUINO_TYPE "TEENSY35" +#elif defined(ARDUINO_TEENSY36) +#define ARDUINO_TYPE "TEENSY36" +#elif defined(ARDUINO_TEENSY40) +#define ARDUINO_TYPE "TEENSY40" +#elif defined(ARDUINO_TEENSY41) +#define ARDUINO_TYPE "TEENSY41" #else #error CANNOT COMPILE - DCC++ EX ONLY WORKS WITH AN ARDUINO UNO, NANO 328, OR ARDUINO MEGA 1280/2560 #endif diff --git a/DCCWaveform.cpp b/DCCWaveform.cpp index c87f768..125bc93 100644 --- a/DCCWaveform.cpp +++ b/DCCWaveform.cpp @@ -52,12 +52,19 @@ void DCCWaveform::begin(MotorDriver * mainDriver, MotorDriver * progDriver) { DCCTimer::begin(DCCWaveform::interruptHandler); } +#if defined(TEENSYDUINO) void DCCWaveform::loop(bool ackManagerActive) { noInterrupts(); mainTrack.checkPowerOverload(false); progTrack.checkPowerOverload(ackManagerActive); interrupts(); } +#else +void DCCWaveform::loop(bool ackManagerActive) { + mainTrack.checkPowerOverload(false); + progTrack.checkPowerOverload(ackManagerActive); +} +#endif void DCCWaveform::interruptHandler() { // call the timer edge sensitive actions for progtrack and maintrack