1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-27 01:56:14 +01:00
CommandStation-EX/Railcom.cpp

26 lines
661 B
C++
Raw Normal View History

2020-05-26 18:06:15 +02:00
#include "Railcom.h"
#include "Hardware.h"
void Railcom::startCutout() {
return;
/*** todo when ready ***
interruptState=0;
Hardware::setSingleCallback(RAILCOM_T0,interrupt);
*************/
}
void Railcom::interrupt() {
/*** TODO when ready .. railcom state machine
switch (interruptState) {
case 0: //
Hardware::setPower(true,false);
state=1;
nextInterrupt=RAILCOM_T1;
break;
}
**********************/
}
byte Railcom::interruptState;
byte Railcom::bitsReceived;
byte Railcom::buffer[MAX_BUFFER];