47 const u8 lo_nib =
byte & 0x0F;
48 const u8 hi_nib = (
byte >> 4) & 0x0F;
69 int mPins[8] = {-1, -1, -1, -1, -1, -1, -1, -1};
122 int mPins[16] = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
bool allSamePort() const
Check whether all active pins (non -1) share the same GPIO port.
void write(fl::span< const u16 > pin_data) const
Write pre-transposed 16-bit data to the 16 pins.
void init(const Pins16 &pins)
Initialize from 16 pin numbers. -1 means "skip this bit position".
void buildNibbleLut(u8 bit_offset, PinList(&set_lut)[16], PinList(&clr_lut)[16])
static void applyNibble(const PinList &set, const PinList &clr)
DigitalMultiWrite16() FL_NOEXCEPT=default
void init(const Pins8 &pins)
Initialize from 8 pin numbers. -1 means "skip this bit position".
void buildNibbleLut(u8 bit_offset, PinList(&set_lut)[16], PinList(&clr_lut)[16])
static void applyNibble(const PinList &set, const PinList &clr)
void writeByte(u8 byte) const
Write a single bitmask byte to the 8 pins.
bool allSamePort() const
Check whether all active pins (non -1) share the same GPIO port.
void write(fl::span< const u8 > pin_data) const
Write pre-transposed byte data to the 8 pins.
DigitalMultiWrite8() FL_NOEXCEPT=default
void digitalMultiWrite8(const Pins8 &pins, fl::span< const u8 > pin_data)
Convenience free function — creates a temporary DigitalMultiWrite8, initializes it,...
int pinToPort(int pin)
Map a runtime pin number to an integer port ID using FastPin<N>::port().
void digitalMultiWrite16(const Pins16 &pins, fl::span< const u16 > pin_data)
Convenience free function — creates a temporary DigitalMultiWrite16, initializes it,...
void pinMap(fl::span< PinInfo > pins)
Resolve port IDs for an array of PinInfo in-place.
Base definition for an LED controller.
Pin number with its resolved port ID.
POD struct holding 16 pin numbers for bulk pin writes.
POD struct holding 8 pin numbers for bulk pin writes.