2 #ifndef __dccCommander_H__ 3 #define __dccCommander_H__ 8 #ifndef NO_DCCCOMMANDER 10 #include <DCC_Decoder.hpp> 13 #define DccCommander DccCommanderClass::GetCurrent() 17 typedef void(*DccAccDecoderPacket)(
int address,
boolean activate, uint8_t data);
20 #define DCCID(id) ((id) % 10000) 21 #define DCCACTIVATION(id) ((uint8_t)((id) / 10000)) 22 #define DCCINT(id, acc) ((acc) * 10000UL + (id)) 76 unsigned long LastDccId;
77 boolean UseRawDccAddresses;
78 static DccAccDecoderPacket func_AccPacket;
93 void begin(
int i,
int j,
int k,
boolean inInterruptMonitor =
false,
boolean inUseRawDccAddresses =
false);
117 if (pDccCommander == NULL)
120 return *(DccCommanderClass::pDccCommander);
123 #ifdef COMMANDERS_DEBUG_MODE 129 #define PRINT_EVENT_DCC(id, type, data) DccCommander::printEvent(id, type, data); 131 #define PRINT_EVENT_DCC(id, type, data) 133 #ifdef COMMANDERS_PRINT_COMMANDERS COMMANDERS_EVENT_TYPE
Definition: Events.h:25
unsigned long GetLastDccId()
Definition: DccCommander.hpp:109
static void DccAccessoryDecoderPacket(int address, boolean activate, uint8_t data)
Definition: DccCommander.cpp:23
static void SetAccessoryDecoderPacketHandler(DccAccDecoderPacket func)
Definition: DccCommander.cpp:173
unsigned long loop()
Definition: DccCommander.cpp:134
void PriorityLoop()
Definition: DccCommander.cpp:118
void printCommander()
Definition: DccCommander.cpp:230
static DccCommanderClass & GetCurrent()
Definition: DccCommander.hpp:115
void begin(int i, int j, int k, boolean inInterruptMonitor = false, boolean inUseRawDccAddresses = false)
Definition: DccCommander.cpp:97
DccCommanderClass()
Definition: DccCommander.hpp:83
Definition: Commander.hpp:23
Definition: DccCommander.hpp:73
static void printEvent(unsigned long inId, COMMANDERS_EVENT_TYPE inEventType, int inEventData)
Definition: DccCommander.cpp:179