1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-26 17:46:14 +01:00

Various SAMC/SAMD defs

This commit is contained in:
pmantoine 2022-06-03 17:15:46 +08:00
parent cb365579d8
commit 1d36b03e7a
3 changed files with 6 additions and 8 deletions

View File

@ -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("<iDCC-EX V-%S / %S / %S G-%S>\n"), F(VERSION), F(ARDUINO_TYPE), shieldName, F(GITHUB_SHA));
#else
StringFormatter::send(Serial,F("<iDCC-EX V-%S / %S / %S G-%S>\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

View File

@ -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

View File

@ -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 :-)