FastLED 3.9.15
Loading...
Searching...
No Matches

◆ getLedsBufferBytesForPin()

span< u8 > fl::RectangularDrawBuffer::getLedsBufferBytesForPin ( u8 pin,
bool clear_first = true )

Definition at line 19 of file rectangular_draw_buffer.cpp.hpp.

19 {
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}
fl::flat_map< u8, fl::span< u8 > > mPinToLedSegment
const T * data() const FL_NOEXCEPT
Definition span.h:461
constexpr fl::size size() const FL_NOEXCEPT
Definition span.h:458
void * memset(void *s, int c, size_t n) FL_NOEXCEPT

References fl::span< T, Extent >::data(), fl::memset(), mPinToLedSegment, and fl::span< T, Extent >::size().

Referenced by ~RectangularDrawBuffer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: