29template <u
int8_t NumChips = 1,
class SPIDriver = decltype(SPI) &>
59 uint8_t row =
pin.pin / 8;
60 uint8_t col =
pin.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)) {
#define BEGIN_AH_NAMESPACE
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
virtual void digitalWrite(pin_int_t pin, PinStatus_t state)
virtual PinStatus_t digitalRead(pin_int_t pin)
pin_t pin(pin_int_t pin) const
void begin()
Initialize the Arduino pins, SPI, and the MAX7219.
void sendRowAll(uint8_t digit, const uint8_t *values, uint8_t leading_dim=1)
MAX7219_Base(decltype(SPI) &spi, pin_t loadPin, uint8_t chainlength=1)
A class for LED outputs using the MAX7219 LED display driver.
void updateBufferedOutputRow(IndexMask i)
void updateBufferedOutputs() override
Write the internal state to the physical outputs.
void pinMode(pin_int_t pin, PinMode_t mode) override __attribute__((deprecated))
The pinMode function is not implemented because the mode is OUTPUT by definition.
PinStatus_t digitalRead(pin_int_t pin) override
Get the current state of a given output.
void digitalWrite(pin_int_t pin, PinStatus_t val) override
Set the state of a given output pin.
void analogWriteBuffered(pin_int_t pin, analog_t val) override __attribute__((deprecated))
The analogWrite function is deprecated because a MAX7219 is always digital.
PinStatus_t digitalReadBuffered(pin_int_t pin) override
Get the current state of a given output.
void pinModeBuffered(pin_int_t pin, PinMode_t mode) override __attribute__((deprecated))
The pinMode function is not implemented because the mode is OUTPUT by definition.
void updateBufferedInputs() override
Read the physical state into the input buffers.
MAX7219(SPIDriver spi, pin_t loadPin)
Create a MAX7219 ExtendedIOElement.
analog_t analogReadBuffered(pin_int_t pin) override __attribute__((deprecated))
The analogRead function is deprecated because a MAX7219 is always digital.
void begin() override
Initialize.
static IndexMask pin2index(pin_t pin)
void digitalWriteBuffered(pin_int_t pin, PinStatus_t val) override
Set the state of a given pin in the software buffer.
Array< uint8_t, 8 *NumChips > buffer
void analogWrite(pin_int_t pin, analog_t val) override __attribute__((deprecated))
The analogWrite function is deprecated because a MAX7219 is always digital.
analog_t analogRead(pin_int_t pin) override __attribute__((deprecated))
The analogRead function is deprecated because a MAX7219 is always digital.
StaticSizeExtendedIOElement()
uint16_t analog_t
The type returned from analogRead and similar functions.
uint_fast16_t pin_int_t
Integer type used internally to store the index of (extended) GPIO pins.
An array wrapper for easy copying, comparing, and iterating.
Type for storing pin numbers of Extended Input/Output elements.