MIDI Control Surface library for Arduino
|
Go to the documentation of this file.
8 #include <AH/Hardware/ExtendedInputOutput/ExtendedInputOutput.hpp>
35 for (
const pin_t &pin : ledPins)
49 for (uint8_t pin = 0; pin < startOn; pin++)
51 for (uint8_t pin = startOn; pin < startOff; pin++)
53 for (uint8_t pin = startOff; pin < N; pin++)
58 void set(uint8_t index)
const {
64 void clear(uint8_t index)
const {
75 void displayDot(uint8_t led)
const { displayRange(led, led + 1); }
81 for (
pin_t pin : ledPins)
void pinMode(pin_t pin, uint8_t mode)
An ExtIO version of the Arduino function.
void clear() const
Turn off all LEDs.
void begin() const
Initialize (set LED pins as outputs).
uint16_t pin_t
The type for Arduino pins (and ExtendedIOElement pins).
const PinList< N > ledPins
void clear(uint8_t index) const
Turn off the given LED.
#define AH_DIAGNOSTIC_POP()
void set(uint8_t index) const
Turn on the given LED.
A class for collections of LEDs that can display ranges.
void displayDot(uint8_t led) const
Turn on a single LED, and turn off all others.
#define AH_DIAGNOSTIC_WERROR()
LEDs(const PinList< N > &ledPins)
Create a LEDs object.
#define BEGIN_AH_NAMESPACE
void digitalWrite(pin_t pin, uint8_t val)
An ExtIO version of the Arduino function.
void displayRange(uint8_t startOn, uint8_t startOff) const
Turn on a range of the LEDs.