mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-24 16:46:13 +01:00
keeping up to date
This commit is contained in:
parent
5b4a1dd6fa
commit
94273b6e11
|
@ -57,7 +57,9 @@ MotorDriver::MotorDriver(int16_t power_pin, byte signal_pin, byte signal_pin2, i
|
|||
getFastPin(F("SIG"),signalPin,fastSignalPin);
|
||||
pinMode(signalPin, OUTPUT);
|
||||
|
||||
#ifndef ARDUINO_ARCH_MBED_GIGA
|
||||
fastSignalPin.shadowinout = NULL;
|
||||
#endif
|
||||
if (HAVE_PORTA(fastSignalPin.inout == &PORTA)) {
|
||||
DIAG(F("Found PORTA pin %d"),signalPin);
|
||||
fastSignalPin.shadowinout = fastSignalPin.inout;
|
||||
|
@ -95,7 +97,9 @@ MotorDriver::MotorDriver(int16_t power_pin, byte signal_pin, byte signal_pin2, i
|
|||
getFastPin(F("SIG2"),signalPin2,fastSignalPin2);
|
||||
pinMode(signalPin2, OUTPUT);
|
||||
|
||||
#ifndef ARDUINO_ARCH_MBED_ARDUINO
|
||||
fastSignalPin2.shadowinout = NULL;
|
||||
#endif
|
||||
if (HAVE_PORTA(fastSignalPin2.inout == &PORTA)) {
|
||||
DIAG(F("Found PORTA pin %d"),signalPin2);
|
||||
fastSignalPin2.shadowinout = fastSignalPin2.inout;
|
||||
|
|
|
@ -30,10 +30,9 @@
|
|||
// use powers of two so we can do logical and/or on the track modes in if clauses.
|
||||
enum TRACK_MODE : byte {TRACK_MODE_NONE = 1, TRACK_MODE_MAIN = 2, TRACK_MODE_PROG = 4,
|
||||
TRACK_MODE_DC = 8, TRACK_MODE_DCX = 16, TRACK_MODE_EXT = 32};
|
||||
#if defined(ARDUINO_GIGA)
|
||||
|
||||
#define setHIGH(fastpin) gpio_write(&fastpin, 1)
|
||||
#define setLOW(fastpin) gpio_write(&fastpin, 0)
|
||||
#ifdef ARDUINO_ARCH_MBED_GIGA
|
||||
#define setHIGH(fastpin) (gpio_read(&fastpin)==1)
|
||||
#define setLOW(fastpin) (gpio_read(&fastpin)==0)
|
||||
#else
|
||||
#define setHIGH(fastpin) *fastpin.inout |= fastpin.maskHIGH
|
||||
#define setLOW(fastpin) *fastpin.inout &= fastpin.maskLOW
|
||||
|
|
Loading…
Reference in New Issue
Block a user