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

Method getLEDs

src/fl/control/wled/adapter.cpp.hpp:21–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21fl::span<CRGB> FastLEDAdapter::getLEDs() {
22 CLEDController& controller = FastLED[mControllerIndex];
23 CRGB* leds = controller.leds();
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}
33
34size_t FastLEDAdapter::getNumLEDs() const {
35 if (mHasSegment) {

Callers

nothing calls this directly

Calls 2

ledsMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected