From f1aace96d5b4050e07f560e6d90e442d873d0020 Mon Sep 17 00:00:00 2001 From: travis-farmer Date: Sun, 22 Oct 2023 11:43:48 -0400 Subject: [PATCH] haba's changes --- MotorDriver.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MotorDriver.h b/MotorDriver.h index 1f50887..a3b21ce 100644 --- a/MotorDriver.h +++ b/MotorDriver.h @@ -164,6 +164,12 @@ class MotorDriver { // otherwise the call from interrupt context can undo whatever we do // from outside interrupt void setBrake( bool on, bool interruptContext=false); + #if defined(ARDUINO_GIGA) + __attribute__((always_inline)) inline void setSignal( bool high) { + digitalWrite(signalPin, high); + if (dualSignal) digitalWrite(signalPin2, !high); + }; + #else __attribute__((always_inline)) inline void setSignal( bool high) { if (trackPWM) { DCCTimer::setPWM(signalPin,high); @@ -179,6 +185,7 @@ class MotorDriver { } } }; + #endif inline void enableSignal(bool on) { if (on) pinMode(signalPin, OUTPUT);