FastLED 3.10.8
Loading...
Searching...
No Matches

◆ write()

void fl::DigitalMultiWrite16::write ( fl::span< const u16 > pin_data) const

Write pre-transposed 16-bit data to the 16 pins.

Each u16 in pin_data is a bitmask where bit N → pin N. 1 = HIGH, 0 = LOW. Pins set to -1 during init() are skipped.

Definition at line 323 of file pins.cpp.hpp.

323 {
324 for (fl::size i = 0; i < pin_data.size(); ++i) {
325 const u16 word = pin_data[i];
326 for (u8 n = 0; n < 4; ++n) {
327 const u8 nib = (word >> (n * 4)) & 0x0F;
328 applyNibble(mSetNib[n][nib], mClrNib[n][nib]);
329 }
330 }
331}
static void applyNibble(const PinList &set, const PinList &clr) FL_NO_EXCEPT
Definition pins.cpp.hpp:371
PinList mSetNib[4][16]
Definition pins.h:123
PinList mClrNib[4][16]
Definition pins.h:124
constexpr fl::size size() const FL_NO_EXCEPT
Definition span.h:483
unsigned char u8
Definition stdint.h:131

References applyNibble(), fl::FL_NO_EXCEPT, mClrNib, and mSetNib.

Referenced by DigitalMultiWrite16(), and fl::digitalMultiWrite16().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: