mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-26 17:46:14 +01:00
b89c9068ff
Has Turnout, Output Sensor support. Needs further cleaning and cross checking against spec. May implement Daves Comms manager etc.
33 lines
546 B
C++
33 lines
546 B
C++
#ifndef Outputs_h
|
|
#define Outputs_h
|
|
|
|
#include <Arduino.h>
|
|
|
|
struct OutputData {
|
|
uint8_t oStatus;
|
|
uint8_t id;
|
|
uint8_t pin;
|
|
uint8_t iFlag;
|
|
};
|
|
|
|
class Output{
|
|
public:
|
|
void activate(int s);
|
|
static Output* get(int);
|
|
static bool remove(int);
|
|
static void load();
|
|
static void store();
|
|
static Output *create(int, int, int, int=0);
|
|
static void show(Stream & stream);
|
|
static void showAll(Stream & stream);
|
|
|
|
private:
|
|
static Output *firstOutput;
|
|
int num;
|
|
struct OutputData data;
|
|
Output *nextOutput;
|
|
|
|
}; // Output
|
|
|
|
#endif
|