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

◆ getLEDs()

fl::span< CRGB > fl::FastLEDAdapter::getLEDs ( )
overridevirtual

Get the LED array as a span.

Returns
Span over the LED array (may be full array or current segment)

Implements fl::IFastLED.

Definition at line 21 of file adapter.cpp.hpp.

21 {
24 if (!leds) {
25 return fl::span<CRGB>();
26 }
27
28 if (mHasSegment) {
29 return fl::span<CRGB>(leds + mSegmentStart, mSegmentEnd - mSegmentStart);
30 }
31 return fl::span<CRGB>(leds, controller.size());
32}
fl::CRGB leds[NUM_LEDS]
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
CLEDController * controller
CRGB * leds() FL_NOEXCEPT
Pointer to the CRGB array for this controller.
virtual int size() const FL_NOEXCEPT
How many LEDs does this controller manage?
size_t mSegmentEnd
Definition adapter.h:72
size_t mSegmentStart
Definition adapter.h:71
fl::CLEDController CLEDController
fl::CRGB CRGB
Definition video.h:15

References controller, FastLED, leds, mControllerIndex, mHasSegment, mSegmentEnd, and mSegmentStart.

Referenced by ~FastLEDAdapter().

+ Here is the caller graph for this function: