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
442
#define DCCPP_LIBRARY_VERSION "VERSION DCCpp library: 1.4.2"
443
444
#ifdef VISUALSTUDIO
445
#pragma warning (disable : 4005)
446
#endif
447
// Add a '//' at the beginning of the line to be in production mode.
449
//#define DCCPP_DEBUG_MODE
450
452
// Verbose mode lets you see all actions done by the
453
// library, but with a real flood of text to console...
454
// Has no effect if DCCPP_DEBUG_MODE is not activated.
455
//#define DCCPP_DEBUG_VERBOSE_MODE
456
458
// The function DCCpp::showConfiguration()
459
// is very heavy in program memory. So to avoid problems
460
// you can make this function available by uncomment the next line, only when necessary.
461
#define DCCPP_PRINT_DCCPP
462
463
#ifdef VISUALSTUDIO
464
#pragma warning (default : 4005)
465
#endif
466
468
// This define gets rid of 2 timers and uses only Timer2 to tick every 58us and change logic levels on both tracks.
469
// Zero bit is changed every 2 ticks, "one" bit changes every tick; this makes timings roughly equal to DCC specs.
470
// This frees one timer and 2 pins to be used for something else, though PWM pins controlled by Timer2
471
// cannot be used for hardware - PWM(they can, however, be used to output DCC signal using proposed method since
472
// it is effectively a software - PWM).Jumpers for shields are not needed anymore. This is done at the RAM cost of
473
// 2 bytes per RegisterList and 2 extra pointers in DCCppConfig (pointers might not be needed, they are used for
474
// direct IO port manipulation to bypass arduino's digitalWrite).
475
//#define USE_ONLY1_INTERRUPT
476
477
// Inclusion area
478
//
479
480
#define USE_TURNOUT
481
#define USE_EEPROM
482
#define USE_OUTPUT
483
#define USE_SENSOR
484
#define USE_TEXTCOMMAND
485
//#define USE_ETHERNET_WIZNET_5100
486
//#define USE_ETHERNET_WIZNET_5500
487
//#define USE_ETHERNET_WIZNET_5200
488
//#define USE_ETHERNET_ENC28J60
489
490
#ifdef DOXYGEN_SPECIFIC
491
// DO NOT CHANGE THESE LINES IN THIS BLOCK 'DOXYGEN_SPECIFIC' : Only here for documentation !
492
494
#define USE_TURNOUT
495
496
#define USE_EEPROM
497
498
#define USE_OUTPUT
499
500
#define USE_SENSOR
501
502
#define USE_TEXTCOMMAND
503
504
#define USE_ETHERNET_WIZNET_5100
505
506
#define USE_ETHERNET_WIZNET_5500
507
508
#define USE_ETHERNET_WIZNET_5200
509
510
#define USE_ETHERNET_ENC28J60
511
512
#undef USE_TURNOUT
513
#undef USE_EEPROM
514
#undef USE_OUTPUT
515
#undef USE_SENSOR
516
#undef USE_TEXTCOMMAND
517
#undef USE_ETHERNET_WIZNET_5100
518
#undef USE_ETHERNET_WIZNET_5500
519
#undef USE_ETHERNET_WIZNET_5200
520
#undef USE_ETHERNET_ENC28J60
521
525
#define DCCPP_DEBUG_MODE
526
528
#define DCCPP_DEBUG_VERBOSE_MODE
529
534
#define DCCPP_PRINT_DCCPP
535
542
#define USE_ONLY1_INTERRUPT
543
#endif
544
545
#if defined(USE_ETHERNET_WIZNET_5100) || defined(USE_ETHERNET_WIZNET_5500) || defined(USE_ETHERNET_WIZNET_5200) || defined(USE_ETHERNET_ENC28J60)
546
#define USE_ETHERNET
547
#endif
548
550
551
#include "DCCpp_Uno.h"
552
#include "PacketRegister.h"
553
#include "CurrentMonitor.h"
554
#include "Config.h"
555
#include "Comm.h"
556
#ifdef USE_TURNOUT
557
#include "Turnout.h"
558
#endif
559
#ifdef USE_EEPROM
560
#include "EEStore.h"
561
#endif
562
#ifdef USE_OUTPUT
563
#include "Outputs.h"
564
#endif
565
#ifdef USE_SENSOR
566
#include "Sensor.h"
567
#endif
568
#ifdef USE_TEXTCOMMAND
569
#include "TextCommand.h"
570
#endif
571
572
#include "DCCpp.hpp"
573
#endif
src
DCCpp.h
Generated on dim. nov. 8 2020 16:11:48 for DCCpp by
1.3.6