1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +01:00

Fix SAMD21 EEPROM and prepare for initial testing.

This commit is contained in:
David Cutting 2020-05-27 22:56:29 -06:00
parent 37824f586b
commit 9c66b0aea7
2 changed files with 5 additions and 4 deletions

View File

@ -9,7 +9,7 @@
; https://docs.platformio.org/page/projectconf.html
[platformio]
default_envs = samd21
default_envs = samd21, mega2560, mega328
[env]
lib_deps =

View File

@ -8,13 +8,13 @@
// Motor driver selection:
// Comment out all but the two lines that you want to use
// ;DCC* mainTrack = DCC::Create_WSM_SAMCommandStation_Main(50);
// DCC* mainTrack = DCC::Create_WSM_SAMCommandStation_Main(50);
// DCC* progTrack = DCC::Create_WSM_SAMCommandStation_Prog(2);
// DCC* mainTrack = DCC::Create_Arduino_L298Shield_Main(50);
// DCC* progTrack = DCC::Create_Arduino_L298Shield_Prog(2);
DCC* mainTrack = DCC::Create_Pololu_MC33926Shield_Main(10);
DCC* mainTrack = DCC::Create_Pololu_MC33926Shield_Main(50);
DCC* progTrack = DCC::Create_Pololu_MC33926Shield_Prog(2);
////////////////////////////////////////////////////////////////
@ -34,11 +34,12 @@ void setup() {
#if defined (ARDUINO_ARCH_SAMD)
CommManager::registerInterface(new USBInterface(SerialUSB)); // Register SerialUSB as an interface
Wire.begin(); // Needed for EEPROM to work
#elif defined(ARDUINO_ARCH_AVR)
CommManager::registerInterface(new SerialInterface(Serial)); // Register Serial (USB port on mega/uno) as an interface
#endif
//EEStore::init();
EEStore::init();
StringParser::init(mainTrack, progTrack); // Set up the string parser to accept commands from the interfaces
CommManager::showInitInfo();