DCCpp
This is the library version of a program for Arduino to control railroading DCC devices.
EEStore.h
1 /**********************************************************************
2 
3 EEStore.h
4 COPYRIGHT (c) 2013-2016 Gregg E. Berman
5 
6 Part of DCC++ BASE STATION for the Arduino
7 
8 **********************************************************************/
9 
10 #ifndef EEStore_h
11 #define EEStore_h
12 
13 #include "DCCpp.h"
14 
15 #ifdef USE_EEPROM
16 
17 #define EESTORE_ID "DCC++"
18 
20 struct EEStoreData{
21  char id[sizeof(EESTORE_ID)+1];
22 #ifdef USE_TURNOUT
23  int nTurnouts;
24 #endif
25 #ifdef USE_SENSOR
26  int nSensors;
27 #endif
28 #ifdef USE_OUTPUT
29  int nOutputs;
30 #endif
31 };
32 
43 struct EEStore{
44  //static EEStore *eeStore; /**< Static pointer to an instance of EEStore class.*/
45  static EEStoreData data;
46  static int eeAddress;
48  static void init();
49  static void reset();
53  static int pointer();
57  static void advance(int inIncrement);
61  static bool needsRefreshing();
62  static void store();
63  static void clear();
64 };
65 
66 #endif
67 #endif