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

Method writeWS2812

src/fl/chipsets/encoders/pixel_iterator.h:202–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200
201 template <typename CONTAINER_UIN8_T>
202 void writeWS2812(CONTAINER_UIN8_T* out) FL_NOEXCEPT {
203 auto back_ins = fl::back_inserter(*out);
204 // (#2558) Dispatch order: RGBWW > RGBW > RGB. The variant migration
205 // makes these mutually exclusive — at most one alternative is active.
206 if (mRgbww.active()) {
207 auto range = makeScaledPixelRangeRGBWW(this);
208 encodeWS2812_RGBWW(range.first, range.second, back_ins);
209 } else if (mRgbw.active()) {
210 auto range = makeScaledPixelRangeRGBW(this);
211 encodeWS2812_RGBW(range.first, range.second, back_ins);
212 } else {
213 auto range = makeScaledPixelRangeRGB(this);
214 encodeWS2812_RGB(range.first, range.second, back_ins);
215 }
216 }
217
218 /// @brief Encode pixels in APA102/DOTSTAR format (zero allocation)
219 /// @param out Output buffer to write encoded bytes

Callers 12

showPixelsMethod · 0.80
showPixelsMethod · 0.80
showPixelsMethod · 0.80
loadPixelDataMethod · 0.80
showPixelsMethod · 0.80
showPixelsMethod · 0.80
showPixelsMethod · 0.80
ClocklessControllerClass · 0.80
showPixelsMethod · 0.80
showPixelsMethod · 0.80

Calls 7

back_inserterFunction · 0.85
encodeWS2812_RGBWWFunction · 0.85
makeScaledPixelRangeRGBWFunction · 0.85
encodeWS2812_RGBWFunction · 0.85
makeScaledPixelRangeRGBFunction · 0.85
encodeWS2812_RGBFunction · 0.85

Tested by

no test coverage detected