mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-24 21:21:24 +01:00
Uno Wifi compiling
This commit is contained in:
parent
eececa322a
commit
d96c919fee
@ -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."
|
||||
|
2
DCC.h
2
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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user