diff --git a/DCC.cpp b/DCC.cpp index 05fb00a..f59d880 100644 --- a/DCC.cpp +++ b/DCC.cpp @@ -62,8 +62,11 @@ byte DCC::globalSpeedsteps=128; void DCC::begin(const FSH * motorShieldName) { shieldName=(FSH *)motorShieldName; +#if defined(ARDUINO_ARCH_SAMD) + StringFormatter::send(SerialUSB,F("\n"), F(VERSION), F(ARDUINO_TYPE), shieldName, F(GITHUB_SHA)); +#else StringFormatter::send(Serial,F("\n"), F(VERSION), F(ARDUINO_TYPE), shieldName, F(GITHUB_SHA)); - +#endif #ifndef DISABLE_EEPROM // Load stuff from EEprom (void)EEPROM; // tell compiler not to warn this is unused diff --git a/EEStore.cpp b/EEStore.cpp index a441f00..89577aa 100644 --- a/EEStore.cpp +++ b/EEStore.cpp @@ -31,12 +31,12 @@ #include "Sensors.h" #include "Turnouts.h" -#if defined(ARDUINO_ARCH_SAMD) +#if defined(ARDUINO_ARCH_SAMC) ExternalEEPROM EEPROM; #endif void EEStore::init() { -#if defined(ARDUINO_ARCH_SAMD) +#if defined(ARDUINO_ARCH_SAMC) EEPROM.begin(0x50); // Address for Microchip 24-series EEPROM with all three // A pins grounded (0b1010000 = 0x50) #endif diff --git a/defines.h b/defines.h index 19ebb4a..f48811c 100644 --- a/defines.h +++ b/defines.h @@ -77,12 +77,7 @@ // 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 // on the SAMD platform - going to try to rebase to current TrackManager in case it's not my bug :-)