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

Method writePixels

src/platforms/avr/fastspi_avr.h:162–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160 // write a block of uint8_ts out in groups of three. len is the total number of uint8_ts to write out. The template
161 // parameters indicate how many uint8_ts to skip at the beginning and/or end of each grouping
162 template <u8 FLAGS, class D, EOrder RGB_ORDER> void writePixels(PixelController<RGB_ORDER> pixels, void* context = nullptr) FL_NOEXCEPT {
163 //setSPIRate();
164 int len = pixels.mLen;
165
166 select();
167 while(pixels.has(1)) {
168 if(FLAGS & FLAG_START_BIT) {
169 writeBit<0>(1);
170 writeBytePostWait(D::adjust(pixels.loadAndScale0()));
171 writeBytePostWait(D::adjust(pixels.loadAndScale1()));
172 writeBytePostWait(D::adjust(pixels.loadAndScale2()));
173 } else {
174 writeByte(D::adjust(pixels.loadAndScale0()));
175 writeByte(D::adjust(pixels.loadAndScale1()));
176 writeByte(D::adjust(pixels.loadAndScale2()));
177 }
178
179 pixels.advanceData();
180 pixels.stepDithering();
181 }
182 D::postBlock(len);
183 release();
184 }
185};
186#endif
187

Callers

nothing calls this directly

Calls 7

selectFunction · 0.85
writeBytePostWaitFunction · 0.85
releaseFunction · 0.85
writeByteFunction · 0.50
hasMethod · 0.45
advanceDataMethod · 0.45
stepDitheringMethod · 0.45

Tested by

no test coverage detected