FastLED 3.10.10
Loading...
Searching...
No Matches
LegacyClocklessProxy Class Reference

Detailed Description

Proxy that creates a legacy clockless controller from runtime inputs.

The legacy FastLED API requires compile-time template pin parameters: FastLED.addLeds<CHIPSET, PIN>(leds, numLeds)

This proxy uses a switch statement to dispatch supported AutoResearch legacy pin and chipset values to the corresponding template instantiation, enabling testing of the full legacy code path. Pins 0-8 are historical coverage pins. On Teensy 4.x, pin 22 is also included for the current ObjectFLED loopback wiring. Other platforms may mark pin 22 invalid at compile time, so avoid instantiating that template there.

Destructor deletes the controller, which on ESP32 (SKETCH_HAS_LARGE_MEMORY) automatically calls removeFromDrawList() via ~CLEDController().

Definition at line 165 of file LegacyClocklessProxy.h.

#include <LegacyClocklessProxy.h>

+ Collaboration diagram for LegacyClocklessProxy:

Public Member Functions

 LegacyClocklessProxy (const LegacyClocklessProxy &)=delete
 
 LegacyClocklessProxy (int pin, CRGB *leds, int numLeds, LegacyClocklessChipset chipset=LegacyClocklessChipset::WS2812B, bool rgbw=false, bool lcd_worker=false)
 
 ~LegacyClocklessProxy ()
 
LegacyClocklessProxy & operator= (const LegacyClocklessProxy &)=delete
 
void setEnabled (bool enabled)
 
void setLeds (fl::span< CRGB > leds)
 
void showLeds (uint8_t brightness=255)
 
bool valid () const
 Check if the proxy was successfully created.
 

Private Member Functions

CLEDController * controller () const FL_NO_EXCEPT
 
template<int PIN>
fl::unique_ptr< CLEDController > create (CRGB *leds, int numLeds, LegacyClocklessChipset chipset, bool rgbw)
 
template<int PIN>
void createLcd (CRGB *leds, int numLeds) FL_NO_EXCEPT
 
template<typename Controller>
fl::unique_ptr< CLEDController > createTyped (CRGB *leds, int numLeds, bool rgbw)
 

Private Attributes

fl::unique_ptr< CLEDController > mController
 
fl::shared_ptr< CLEDController > mStaticController
 

The documentation for this class was generated from the following file: