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 
19 struct EEStoreData{
20  char id[sizeof(EESTORE_ID)];
21 #ifdef USE_TURNOUT
22  int nTurnouts;
23 #endif
24 #ifdef USE_SENSOR
25  int nSensors;
26 #endif
27 #ifdef USE_OUTPUT
28  int nOutputs;
29 #endif
30 };
31 
32 struct EEStore{
33  static EEStore *eeStore;
34  EEStoreData data;
35  static int eeAddress;
36  static void init();
37  static void reset();
38  static int pointer();
39  static void advance(int);
40  static bool needsRefreshing();
41  static void store();
42  static void clear();
43 };
44 
45 #endif
46 #endif
47