-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathled.h
More file actions
30 lines (22 loc) · 937 Bytes
/
led.h
File metadata and controls
30 lines (22 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*******************************************************************************************************
File: led.h
Author: Aiko Pras
History: 2022/06/14 AP Version 1.0
Purpose: Implements the safety decoder specific LEDs
The LED objects defined in AP_DccLED are relatively expensive regarding SRAM (43 bytes)
Therefore we create here our own simple On-Off LED class
******************************************************************************************************/
#pragma once
#include <Arduino.h>
#include <AP_DCC_Decoder_Core.h>
class Leds {
public:
void init(); // Attach the LEDs to the various pins
void update(); // Called at the end of the Main loop as frequent as possible
DccLed safety;
BasicLed red;
BasicLed yellow;
BasicLed green;
};
// The following relay object is defined in led.cpp, and may be used elsewhere
extern Leds leds;