From cb365579d8abbcd0990e201cb0a0e8c7c01ea2bd Mon Sep 17 00:00:00 2001 From: pmantoine Date: Thu, 5 May 2022 21:20:49 +0800 Subject: [PATCH] Minor edits. --- DCCTimerSAMD.cpp | 5 +++-- defines.h | 20 +++++++++++++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/DCCTimerSAMD.cpp b/DCCTimerSAMD.cpp index 159dd55..88603e6 100644 --- a/DCCTimerSAMD.cpp +++ b/DCCTimerSAMD.cpp @@ -119,8 +119,9 @@ void TCC2_Handler() { bool DCCTimer::isPWMPin(byte pin) { - //TODO: SAMD test this works! -// return digitalPinHasPWM(pin); + //TODO: SAMD whilst this call to digitalPinHasPWM will reveal which pins can do PWM, + // there's no support yet for High Accuracy, so for now return false + // return digitalPinHasPWM(pin); return false; } diff --git a/defines.h b/defines.h index aba5daf..19ebb4a 100644 --- a/defines.h +++ b/defines.h @@ -77,15 +77,21 @@ // This defines the speed at which the Arduino will communicate with the ESP8266 module. // Currently only devices which can communicate at 115200 are supported. // +// TODO: PMA remove! Need 9600bps for Sparkfun shield with old firmware! +#if defined(ARDUINO_ARCH_SAMD) #define WIFI_SERIAL_LINK_SPEED 9600 +#else +#define WIFI_SERIAL_LINK_SPEED 115200 +#endif // TODO: PMA - figure out why enabling this causes the CS to crashe immediately after starting the motor driver -//#if __has_include ( "myAutomation.h") -// #if defined(BIG_RAM) || defined(DISABLE_EEPROM) -// #define EXRAIL_ACTIVE -// #else -// #define EXRAIL_WARNING -// #endif -//#endif +// on the SAMD platform - going to try to rebase to current TrackManager in case it's not my bug :-) +#if __has_include ( "myAutomation.h") + #if defined(BIG_RAM) || defined(DISABLE_EEPROM) + #define EXRAIL_ACTIVE + #else + #define EXRAIL_WARNING + #endif +#endif #endif