mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-24 16:46:13 +01:00
compiles, but no link..
This commit is contained in:
parent
3d4b80d02e
commit
809388c547
|
@ -510,7 +510,7 @@ void MotorDriver::getFastPin(const FSH* type,int pin, bool input, FASTPIN & res
|
||||||
#if defined(ARDUINO_GIGA)
|
#if defined(ARDUINO_GIGA)
|
||||||
(void)type;
|
(void)type;
|
||||||
(void)input; // no warnings please
|
(void)input; // no warnings please
|
||||||
result = digitalPinToGpio(pin);
|
result = pin;
|
||||||
#else
|
#else
|
||||||
(void) type; // avoid compiler warning if diag not used above.
|
(void) type; // avoid compiler warning if diag not used above.
|
||||||
#if defined(ARDUINO_ARCH_SAMD)
|
#if defined(ARDUINO_ARCH_SAMD)
|
||||||
|
|
|
@ -31,15 +31,17 @@
|
||||||
enum TRACK_MODE : byte {TRACK_MODE_NONE = 1, TRACK_MODE_MAIN = 2, TRACK_MODE_PROG = 4,
|
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};
|
TRACK_MODE_DC = 8, TRACK_MODE_DCX = 16, TRACK_MODE_EXT = 32};
|
||||||
#ifdef ARDUINO_GIGA
|
#ifdef ARDUINO_GIGA
|
||||||
#define setHIGH(fastpin) gpio_write(&fastpin, 1)
|
#include <pinDefinitions.h>
|
||||||
#define setLOW(fastpin) gpio_write(&fastpin, 0)
|
//extern gpio_t digitalPinToGpio(int P);
|
||||||
|
#define setHIGH(fastpin) digitalWrite(fastpin, 1)
|
||||||
|
#define setLOW(fastpin) digitalWrite(fastpin, 0)
|
||||||
#else
|
#else
|
||||||
#define setHIGH(fastpin) *fastpin.inout |= fastpin.maskHIGH
|
#define setHIGH(fastpin) *fastpin.inout |= fastpin.maskHIGH
|
||||||
#define setLOW(fastpin) *fastpin.inout &= fastpin.maskLOW
|
#define setLOW(fastpin) *fastpin.inout &= fastpin.maskLOW
|
||||||
#endif
|
#endif
|
||||||
#if defined(ARDUINO_GIGA)
|
#if defined(ARDUINO_GIGA)
|
||||||
#define isHIGH(fastpin) (gpio_read(&fastpin)==1)
|
#define isHIGH(fastpin) (digitalRead(fastpin)==1)
|
||||||
#define isLOW(fastpin) (gpio_read(&fastpin)==0)
|
#define isLOW(fastpin) (digitalRead(fastpin)==0)
|
||||||
#else
|
#else
|
||||||
#define isHIGH(fastpin) (*fastpin.inout & fastpin.maskHIGH)
|
#define isHIGH(fastpin) (*fastpin.inout & fastpin.maskHIGH)
|
||||||
#define isLOW(fastpin) (!isHIGH(fastpin))
|
#define isLOW(fastpin) (!isHIGH(fastpin))
|
||||||
|
@ -126,9 +128,9 @@ typedef uint8_t portreg_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ARDUINO_GIGA)
|
#if defined(ARDUINO_GIGA)
|
||||||
typedef gpio_t FASTPIN;
|
typedef pin_size_t FASTPIN;
|
||||||
#include <pinDefinitions.h>
|
|
||||||
//extern gpio_t digitalPinToGpio(uint8_t P);
|
|
||||||
#else
|
#else
|
||||||
struct FASTPIN {
|
struct FASTPIN {
|
||||||
volatile portreg_t *inout;
|
volatile portreg_t *inout;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user