FastLED 3.10.8
Loading...
Searching...
No Matches

◆ getLedsBufferBytesForPin()

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

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

20 {
21 auto it = mPinToLedSegment.find(pin);
22 if (it == mPinToLedSegment.end()) {
23 FASTLED_ASSERT(false, "Pin not found in RectangularDrawBuffer");
24 return fl::span<u8>();
25 }
26 fl::span<u8> slice = it->second;
27 if (clear_first) {
28 fl::memset(slice.data(), 0, slice.size() * sizeof(slice[0]));
29 }
30 return slice;
31}
fl::flat_map< u8, fl::span< u8 > > mPinToLedSegment
const T * data() const FL_NO_EXCEPT
Definition span.h:486
constexpr fl::size size() const FL_NO_EXCEPT
Definition span.h:483
FASTLED_FORCE_INLINE void * memset(void *s, int c, size_t n) FL_NO_EXCEPT
Definition cstring.h:148

References fl::span< T, Extent >::data(), fl::FL_NO_EXCEPT, 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: