FastLED 3.10.8
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 30 of file adapter.cpp.hpp.

30 {
33 if (!leds) {
34 return fl::span<CRGB>();
35 }
36
37 if (mHasSegment) {
38 return fl::span<CRGB>(leds + mSegmentStart, mSegmentEnd - mSegmentStart);
39 }
40 return fl::span<CRGB>(leds, controller.size());
41}
CRGB leds[1]
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
CLEDController * controller
VIRTUAL_IF_NOT_AVR int size() const FL_NO_EXCEPT
How many LEDs does this controller manage?
CRGB * leds() FL_NO_EXCEPT
Pointer to the CRGB array for this controller.
size_t mSegmentEnd
Definition adapter.h:72
size_t mSegmentStart
Definition adapter.h:71
fl::CLEDController CLEDController
fl::CRGB CRGB
Definition video.h:18

References controller, FastLED, fl::FL_NO_EXCEPT, leds, mControllerIndex, mHasSegment, mSegmentEnd, and mSegmentStart.

Referenced by ~FastLEDAdapter().

+ Here is the caller graph for this function: