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

◆ createFastLEDController()

fl::shared_ptr< IFastLED > fl::createFastLEDController ( u8 controllerIndex = 0)

Create a FastLED controller adapter.

Parameters
controllerIndexIndex of the LED controller to use (default: 0)
Returns
Shared pointer to the adapter

Example:

CRGB leds[100];
FastLED.addLeds<WS2812, 5>(leds, 100);
auto controller = createFastLEDController(); // Uses controller index 0
CRGB leds[1]
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
CLEDController * controller
fl::shared_ptr< IFastLED > createFastLEDController(u8 controllerIndex) FL_NO_EXCEPT
Create a FastLED controller adapter.
Representation of an 8-bit RGB pixel (Red, Green, Blue)
Definition crgb.h:38

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

147 {
148 return fl::make_shared<FastLEDAdapter>(controllerIndex);
149}
shared_ptr< T > make_shared(Args &&... args) FL_NO_EXCEPT
Definition shared_ptr.h:423

References FL_NO_EXCEPT, and fl::adl_barrier::make_shared().

+ Here is the call graph for this function: