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

Method writeLed

src/fl/chipsets/apa102.h:60–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 }
59
60 FASTLED_FORCE_INLINE void writeLed(fl::u8 brightness, fl::u8 b0, fl::u8 b1, fl::u8 b2) {
61#ifdef FASTLED_SPI_BYTE_ONLY
62 mSPI.writeByte(0xE0 | brightness);
63 mSPI.writeByte(b0);
64 mSPI.writeByte(b1);
65 mSPI.writeByte(b2);
66#else
67 fl::u16 b = 0xE000 | (brightness << 8) | (fl::u16)b0;
68 mSPI.writeWord(b);
69 fl::u16 w = b1 << 8;
70 w |= b2;
71 mSPI.writeWord(w);
72#endif
73 }
74
75 FASTLED_FORCE_INLINE void write2Bytes(fl::u8 b1, fl::u8 b2) {
76#ifdef FASTLED_SPI_BYTE_ONLY

Callers

nothing calls this directly

Calls 2

writeByteMethod · 0.45
writeWordMethod · 0.45

Tested by

no test coverage detected