DCCpp
This is the library version of a program for Arduino to control railroading DCC devices.
DCCpp_Uno.h
1 /**********************************************************************
2 
3 DCCpp_Uno.h
4 COPYRIGHT (c) 2013-2016 Gregg E. Berman
5 Adapted for DCCpp by Thierry PARIS
6 
7 Part of DCC++ BASE STATION for the Arduino
8 
9 **********************************************************************/
10 
11 #ifdef ARDUINO_ARCH_AVR
12 #ifndef DCCpp_Uno_h
13 #define DCCpp_Uno_h
14 
15 #include "DCCpp.h"
16 
18 // RELEASE VERSION
20 
21 #define VERSION "2.0.0"
22 
24 // SELECT COMMUNICATION INTERACE
26 
27 #if defined(USE_ETHERNET)
28 
29  #define INTERFACE eServer
30  #define SDCARD_CS 4
31 
32 #else
33 
34  // define INTERFACE as serial in all cases to be able at least to print diagnostic messages on console
35  #define INTERFACE Serial
36 
37 #endif
38 
40 // SET WHETHER TO SHOW PACKETS - DIAGNOSTIC MODE ONLY
42 
43 // If SHOW_PACKETS is set to 1, then for select main operations track commands that modify an internal DCC packet register,
44 // if printFlag for that command is also set to 1, DCC++ BASE STATION will additionally return the
45 // DCC packet contents of the modified register in the following format:
46 
47 // <* REG: B1 B2 ... Bn CSUM / REPEAT>
48 //
49 // REG: the number of the main operations track packet register that was modified
50 // B1: the first hexadecimal byte of the DCC packet
51 // B2: the second hexadecimal byte of the DCC packet
52 // Bn: the nth hexadecimal byte of the DCC packet
53 // CSUM: a checksum byte that is required to be the final byte in any DCC packet
54 // REPEAT: the number of times the DCC packet was re-transmitted to the tracks after its iniital transmission
55 
56 //#define SHOW_PACKETS 0 // set to zero to disable printing of every packet for select main operations track commands
57 
59 
60 #endif
61 #endif