From d96c919fee627bfef8052b7d3d0f6ace9de01b47 Mon Sep 17 00:00:00 2001 From: Asbelos Date: Tue, 8 Dec 2020 18:01:22 +0000 Subject: [PATCH] Uno Wifi compiling --- ArduinoTimers.h | 2 +- DCC.h | 2 +- DCCWaveform.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ArduinoTimers.h b/ArduinoTimers.h index 99af18f..85e3644 100644 --- a/ArduinoTimers.h +++ b/ArduinoTimers.h @@ -11,7 +11,7 @@ #include "ATMEGA2560/Timer.h" #elif defined(ARDUINO_AVR_UNO) #include "ATMEGA328/Timer.h" -#elif defined(ARDUINO_ARCH_MEGAAVR) +#elif defined(ARDUINO_AVR_UNO_WIFI_DEV_ED) #include "ATMEGA4809/Timer.h" #else #error "Cannot compile - ArduinoTimers library does not support your board, or you are missing compatible build flags." diff --git a/DCC.h b/DCC.h index b2070a9..05c50e1 100644 --- a/DCC.h +++ b/DCC.h @@ -155,7 +155,7 @@ private: #define ARDUINO_TYPE "NANO" #elif defined(ARDUINO_AVR_MEGA2560) #define ARDUINO_TYPE "MEGA" -#elif defined(ARDUINO_ARCH_MEGAAVR) +#elif defined(ARDUINO_AVR_UNO_WIFI_DEV_ED) #define ARDUINO_TYPE "UNOWIFIR2" #else #error CANNOT COMPILE - DCC++ EX ONLY WORKS WITH AN ARDUINO UNO, NANO 328, OR ARDUINO MEGA 1280/2560 diff --git a/DCCWaveform.cpp b/DCCWaveform.cpp index bec16b3..6c71696 100644 --- a/DCCWaveform.cpp +++ b/DCCWaveform.cpp @@ -41,9 +41,11 @@ void DCCWaveform::begin(MotorDriver * mainDriver, MotorDriver * progDriver, byte progTrack.setPowerMode(POWERMODE::OFF); switch (timerNumber) { case 1: interruptTimer= &TimerA; break; +#ifndef ARDUINO_AVR_UNO_WIFI_DEV_ED case 2: interruptTimer= &TimerB; break; #ifndef ARDUINO_AVR_UNO case 3: interruptTimer= &TimerC; break; +#endif #endif default: DIAG(F("\n\n *** Invalid Timer number %d requested. Only 1..3 valid. DCC will not work.*** \n\n"), timerNumber);