mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +01:00
b89c9068ff
Has Turnout, Output Sensor support. Needs further cleaning and cross checking against spec. May implement Daves Comms manager etc.
34 lines
566 B
C
34 lines
566 B
C
#ifndef EEStore_h
|
|
#define EEStore_h
|
|
|
|
#include <Arduino.h>
|
|
|
|
#if defined(ARDUINO_ARCH_SAMD)
|
|
#include <SparkFun_External_EEPROM.h>
|
|
extern ExternalEEPROM EEPROM;
|
|
#else
|
|
#include <EEPROM.h>
|
|
#endif
|
|
|
|
#define EESTORE_ID "DCC++"
|
|
|
|
struct EEStoreData{
|
|
char id[sizeof(EESTORE_ID)];
|
|
int nTurnouts;
|
|
int nSensors;
|
|
int nOutputs;
|
|
};
|
|
|
|
struct EEStore{
|
|
static EEStore *eeStore;
|
|
EEStoreData data;
|
|
static int eeAddress;
|
|
static void init();
|
|
static void reset();
|
|
static int pointer();
|
|
static void advance(int);
|
|
static void store();
|
|
static void clear();
|
|
};
|
|
|
|
#endif |