mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-03 12:55:03 +01:00
More library changes.
This commit is contained in:
parent
545eb54ee5
commit
872ed372df
16
src/main.cpp
16
src/main.cpp
|
@ -8,11 +8,11 @@
|
|||
// Motor driver selection:
|
||||
// Comment out all but the two lines that you want to use
|
||||
|
||||
DCC* mainTrack = DCC::Create_WSM_SAMCommandStation_Main(50);
|
||||
DCC* progTrack = DCC::Create_WSM_SAMCommandStation_Prog(2);
|
||||
// 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_Arduino_L298Shield_Main(50);
|
||||
DCC* progTrack = DCC::Create_Arduino_L298Shield_Prog(2);
|
||||
|
||||
// DCC* mainTrack = DCC::Create_Pololu_MC33926Shield_Main(50);
|
||||
// DCC* progTrack = DCC::Create_Pololu_MC33926Shield_Prog(2);
|
||||
|
@ -27,16 +27,16 @@ void waveform_IrqHandler() {
|
|||
#if defined(ARDUINO_ARCH_SAMD)
|
||||
void SERCOM4_Handler()
|
||||
{
|
||||
mainTrack->hdw.railcom_serial->IrqHandler();
|
||||
mainTrack->hdw.railcomSerial()->IrqHandler();
|
||||
}
|
||||
#endif
|
||||
|
||||
void setup() {
|
||||
mainTrack->hdw.init();
|
||||
progTrack->hdw.init();
|
||||
mainTrack->hdw.setup();
|
||||
progTrack->hdw.setup();
|
||||
|
||||
// TimerA is TCC0 on SAMD21, Timer1 on MEGA2560, and Timer1 on MEGA328
|
||||
// We will fire an interrupt every 58us to generate the signal on the track
|
||||
// We will fire an interrupt every 29us to generate the signal on the track
|
||||
TimerA.initialize();
|
||||
TimerA.setPeriod(DCC_IRQ_MICROSECONDS);
|
||||
TimerA.attachInterrupt(waveform_IrqHandler);
|
||||
|
|
Loading…
Reference in New Issue
Block a user