From 881c490ae08e26d9e58d37186e5cab9527fa520e Mon Sep 17 00:00:00 2001 From: travis-farmer Date: Fri, 20 Oct 2023 14:17:12 -0400 Subject: [PATCH] up to date - just one error now --- MotorDriver.cpp | 6 ++---- MotorDriver.h | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MotorDriver.cpp b/MotorDriver.cpp index 2fc726c..8749471 100644 --- a/MotorDriver.cpp +++ b/MotorDriver.cpp @@ -39,9 +39,7 @@ volatile portreg_t shadowPORTD; volatile portreg_t shadowPORTE; volatile portreg_t shadowPORTF; #endif -#ifdef ARDUINO_GIGA -extern gpio_t digitalPinToGpio(int P); -#endif + MotorDriver::MotorDriver(int16_t power_pin, byte signal_pin, byte signal_pin2, int16_t brake_pin, byte current_pin, float sense_factor, unsigned int trip_milliamps, int16_t fault_pin) { const FSH * warnString = F("** WARNING **"); @@ -512,7 +510,7 @@ void MotorDriver::getFastPin(const FSH* type,int pin, bool input, FASTPIN & res #if defined(ARDUINO_GIGA) (void)type; (void)input; // no warnings please - result = digitalPinToGpio(pin); + *result = digitalPinToGpio(pin); #else (void) type; // avoid compiler warning if diag not used above. #if defined(ARDUINO_ARCH_SAMD) diff --git a/MotorDriver.h b/MotorDriver.h index 43acb30..6338c2f 100644 --- a/MotorDriver.h +++ b/MotorDriver.h @@ -127,6 +127,8 @@ typedef uint8_t portreg_t; #if defined(ARDUINO_GIGA) typedef gpio_t FASTPIN; +#include +//extern gpio_t digitalPinToGpio(uint8_t P); #else struct FASTPIN { volatile portreg_t *inout;