#include <AH/Hardware/LEDs/LEDs.hpp>
template<uint16_t N>
class AH::LEDs< N >
A class for collections of LEDs that can display ranges.
- Template Parameters
-
| N | The number of LEDs in the collection. |
Definition at line 18 of file LEDs.hpp.
|
| | LEDs (const PinList< N > &ledPins) |
| | Create a LEDs object.
|
| void | begin () const |
| | Initialize (set LED pins as outputs).
|
| void | displayRange (uint16_t startOn, uint16_t startOff) const |
| | Turn on a range of the LEDs.
|
| void | set (uint16_t index) const |
| | Turn on the given LED.
|
| void | clear (uint16_t index) const |
| | Turn off the given LED.
|
| void | displayDot (uint16_t led) const |
| | Turn on a single LED, and turn off all others.
|
| void | clear () const |
| | Turn off all LEDs.
|
◆ LEDs()
template<uint16_t N>
| LEDs |
( |
const PinList< N > & | ledPins | ) |
|
|
inline |
Create a LEDs object.
- Parameters
-
| ledPins | An array of pins with the LEDs connected. |
Definition at line 26 of file LEDs.hpp.
◆ begin()
Initialize (set LED pins as outputs).
Definition at line 31 of file LEDs.hpp.
◆ displayRange()
template<uint16_t N>
| void displayRange |
( |
uint16_t | startOn, |
|
|
uint16_t | startOff ) const |
|
inline |
Turn on a range of the LEDs.
- Parameters
-
| startOn | The first LED of the range to turn on (the LEDs before this one are turned off). |
| startOff | The first LED after the range to turn off. |
Definition at line 45 of file LEDs.hpp.
◆ set()
template<uint16_t N>
| void set |
( |
uint16_t | index | ) |
const |
|
inline |
Turn on the given LED.
Definition at line 55 of file LEDs.hpp.
◆ clear() [1/2]
template<uint16_t N>
| void clear |
( |
uint16_t | index | ) |
const |
|
inline |
Turn off the given LED.
Definition at line 61 of file LEDs.hpp.
◆ displayDot()
template<uint16_t N>
| void displayDot |
( |
uint16_t | led | ) |
const |
|
inline |
Turn on a single LED, and turn off all others.
- Parameters
-
Definition at line 72 of file LEDs.hpp.
◆ clear() [2/2]
◆ ledPins
The documentation for this class was generated from the following file: