diff --git a/src/main.cpp b/src/main.cpp index 10584d5..a7fefc8 100644 --- a/src/main.cpp +++ b/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);