29template <u
int8_t NumChips = 1,
class SPIDriver = decltype(SPI) &>
59 uint8_t row =
pin / 8;
60 uint8_t col =
pin % 8;
61 uint8_t rowgrp = row % 8;
62 uint8_t rowmask = 1 << rowgrp;
63 uint8_t colmask = 1 << col;
64 return {row, col, rowgrp, rowmask, colmask};
73 __attribute__((deprecated)) {
82 __attribute__((deprecated)) {
157 __attribute__((deprecated)) {
175 __attribute__((deprecated)) {
183 __attribute__((deprecated)) {
constexpr PinStatus_t LOW
constexpr PinStatus_t HIGH
AH::function_traits< decltype(::pinMode)>::argument_t< 1 > PinMode_t
AH::function_traits< decltype(::digitalWrite)>::argument_t< 1 > PinStatus_t
uint16_t analog_t
The type returned from analogRead and similar functions.
uint16_t pin_t
The type for Arduino pins (and ExtendedIOElement pins).
#define BEGIN_AH_NAMESPACE
pin_t pin(pin_t pin) const
Get the extended IO pin number of a given physical pin of this extended IO element.
A base class for classes that control MAX7219 LED drivers.
void begin()
Initialize the Arduino pins, SPI, and the MAX7219.
void sendRowAll(uint8_t digit, const uint8_t *values, uint8_t leading_dim=1)
Send values to the given digit or row, sending a different value for each chip.
A class for LED outputs using the MAX7219 LED display driver.
analog_t analogReadBuffered(pin_t pin) override __attribute__((deprecated))
The analogRead function is deprecated because a MAX7219 is always digital.
void analogWrite(pin_t pin, analog_t val) override __attribute__((deprecated))
The analogWrite function is deprecated because a MAX7219 is always digital.
void updateBufferedOutputRow(IndexMask i)
void updateBufferedOutputs() override
Write the internal state to the physical outputs.
PinStatus_t digitalReadBuffered(pin_t pin) override
Get the current state of a given output.
PinStatus_t digitalRead(pin_t pin) override
Get the current state of a given output.
void updateBufferedInputs() override
Read the physical state into the input buffers.
MAX7219(SPIDriver spi, pin_t loadPin)
Create a MAX7219 ExtendedIOElement.
void digitalWrite(pin_t pin, PinStatus_t val) override
Set the state of a given output pin.
void begin() override
Initialize.
static IndexMask pin2index(pin_t pin)
void pinMode(pin_t pin, PinMode_t mode) override __attribute__((deprecated))
The pinMode function is not implemented because the mode is OUTPUT by definition.
analog_t analogRead(pin_t pin) override __attribute__((deprecated))
The analogRead function is deprecated because a MAX7219 is always digital.
void pinModeBuffered(pin_t pin, PinMode_t mode) override __attribute__((deprecated))
The pinMode function is not implemented because the mode is OUTPUT by definition.
Array< uint8_t, 8 *NumChips > buffer
void analogWriteBuffered(pin_t pin, analog_t val) override __attribute__((deprecated))
The analogWrite function is deprecated because a MAX7219 is always digital.
void digitalWriteBuffered(pin_t pin, PinStatus_t val) override
Set the state of a given pin in the software buffer.
A class for ExtendedIOElements with a fixed size.
An array wrapper for easy copying, comparing, and iterating.