mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 16:16:13 +01:00
Fix SAMD21 EEPROM and prepare for initial testing.
This commit is contained in:
parent
37824f586b
commit
9c66b0aea7
|
@ -9,7 +9,7 @@
|
||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[platformio]
|
[platformio]
|
||||||
default_envs = samd21
|
default_envs = samd21, mega2560, mega328
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
// Motor driver selection:
|
// Motor driver selection:
|
||||||
// Comment out all but the two lines that you want to use
|
// 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* progTrack = DCC::Create_WSM_SAMCommandStation_Prog(2);
|
||||||
|
|
||||||
// DCC* mainTrack = DCC::Create_Arduino_L298Shield_Main(50);
|
// DCC* mainTrack = DCC::Create_Arduino_L298Shield_Main(50);
|
||||||
// DCC* progTrack = DCC::Create_Arduino_L298Shield_Prog(2);
|
// 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);
|
DCC* progTrack = DCC::Create_Pololu_MC33926Shield_Prog(2);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
@ -34,11 +34,12 @@ void setup() {
|
||||||
|
|
||||||
#if defined (ARDUINO_ARCH_SAMD)
|
#if defined (ARDUINO_ARCH_SAMD)
|
||||||
CommManager::registerInterface(new USBInterface(SerialUSB)); // Register SerialUSB as an interface
|
CommManager::registerInterface(new USBInterface(SerialUSB)); // Register SerialUSB as an interface
|
||||||
|
Wire.begin(); // Needed for EEPROM to work
|
||||||
#elif defined(ARDUINO_ARCH_AVR)
|
#elif defined(ARDUINO_ARCH_AVR)
|
||||||
CommManager::registerInterface(new SerialInterface(Serial)); // Register Serial (USB port on mega/uno) as an interface
|
CommManager::registerInterface(new SerialInterface(Serial)); // Register Serial (USB port on mega/uno) as an interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//EEStore::init();
|
EEStore::init();
|
||||||
|
|
||||||
StringParser::init(mainTrack, progTrack); // Set up the string parser to accept commands from the interfaces
|
StringParser::init(mainTrack, progTrack); // Set up the string parser to accept commands from the interfaces
|
||||||
CommManager::showInitInfo();
|
CommManager::showInitInfo();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user