DCCpp
This is the library version of a program for Arduino to control railroading DCC devices.
Outputs.h
1
/**********************************************************************
2
3
Outputs.h
4
COPYRIGHT (c) 2013-2016 Gregg E. Berman
5
6
Part of DCC++ BASE STATION for the Arduino
7
8
**********************************************************************/
9
10
#ifndef Outputs_h
11
#define Outputs_h
12
13
#include "
DCCpp.h
"
14
15
#ifdef USE_OUTPUT
16
#include "Arduino.h"
17
18
struct
OutputData {
19
byte oStatus;
20
int
id;
21
byte pin;
22
byte iFlag;
23
};
24
102
struct
Output{
103
int
num;
104
struct
OutputData data;
105
106
void
begin(
int
id
,
int
pin,
int
iFlag);
107
void
set
(
int
id,
int
pin,
int
iFlag);
108
void
activate(
int
s = 1);
109
110
#if defined(USE_EEPROM) || defined(USE_TEXTCOMMAND)
111
static
Output *firstOutput;
112
Output *nextOutput;
113
static
Output*
get
(int);
114
static
void
remove
(
int
id);
115
static
int
count();
116
117
#ifdef DCCPP_PRINT_DCCPP
118
static
void
show();
119
#endif
120
121
#if defined(USE_EEPROM)
122
static
void
load();
123
static
void
store();
124
#endif
125
126
#endif
127
128
#if defined(USE_TEXTCOMMAND)
129
static
void
parse(
char
*c);
130
static
Output *create(
int
,
int
,
int
);
131
#endif
132
133
};
// Output
134
135
#endif
136
#endif
137
138
DCCpp.h
src
Outputs.h
Generated on dim. nov. 12 2017 16:11:51 for DCCpp by
1.2.10