mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-30 03:26:13 +01:00
Minor changes to Arduino Type List & DCCWaveform
This commit is contained in:
parent
8e63c452b2
commit
54773297bf
12
DCC.h
12
DCC.h
|
@ -168,8 +168,16 @@ private:
|
||||||
#define ARDUINO_TYPE "MEGA"
|
#define ARDUINO_TYPE "MEGA"
|
||||||
#elif defined(ARDUINO_ARCH_MEGAAVR)
|
#elif defined(ARDUINO_ARCH_MEGAAVR)
|
||||||
#define ARDUINO_TYPE "MEGAAVR"
|
#define ARDUINO_TYPE "MEGAAVR"
|
||||||
#elif defined(TEENSYDUINO)
|
#elif defined(ARDUINO_TEENSY32)
|
||||||
#define ARDUINO_TYPE "TEENSY"
|
#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
|
#else
|
||||||
#error CANNOT COMPILE - DCC++ EX ONLY WORKS WITH AN ARDUINO UNO, NANO 328, OR ARDUINO MEGA 1280/2560
|
#error CANNOT COMPILE - DCC++ EX ONLY WORKS WITH AN ARDUINO UNO, NANO 328, OR ARDUINO MEGA 1280/2560
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -52,12 +52,19 @@ void DCCWaveform::begin(MotorDriver * mainDriver, MotorDriver * progDriver) {
|
||||||
DCCTimer::begin(DCCWaveform::interruptHandler);
|
DCCTimer::begin(DCCWaveform::interruptHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(TEENSYDUINO)
|
||||||
void DCCWaveform::loop(bool ackManagerActive) {
|
void DCCWaveform::loop(bool ackManagerActive) {
|
||||||
noInterrupts();
|
noInterrupts();
|
||||||
mainTrack.checkPowerOverload(false);
|
mainTrack.checkPowerOverload(false);
|
||||||
progTrack.checkPowerOverload(ackManagerActive);
|
progTrack.checkPowerOverload(ackManagerActive);
|
||||||
interrupts();
|
interrupts();
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
void DCCWaveform::loop(bool ackManagerActive) {
|
||||||
|
mainTrack.checkPowerOverload(false);
|
||||||
|
progTrack.checkPowerOverload(ackManagerActive);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void DCCWaveform::interruptHandler() {
|
void DCCWaveform::interruptHandler() {
|
||||||
// call the timer edge sensitive actions for progtrack and maintrack
|
// call the timer edge sensitive actions for progtrack and maintrack
|
||||||
|
|
Loading…
Reference in New Issue
Block a user