DCCpp
This is the library version of a program for Arduino to control railroading DCC devices.
DCCpp.h
Go to the documentation of this file.
1 //-------------------------------------------------------------------
2 #ifndef __DCCpp_H__
3 #define __DCCpp_H__
4 //-------------------------------------------------------------------
5 
341 #define LIBRARY_VERSION "VERSION DCCpp library: 1.3.1"
342 
344 // Add a '//' at the beginning of the line to be in production mode.
345 //#define DCCPP_DEBUG_MODE
346 
348 // Verbose mode lets you see all actions done by the
349 // library, but with a real flood of text to console...
350 // Has no effect if DCCPP_DEBUG_MODE is not activated.
351 //#define DCCPP_DEBUG_VERBOSE_MODE
352 
354 // The function DCCpp::printConfiguration()
355 // is very heavy in program memory. So to avoid problems
356 // you can make this function available by uncomment the next line, only when necessary.
357 //#define DCCPP_PRINT_DCCPP
358 
359 // Inclusion area
360 //
361 
362 //#define USE_TURNOUT
363 //#define USE_EEPROM
364 //#define USE_OUTPUT
365 //#define USE_SENSOR
366 #define USE_TEXTCOMMAND
367 //#define USE_ETHERNET_WIZNET_5100
368 //#define USE_ETHERNET_WIZNET_5500
369 //#define USE_ETHERNET_WIZNET_5200
370 //#define USE_ETHERNET_ENC28J60
371 
372 #ifdef DOXYGEN_SPECIFIC
373  // DO NOT CHANGE THESE LINES IN THIS BLOCK 'DOXYGEN_SPECIFIC' : Only here for documentation !
374 
376  #define USE_TURNOUT
377 
378  #define USE_EEPROM
379 
380  #define USE_OUTPUT
381 
382  #define USE_SENSOR
383 
384  #define USE_TEXTCOMMAND
385 
386  #define USE_ETHERNET_WIZNET_5100
387 
388  #define USE_ETHERNET_WIZNET_5500
389 
390  #define USE_ETHERNET_WIZNET_5200
391 
392  #define USE_ETHERNET_ENC28J60
393 
394  #undef USE_TURNOUT
395  #undef USE_EEPROM
396  #undef USE_OUTPUT
397  #undef USE_SENSOR
398  #undef USE_TEXTCOMMAND
399  #undef USE_ETHERNET_WIZNET_5100
400  #undef USE_ETHERNET_WIZNET_5500
401  #undef USE_ETHERNET_WIZNET_5200
402  #undef USE_ETHERNET_ENC28J60
403 
407  #define DCCPP_DEBUG_MODE
408 
410  #define DCCPP_DEBUG_VERBOSE_MODE
411 
416  #define DCCPP_PRINT_DCCPP
417  #endif
418 #endif
419 
420 #if defined(USE_ETHERNET_WIZNET_5100) || defined(USE_ETHERNET_WIZNET_5500) || defined(USE_ETHERNET_WIZNET_5200) || defined(USE_ETHERNET_ENC28J60)
421 #define USE_ETHERNET
422 #endif
423 
425 
426 #include "DCCpp_Uno.h"
427 #include "PacketRegister.h"
428 #include "CurrentMonitor.h"
429 #include "Config.h"
430 #include "Comm.h"
431 
432 #ifdef USE_TURNOUT
433 #include "Turnout.h"
434 #endif
435 #ifdef USE_EEPROM
436 #include "EEStore.h"
437 #endif
438 #ifdef USE_OUTPUT
439 #include "Outputs.h"
440 #endif
441 #ifdef USE_SENSOR
442 #include "Sensor.h"
443 #endif
444 #ifdef USE_TEXTCOMMAND
445 #include "TextCommand.h"
446 #endif
447 
448 #include "DCCpp.hpp"