8#include <AH/Hardware/ExtendedInputOutput/ExtendedInputOutput.hpp>
35 for (
const pin_t &pin : ledPins)
49 for (uint16_t pin = 0; pin < startOn; pin++)
51 for (uint16_t pin = startOn; pin < startOff; pin++)
53 for (uint16_t pin = startOff; pin < N; pin++)
58 void set(uint16_t index)
const {
64 void clear(uint16_t index)
const {
75 void displayDot(uint16_t led)
const { displayRange(led, led + 1); }
81 for (
pin_t pin : ledPins)
#define BEGIN_AH_NAMESPACE
constexpr PinStatus_t LOW
constexpr PinStatus_t HIGH
constexpr PinMode_t OUTPUT
#define AH_DIAGNOSTIC_POP()
#define AH_DIAGNOSTIC_WERROR()
A class for collections of LEDs that can display ranges.
const PinList< N > ledPins
void clear(uint16_t index) const
Turn off the given LED.
LEDs(const PinList< N > &ledPins)
Create a LEDs object.
void set(uint16_t index) const
Turn on the given LED.
void begin() const
Initialize (set LED pins as outputs).
void clear() const
Turn off all LEDs.
void displayDot(uint16_t led) const
Turn on a single LED, and turn off all others.
void displayRange(uint16_t startOn, uint16_t startOff) const
Turn on a range of the LEDs.
void pinMode(pin_t pin, PinMode_t mode)
An ExtIO version of the Arduino function.
void digitalWrite(pin_t pin, PinStatus_t val)
An ExtIO version of the Arduino function.
An array wrapper for easy copying, comparing, and iterating.
Type for storing pin numbers of Extended Input/Output elements.