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
19
struct
OutputData {
20
byte oStatus;
21
int
id;
22
byte pin;
23
byte iFlag;
24
};
25
130
struct
Output{
131
struct
OutputData data;
139
void
begin(
int
id
,
int
pin,
int
iFlag);
146
void
set
(
int
id,
int
pin,
int
iFlag);
150
void
activate(
int
s = 1);
154
bool
isActivated() {
return
this->data.oStatus > 0; }
155
156
#if defined(USE_EEPROM) || defined(USE_TEXTCOMMAND)
157
static
Output *firstOutput;
158
Output *nextOutput;
164
static
Output*
get
(
int
id);
169
static
void
remove
(
int
id);
174
static
int
count();
175
176
#ifdef DCCPP_PRINT_DCCPP
177
180
static
void
show();
181
#endif
182
183
#if defined(USE_EEPROM)
184
int
num;
189
static
void
load();
193
static
void
store();
194
#endif
195
196
#endif
197
198
#if defined(USE_TEXTCOMMAND)
199
203
static
void
parse(
char
*c);
211
static
Output *create(
int
id
,
int
pin,
int
iFlag);
212
#endif
213
214
};
// Output
215
216
#endif
217
#endif
218
219
src
Outputs.h
Generated on lun. janv. 8 2018 17:10:56 for DCCpp by
1.2.10