MCPcopy Create free account
hub / github.com/FastLED/FastLED / writeByte

Method writeByte

src/fl/system/pins.h:46–51  ·  view source on GitHub ↗

Write a single bitmask byte to the 8 pins. Same as write() but optimized for the single-byte case in timing-critical hot loops (clockless bit-banging). Avoids span iteration overhead — inlines directly to two nibble LUT lookups.

Source from the content-addressed store, hash-verified

44 /// timing-critical hot loops (clockless bit-banging). Avoids span
45 /// iteration overhead — inlines directly to two nibble LUT lookups.
46 void writeByte(u8 byte) const {
47 const u8 lo_nib = byte & 0x0F;
48 const u8 hi_nib = (byte >> 4) & 0x0F;
49 applyNibble(mSetLo[lo_nib], mClrLo[lo_nib]);
50 applyNibble(mSetHi[hi_nib], mClrHi[hi_nib]);
51 }
52
53 /// Check whether all active pins (non -1) share the same GPIO port.
54 /// Returns true if fewer than 2 active pins exist (trivially same port).

Callers 9

writeHeaderMethod · 0.45
endBoundaryMethod · 0.45
writeLedMethod · 0.45
write2BytesMethod · 0.45
showPixelsMethod · 0.45
startBoundaryMethod · 0.45
endBoundaryMethod · 0.45
showPixelsMethod · 0.45
writeLedFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected