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

Method getLedsBufferBytesForPin

src/fl/gfx/rectangular_draw_buffer.cpp.hpp:18–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18span<u8>
19RectangularDrawBuffer::getLedsBufferBytesForPin(u8 pin, bool clear_first) {
20 auto it = mPinToLedSegment.find(pin);
21 if (it == mPinToLedSegment.end()) {
22 FASTLED_ASSERT(false, "Pin not found in RectangularDrawBuffer");
23 return fl::span<u8>();
24 }
25 fl::span<u8> slice = it->second;
26 if (clear_first) {
27 fl::memset(slice.data(), 0, slice.size() * sizeof(slice[0]));
28 }
29 return slice;
30}
31
32bool RectangularDrawBuffer::onQueuingStart() {
33 if (mQueueState == QUEUEING) {

Callers 6

addStripMethod · 0.80
showMethod · 0.80
outputSinglePinMethod · 0.80
outputParallelGroupMethod · 0.80
showPixelsMethod · 0.80
FL_TEST_FILEFunction · 0.80

Calls 5

memsetFunction · 0.85
findMethod · 0.45
endMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected