4#ifndef __INC_FASTSPI_LED2_H
5#define __INC_FASTSPI_LED2_H
11#include "platforms/is_platform.h"
28#if defined(FL_IS_GCC) || defined(FL_IS_CLANG)
29#define FASTLED_HAS_PRAGMA_MESSAGE
37#define FASTLED_VERSION 3010006
38#ifndef FASTLED_INTERNAL
39# ifdef FASTLED_SHOW_VERSION
40# ifdef FASTLED_HAS_PRAGMA_MESSAGE
41# pragma message "FastLED version 3.010.006"
43# warning FastLED version 3.010.006 (Not really a warning, just telling you here.)
54#if defined(FASTLED_ESP32_I2S) && !defined(FASTLED_INTERNAL)
55#warning "-DFASTLED_ESP32_I2S is removed (FastLED#3526 Phase 2e). Drop the flag; the modern I2S engine is now on Bus::FLEX_IO, 0. Runtime select via FastLED.setExclusiveDriver<fl::Bus::FLEX_IO, 0>()."
70#if (defined(FL_IS_TEENSY_3X) || defined(FL_IS_TEENSY_LC)) && \
71 !defined(FASTLED_INTERNAL) && !defined(FL_TEENSY_EOL_SUPPRESS_WARNING)
72#warning "This Teensy (pre-4.0) is out of production and FastLED no longer hardware-validates it. If you hit a problem, try FastLED 3.10.3, the last release verified against these boards, and please file a report at https://github.com/FastLED/FastLED/issues -- we do still fix these. Define FL_TEENSY_EOL_SUPPRESS_WARNING to silence this."
88#if defined(FL_IS_ESP32)
89#include "platforms/esp/esp_version.h"
90#include "platforms/esp/32/feature_flags/enabled.h"
91#if FASTLED_RMT5 == 0 && FASTLED_ESP32_HAS_RMT && ESP_IDF_VERSION_5_OR_HIGHER
92#error "FASTLED_RMT5=0 (legacy RMT4 backend) is not supported on ESP-IDF 5.x or newer. Remove -DFASTLED_RMT5=0 to use the RMT5 backend, which is the default on this IDF. RMT4 remains available only when building against ESP-IDF 4.x. See https://github.com/FastLED/FastLED/issues/3936"
97#if !defined(FASTLED_FAKE_SPI_FORWARDS_TO_FAKE_CLOCKLESS)
98#if defined(FL_IS_WASM)
99#define FASTLED_FAKE_SPI_FORWARDS_TO_FAKE_CLOCKLESS 1
101#define FASTLED_FAKE_SPI_FORWARDS_TO_FAKE_CLOCKLESS 0
107#if !defined(FASTLED_HAS_CHANNELS)
108#if defined(FL_IS_ESP32) || defined(FL_IS_TEENSY_4X) || \
109 defined(FL_IS_RP) || defined(FL_IS_STM32) || \
110 defined(FL_IS_SAMD) || defined(FL_IS_NRF52)
111#define FASTLED_HAS_CHANNELS 1
113#define FASTLED_HAS_CHANNELS 0
121#if !defined(FASTLED_SPI_USES_CHANNEL_API)
122#if FASTLED_HAS_CHANNELS && (defined(FL_IS_ESP32) || defined(FL_IS_TEENSY_4X) || \
123 defined(FL_IS_RP2040) || defined(FL_IS_RP2350))
124#define FASTLED_SPI_USES_CHANNEL_API 1
126#define FASTLED_SPI_USES_CHANNEL_API 0
130#ifndef __PROG_TYPES_COMPAT__
134#define __PROG_TYPES_COMPAT__
138#include "platforms/wasm/js.h"
139#include "platforms/wasm/led_sysdefs_wasm.h"
140#include "platforms/wasm/compiler/Arduino.h"
141#include "platforms/wasm/js_fetch.h"
146#include <SmartMatrix.h>
152#include <DmxSimple.h>
158#include <DMXSerial.h>
164#include <OctoWS2811.h>
243#include "platforms/default_pins.h"
249#include "platforms/ldf_headers.h"
259#if !defined(FL_IS_TEENSY)
331template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
class PIXIE :
public PixieController<DATA_PIN, RGB_ORDER> {};
334#ifdef FL_CLOCKLESS_CONTROLLER_DEFINED
342template<fl::u8 DATA_PIN>
class NEOPIXEL :
public WS2812Controller800Khz<DATA_PIN, GRB> {};
346template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
347class SM16703 :
public SM16703Controller<DATA_PIN, RGB_ORDER> {};
351template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
352class SM16824E :
public SM16824EController<DATA_PIN, RGB_ORDER> {};
356template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
357class TM1829 :
public TM1829Controller800Khz<DATA_PIN, RGB_ORDER> {};
364template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
365class TX1813N1 :
public TM1829Controller800Khz<DATA_PIN, RGB_ORDER> {};
372template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
373class TM1812 :
public TM1809Controller800Khz<DATA_PIN, RGB_ORDER> {};
377template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
378class TM1809 :
public TM1809Controller800Khz<DATA_PIN, RGB_ORDER> {};
384template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
385class TM1908 :
public TM1908Controller<DATA_PIN, RGB_ORDER> {};
389template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
390class TM1804 :
public TM1809Controller800Khz<DATA_PIN, RGB_ORDER> {};
394template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
395class TM1803 :
public TM1803Controller400Khz<DATA_PIN, RGB_ORDER> {};
399template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
400class UCS1903 :
public UCS1903Controller400Khz<DATA_PIN, RGB_ORDER> {};
404template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
405class UCS1903B :
public UCS1903BController800Khz<DATA_PIN, RGB_ORDER> {};
409template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
410class UCS1904 :
public UCS1904Controller800Khz<DATA_PIN, RGB_ORDER> {};
414template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
415class UCS2903 :
public UCS2903Controller<DATA_PIN, RGB_ORDER> {};
419template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
420class UCS7604 :
public UCS7604Controller8bit<DATA_PIN, RGB_ORDER> {};
424template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
425class UCS7604HD :
public UCS7604Controller16bit<DATA_PIN, RGB_ORDER> {};
430template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
431class UCS7604HD_1600 :
public UCS7604Controller16bit1600<DATA_PIN, RGB_ORDER> {};
435template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
436class WS2812 :
public WS2812Controller800Khz<DATA_PIN, RGB_ORDER> {};
439template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
440class WS2815 :
public WS2815Controller<DATA_PIN, RGB_ORDER> {};
443template <fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
444class WS2816 :
public WS2816Controller<DATA_PIN, RGB_ORDER> {};
448template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
449class WS2852 :
public WS2812Controller800Khz<DATA_PIN, RGB_ORDER> {};
453template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
454class WS2812B :
public WS2812Controller800Khz<DATA_PIN, RGB_ORDER> {};
461template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
462class OSTW2020C1E :
public OSTW2020C1EController<DATA_PIN, RGB_ORDER> {};
466template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
467class WS2812BMiniV3 :
public WS2812BMiniV3Controller<DATA_PIN, RGB_ORDER> {};
471template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
472class WS2812BV5 :
public WS2812BV5Controller<DATA_PIN, RGB_ORDER> {};
480template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
481class GS1903 :
public GS1903Controller<DATA_PIN, RGB_ORDER> {};
485template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
486class SK6812 :
public SK6812Controller<DATA_PIN, RGB_ORDER> {};
492template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
493class LC8816E :
public LC8816EController<DATA_PIN, RGB_ORDER> {};
504template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
505class SK6812WWA :
public SK6812Controller<DATA_PIN, RGB_ORDER> {};
509template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
510class SK6822 :
public SK6822Controller<DATA_PIN, RGB_ORDER> {};
514template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
515class APA106 :
public SK6822Controller<DATA_PIN, RGB_ORDER> {};
519template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
520class PL9823 :
public PL9823Controller<DATA_PIN, RGB_ORDER> {};
524template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
525class WS2811 :
public WS2811Controller800Khz<DATA_PIN, RGB_ORDER> {};
529template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
530class WS2813 :
public WS2813Controller<DATA_PIN, RGB_ORDER> {};
537template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
538class WS2814 :
public WS2814Controller<DATA_PIN, RGB_ORDER> {};
545template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
546class WS2818 :
public WS2818Controller<DATA_PIN, RGB_ORDER> {};
550template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
551class APA104 :
public WS2811Controller800Khz<DATA_PIN, RGB_ORDER> {};
555template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
556class WS2811_400 :
public WS2811Controller400Khz<DATA_PIN, RGB_ORDER> {};
560template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
561class GE8822 :
public GE8822Controller800Khz<DATA_PIN, RGB_ORDER> {};
565template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
566class GW6205 :
public GW6205Controller800Khz<DATA_PIN, RGB_ORDER> {};
570template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
571class GW6205_400 :
public GW6205Controller400Khz<DATA_PIN, RGB_ORDER> {};
575template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
576class LPD1886 :
public LPD1886Controller1250Khz<DATA_PIN, RGB_ORDER> {};
580template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
581class LPD1886_8BIT :
public LPD1886Controller1250Khz_8bit<DATA_PIN, RGB_ORDER> {};
584template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
585class UCS1912 :
public UCS1912Controller<DATA_PIN, RGB_ORDER> {};
587#if defined(DmxSimple_h) || defined(FASTLED_DOXYGEN)
589template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
class DMXSIMPLE :
public DMXSimpleController<DATA_PIN, RGB_ORDER> {};
591#if defined(DmxSerial_h) || defined(FASTLED_DOXYGEN)
602#ifdef PORTA_FIRST_PIN
609#ifdef PORTB_FIRST_PIN
616#ifdef PORTC_FIRST_PIN
623#ifdef PORTD_FIRST_PIN
678 return static_cast<ClearFlags>(
static_cast<fl::u32
>(a) |
static_cast<fl::u32
>(b));
683 return static_cast<ClearFlags>(
static_cast<fl::u32
>(a) &
static_cast<fl::u32
>(b));
717#define FL_DITHER_ENABLE_MIN_REFRESH_HZ 100
826 static void add(fl::ChannelPtr channel);
849 template<fl::ProfileId Profile>
851 fl::ChannelPtr channel = fl::Channel::create<Profile>(config);
852 if (channel !=
nullptr)
add(channel);
1023 static void remove(fl::ChannelPtr channel);
1049 template<
template<fl::u8, fl::u8, fl::u8>
class CHIPSET,
1052 int nLedsIfOffset = 0) {
1080 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN>
1088 #define _FL_MAP_CLOCKED_CHIPSET(CHIPSET_ENUM, CONTROLLER_CLASS) \
1089 template<fl::u8 DATA_PIN, fl::u8 CLOCK_PIN> \
1090 struct ClockedChipsetHelper<CHIPSET_ENUM, DATA_PIN, CLOCK_PIN> { \
1091 static const bool IS_VALID = true; \
1092 typedef CONTROLLER_CLASS<DATA_PIN, CLOCK_PIN> ControllerType; \
1094 template<fl::EOrder RGB_ORDER> \
1095 struct CONTROLLER_CLASS_WITH_ORDER { \
1096 typedef CONTROLLER_CLASS<DATA_PIN, CLOCK_PIN, RGB_ORDER> ControllerType; \
1099 template<fl::EOrder RGB_ORDER, fl::u32 FREQ> \
1100 struct CONTROLLER_CLASS_WITH_ORDER_AND_FREQ { \
1101 typedef CONTROLLER_CLASS<DATA_PIN, CLOCK_PIN, RGB_ORDER, FREQ> ControllerType; \
1132 #if FASTLED_FAKE_SPI_FORWARDS_TO_FAKE_CLOCKLESS
1136 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::EOrder RGB_ORDER, fl::u32 SPI_DATA_RATE, fl::Bus B = fl::Bus::AUTO>
::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1143 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::Bus B = fl::Bus::AUTO> static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1150 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO>
1183 return addLeds(&sCtrl, data, nLedsOrOffset, nLedsIfOffset);
1194 static bool sRegistered =
false;
1199 return addLeds(&sCtrl, data, nLedsOrOffset, nLedsIfOffset);
1203 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::EOrder RGB_ORDER, fl::u32 SPI_DATA_RATE, fl::Bus B = fl::Bus::AUTO, fl::u8 B_WHICH = 0>
1209 return addLedsSpiDispatch<CHIPSET, DATA_PIN, CLOCK_PIN, SPI_DATA_RATE, 0, RGB_ORDER, B, B_WHICH>(data, nLedsOrOffset, nLedsIfOffset, spiCfg, UseSlim());
1213 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::EOrder RGB_ORDER, fl::u32 SPI_DATA_RATE, fl::Bus B = fl::Bus::AUTO, fl::u8 B_WHICH = 0>
1219 return addLedsSpiDispatch<CHIPSET, DATA_PIN, CLOCK_PIN, SPI_DATA_RATE, 1, RGB_ORDER, B, B_WHICH>(data, nLeds, 0, spiCfg, UseSlim());
1223 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::Bus B = fl::Bus::AUTO, fl::u8 B_WHICH = 0>
1233 return addLedsSpiDispatch<CHIPSET, DATA_PIN, CLOCK_PIN, 0, 2, order, B, B_WHICH>(data, nLedsOrOffset, nLedsIfOffset, spiCfg, UseSlim());
1237 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO, fl::u8 B_WHICH = 0>
1243 return addLedsSpiDispatch<CHIPSET, DATA_PIN, CLOCK_PIN, 0, 3, RGB_ORDER, B, B_WHICH>(data, nLedsOrOffset, nLedsIfOffset, spiCfg, UseSlim());
1246 #if FASTLED_FAKE_SPI_FORWARDS_TO_FAKE_CLOCKLESS
1248 #elif FASTLED_SPI_USES_CHANNEL_API
1251 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::EOrder RGB_ORDER, fl::u32 SPI_DATA_RATE, fl::Bus B = fl::Bus::AUTO, fl::u8 B_WHICH = 0>
1257 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::EOrder RGB_ORDER, fl::u32 SPI_DATA_RATE, fl::Bus B = fl::Bus::AUTO, fl::u8 B_WHICH = 0>
1263 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::Bus B = fl::Bus::AUTO, fl::u8 B_WHICH = 0>
1264 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1269 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO, fl::u8 B_WHICH = 0>
1277 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::EOrder RGB_ORDER, fl::u32 SPI_DATA_RATE, fl::Bus B = fl::Bus::AUTO>
::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1282 typedef typename CHIP::template CONTROLLER_CLASS_WITH_ORDER_AND_FREQ<RGB_ORDER, SPI_DATA_RATE>::ControllerType ControllerTypeWithFreq;
1283 static ControllerTypeWithFreq c;
1284 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
1289 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::EOrder RGB_ORDER, fl::u32 SPI_DATA_RATE, fl::Bus B = fl::Bus::AUTO>
1294 typedef typename CHIP::template CONTROLLER_CLASS_WITH_ORDER_AND_FREQ<RGB_ORDER, SPI_DATA_RATE>::ControllerType ControllerTypeWithFreq;
1295 static ControllerTypeWithFreq c;
1296 c.setSpiBus(spiBus);
1297 return addLeds(&c, data, nLeds, 0);
1301 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::Bus B = fl::Bus::AUTO> static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1305 typedef typename CHIP::ControllerType ControllerType;
1306 static ControllerType c;
1307 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
1311 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO>
1316 typedef typename CHIP::template CONTROLLER_CLASS_WITH_ORDER<RGB_ORDER>::ControllerType ControllerTypeWithOrder;
1317 static ControllerTypeWithOrder c;
1318 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
1324 template<ESPIChipsets CHIPSET, fl::Bus B = fl::Bus::AUTO> static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1328 template<ESPIChipsets CHIPSET, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO> static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1332 template<ESPIChipsets CHIPSET, fl::EOrder RGB_ORDER, fl::u32 SPI_DATA_RATE, fl::Bus B = fl::Bus::AUTO> static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1339#ifdef FL_CLOCKLESS_CONTROLLER_DEFINED
1343 template<
typename ControllerType>
1344 static inline ::CLEDController& addLedsImpl(ControllerType*
controller,
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset) {
1346 return addLeds(pLed, data, nLedsOrOffset, nLedsIfOffset);
1371 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1374 return addLedsImpl(&c, data, nLedsOrOffset, nLedsIfOffset);
1377 template<fl::ProfileId PROFILE,
template<fl::u8, fl::EOrder>
class CHIPSET,
1379 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1385 return addLedsImpl(&
controller, data, nLedsOrOffset, nLedsIfOffset);
1390 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1393 return addLedsImpl(&c, data, nLedsOrOffset, nLedsIfOffset);
1398 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1401 return addLedsImpl(&c, data, nLedsOrOffset, nLedsIfOffset);
1405 static ::CLEDController &
addLeds(fl::Leds&
leds,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1410#if defined(__FASTLED_HAS_FIBCC) && (__FASTLED_HAS_FIBCC == 1)
1412 static ::CLEDController &
addLeds(
CRGB *data,
int nLeds) {
1414 static fl::__FIBCC<CHIPSET, DATA_PIN, NUM_LANES, RGB_ORDER> c;
1415 return addLeds(&c, data, nLeds);
1419 #ifdef FASTSPI_USE_DMX_SIMPLE
1420 template<EClocklessChipsets CHIPSET, fl::u8 DATA_PIN, fl::EOrder RGB_ORDER=RGB, fl::Bus B = fl::Bus::AUTO>
1421 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0)
1455 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1458 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
1463 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1466 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
1469#ifdef USE_OCTOWS2811
1473 template<OWS2811 CHIPSET, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO>
1474 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0)
1489 template<OWS2811 CHIPSET, fl::Bus B = fl::Bus::AUTO>
1490 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0)
1497#ifdef USE_WS2812SERIAL
1501 template<SWS2812 CHIPSET,
int DATA_PIN, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO>
1502 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0)
1505 static CWS2812SerialController<DATA_PIN,RGB_ORDER>
controller;
1513 template<ESM CHIPSET, fl::Bus B = fl::Bus::AUTO>
1514 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0)
1525#ifdef FASTLED_HAS_BLOCKLESS
1549 template<EBlockChipsets CHIPSET,
int NUM_LANES, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO>
1550 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1553 #ifdef PORTA_FIRST_PIN
1554 case WS2811_PORTA:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, fl::TIMING_WS2811_800KHZ_LEGACY, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1555 case WS2811_400_PORTA:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, fl::TIMING_WS2811_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1556 case WS2813_PORTA:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, fl::TIMING_WS2813, RGB_ORDER, 0, false>(), data, nLedsOrOffset, nLedsIfOffset);
1557 case TM1803_PORTA:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, fl::TIMING_TM1803_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1558 case UCS1903_PORTA:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, fl::TIMING_UCS1903_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1560 #ifdef PORTB_FIRST_PIN
1561 case WS2811_PORTB:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, fl::TIMING_WS2811_800KHZ_LEGACY, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1562 case WS2811_400_PORTB:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, fl::TIMING_WS2811_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1563 case WS2813_PORTB:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, fl::TIMING_WS2813, RGB_ORDER, 0, false>(), data, nLedsOrOffset, nLedsIfOffset);
1564 case TM1803_PORTB:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, fl::TIMING_TM1803_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1565 case UCS1903_PORTB:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, fl::TIMING_UCS1903_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1567 #ifdef PORTC_FIRST_PIN
1568 case WS2811_PORTC:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, fl::TIMING_WS2811_800KHZ_LEGACY, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1569 case WS2811_400_PORTC:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, fl::TIMING_WS2811_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1570 case WS2813_PORTC:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, fl::TIMING_WS2813, RGB_ORDER, 0, false>(), data, nLedsOrOffset, nLedsIfOffset);
1571 case TM1803_PORTC:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, fl::TIMING_TM1803_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1572 case UCS1903_PORTC:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, fl::TIMING_UCS1903_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1574 #ifdef PORTD_FIRST_PIN
1575 case WS2811_PORTD:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, fl::TIMING_WS2811_800KHZ_LEGACY, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1576 case WS2811_400_PORTD:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, fl::TIMING_WS2811_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1577 case WS2813_PORTD:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, fl::TIMING_WS2813, RGB_ORDER, 0, false>(), data, nLedsOrOffset, nLedsIfOffset);
1578 case TM1803_PORTD:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, fl::TIMING_TM1803_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1579 case UCS1903_PORTD:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, fl::TIMING_UCS1903_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1582 case WS2811_PORTDC:
return addLeds(
new fl::SixteenWayInlineBlockClocklessController<NUM_LANES, fl::TIMING_WS2811_800KHZ_LEGACY, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1583 case WS2811_400_PORTDC:
return addLeds(
new fl::SixteenWayInlineBlockClocklessController<NUM_LANES, fl::TIMING_WS2811_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1584 case WS2813_PORTDC:
return addLeds(
new fl::SixteenWayInlineBlockClocklessController<NUM_LANES, fl::TIMING_WS2813, RGB_ORDER, 0, false>(), data, nLedsOrOffset, nLedsIfOffset);
1585 case TM1803_PORTDC:
return addLeds(
new fl::SixteenWayInlineBlockClocklessController<NUM_LANES, fl::TIMING_TM1803_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1586 case UCS1903_PORTDC:
return addLeds(
new fl::SixteenWayInlineBlockClocklessController<NUM_LANES, fl::TIMING_UCS1903_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1592 template<EBlockChipsets CHIPSET,
int NUM_LANES, fl::Bus B = fl::Bus::AUTO>
1593 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1643 template<fl::Bus B, fl::u8 Which = 0>
1688 bool wait(fl::u32 timeout_ms);
1699#if FL_COLOR_PIPELINE_SHARED
1700 fl::activeFramePowerDispatch() = fl::framePowerDispatch();
1701 mPPowerFunc = fl::activeFramePowerDispatch()->showBrightness;
1913 void clear(
bool writeData =
false);
1954 void delay(
unsigned long ms);
2023#define FastSPI_LED FastLED
2025#define FastSPI_LED2 FastLED
2037#ifndef HAS_HARDWARE_PIN_SUPPORT
2038#warning "No pin/port mappings found, pin access will be slightly slower. See fastpin.h for info."
2039#define NO_HARDWARE_PIN_SUPPORT
2048#if !defined(FASTLED_INTERNAL) && !defined(FASTLED_LEAN_AND_MEAN)
2064#if defined(FL_INCLUDE_REMOTE)
2105#if defined(FASTLED_STUB_IMPL)
2117#define FASTLED_TITLE(text) fl::UITitle g_title(text)
2118#define FASTLED_DESCRIPTION(text) fl::UIDescription g_description(text)
2119#define FASTLED_HELP(text) fl::UIHelp g_help(text)
2150#ifndef FASTLED_LOOP_RUNS_ASYNC
2151#define FASTLED_LOOP_RUNS_ASYNC 0
2154#if FASTLED_LOOP_RUNS_ASYNC == 1
2159 void loop() { sketch_loop(); fl::task::run(); } \
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
CLEDController * controller
fl::UISlider scale("Scale", 4,.1, 4,.1)
Three-pin PWM controller for non-addressable RGB LEDs and strips.
Functions for doing a rotation of bits/bytes used by parallel output.
Portable compile-time identifiers for LED channel buses.
Portable bus/device introspection.
Per-driver traits keyed on fl::Bus.
ESP32-P4 Parallel IO (PARLIO) LED channel.
Phase 3b templated channel facade – Channel<Bus, Chipset> with compile-time bus/chipset enforcement.
Multi-lane SPI interface for LED output Hardware (SPI_HW): 1-8 parallel data lanes Software (SPI_BITB...
Contains the bulk of the definitions for the various LED chipsets supported.
APA102 high definition controller class.
::CLEDController & addLeds(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add an SPI based CLEDController instance to the world (legacy path).
static void enableAllDrivers()
Enroll every channel driver available on this platform with ChannelManager.
power_func mPPowerFunc
function for overriding brightness when using FastLED.show();
fl::u32 getEstimatedPowerInMilliWatts(bool apply_limiter=true) const
Get estimated power consumption in milliwatts.
_FL_MAP_CLOCKED_CHIPSET(LPD6803, LPD6803Controller) _FL_MAP_CLOCKED_CHIPSET(LPD8806
void setExclusiveDriver() FL_NO_EXCEPT
Register a single driver at a priority above the platform default (compile-time TU-linking variant).
static fl::vector< fl::ChannelPtr > & channels()
stored ChannelPtrs to keep them alive
void setHdFieldFloor(fl::u8 min_field)
Lowest 5-bit current field the colour-managed APA102-HD path may use (B1's flicker floor,...
void setDriverEnabled(const char *name, bool enabled)
Enable or disable a channel driver by name at runtime.
static void _setWaitSpinBudgetUs(fl::u32 budget_us) FL_NO_EXCEPT
int size()
Get the number of leds in the first controller.
void setMaxPowerInVoltsAndMilliamps(fl::u8 volts, fl::u32 milliamps)
Set the maximum power to be used, given in volts and milliamps.
CRGB * leds()
Get a pointer to led data for the first controller.
bool isDriverEnabled(const char *name) const
Check if a driver is enabled by name.
void setPowerModel(const PowerModelRGBWW &model)
void onEndShowLeds()
Manually trigger the end show LEDs event.
void setMaxRefreshRate(fl::u16 refresh, bool constrain=false)
Set the maximum refresh rate.
static fl::RxChannelPtr addRx(const fl::RxChannelConfig &config)
Add an RX channel with runtime configuration.
void setTemperature(const CRGB &temp)
Set a global color temperature.
bool colorManagementStrict() const FL_NO_EXCEPT
void show()
Update all our controllers with the current led colors.
fl::u32 getWaitSpinBudgetUs() const FL_NO_EXCEPT
Get the current tiered-wait spin budget (microseconds).
fl::u8 getBrightness()
Get the current global brightness setting.
void showColor(const CRGB &color)
Set all leds on all controllers to the given color.
void setWaitSpinBudgetUs(fl::u32 budget_us) FL_NO_EXCEPT
Override the channel-manager tiered-wait spin budget (microseconds).
void onBeginFrame()
Manually trigger the begin frame event.
static fl::u32 _getWaitSpinBudgetUs() FL_NO_EXCEPT
static void remove(fl::ChannelPtr channel)
Remove a channel from the LED controller list.
::CLEDController & addLedsSpiChannel(CRGB *data, int nLeds, fl::Esp32SpiBus spiBus)
Add an SPI controller with an explicit ESP-IDF SPI host.
void showColor(const CRGB &color, fl::u8 scale)
Set all leds on all controllers to the given color/scale.
fl::u8 getLastShowBrightness() const
Brightness the most recent show() / showColor() actually applied, after the power limiter set by setM...
void removeListener(fl::EngineEvents::Listener *listener)
void setPowerModel(const PowerModelRGB &model)
::CLEDController & addLedsSpiChannel(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add an SPI based CLEDController via Channel API (default speed).
static fl::ChannelPtr add(const fl::ChannelConfig &config)
float getPowerScalingExponent() const
Get the configured brightness-to-power response exponent.
void countFPS(int nFrames=25)
For debugging, this will keep track of time between calls to countFPS().
CLEDController & operator[](int x)
Get a reference to a registered controller.
::CLEDController & addLedsSpiChannel(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add an SPI based CLEDController via Channel API (default RGB order and speed).
void setMaxPowerInMilliWatts(fl::u32 milliwatts)
Set the maximum power to be used, given in milliwatts.
void delay(unsigned long ms)
Delay for the given number of milliseconds.
fl::u8 getHdFieldFloor() const
static ::CLEDController & addLeds(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add an SPI based CLEDController instance to the world (legacy path).
const fl::DiodeProfile * getRgbwColorimetricProfile() const FL_NO_EXCEPT
Currently active RGBW colorimetric profile (defaults to &fl::kRgbwDefaultProfile).
::CLEDController & addLedsSpiChannel(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add an SPI based CLEDController via Channel API.
void setPowerScalingExponent(float exponent)
Set a non-linear brightness-to-power response exponent.
void setBrightness(fl::u8 scale)
Set the global brightness scaling.
bool isPowerLimited() const
True if the power limiter lowered the brightness of the most recent show() / showColor() below what i...
void setColorManagementStrict(bool strict) FL_NO_EXCEPT
In strict mode a channel that requests color management without an emitter profile reports a rejected...
fl::u8 mScale
the current global brightness scale setting
::CLEDController & addLedsSpiDispatch(CRGB *data, int nLedsOrOffset, int nLedsIfOffset, const fl::SpiChipsetConfig &spiCfg, fl::false_type)
void setDither(fl::u8 ditherMode=BINARY_DITHER)
Set the dithering mode.
fl::size getDriverCount() const
Get count of registered channel drivers.
static fl::Watchdog & watchdog()
Access the unified cross-platform watchdog timer.
void setRgbwColorimetricProfile(const fl::DiodeProfile *profile) FL_NO_EXCEPT
Install a legacy fallback RGBW diode chromaticity profile for scalar colorimetric calls.
void setDefaultSourceProfile(const fl::SourceProfile &profile) FL_NO_EXCEPT
fl::u32 mNPowerData
max power use parameter
::CLEDController & addLeds(CRGB *data, int nLeds, fl::Esp32SpiBus spiBus)
Add an SPI controller on a selected ESP-IDF host.
fl::u16 mNFPS
tracking for current frames per second (FPS) value
fl::u8 mLastShownScale
brightness the last show()/showColor() applied, after the power limiter
fl::u32 mNMinMicros
minimum µs between frames, used for capping frame rates
void init()
Initialize platform-specific subsystems.
::CLEDController & addLeds(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a 3rd party library based CLEDController instance to the world.
static void add(fl::ChannelPtr channel)
Add a Channel-based LED controller (from ChannelPtr)
void clearData()
Clear out the local data array.
::CLEDController & addLeds(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add an SPI based CLEDController instance to the world (legacy path).
void addListener(fl::EngineEvents::Listener *listener)
fl::u8 mLastRequestedScale
brightness the last show()/showColor() was asked for
const fl::SourceProfile & defaultSourceProfile() const FL_NO_EXCEPT
PowerModelRGB getPowerModel() const
Get current RGB power model.
int count()
Get how many controllers have been registered.
::CLEDController & addLeds(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
void setPowerModel(const PowerModelRGBW &model)
void wait()
Wait for all channel bus transmissions to complete.
void clear(bool writeData=false)
Clear the leds, wiping the local array of data.
void setCorrection(const CRGB &correction)
Set a global color correction.
fl::u16 getFPS()
Get the number of frames/second being written out.
::CLEDController & addLeds(::CLEDController *pLed, CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a CLEDController instance to the world.
LPD8806Controller WS2803Controller MY9221Controller APA102Controller APA102ControllerHD APA102Controller HD108Controller SK9822ControllerHD ::CLEDController & addLedsSpiDispatch(CRGB *data, int nLedsOrOffset, int nLedsIfOffset, const fl::SpiChipsetConfig &spiCfg, fl::true_type)
::CLEDController & addLeds(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a 3rd party library based CLEDController instance to the world.
fl::span< const fl::DriverInfo > getDriverInfos() const
Get full state of all registered channel drivers.
static fl::ChannelEvents & channelEvents()
Access the channel event system.
and refresh rates, and provides access functions for driving led data to controllers via the show() /...
DMX512 based LED controller class, using the DMXSerial library.
DMX512 based LED controller class, using the DmxSimple library.
LPD6803 controller class (LPD1101).
LPD8806 controller class.
SM16716 controller class.
void setExclusiveDriver() FL_NO_EXCEPT
Register a single driver at a priority above the platform default and disable all others (compile-tim...
static void removeListener(Listener *listener) FL_NO_EXCEPT
static void addListener(Listener *listener, int priority=0) FL_NO_EXCEPT
Shared legacy addLeds<ESPIChipsets ...>() bridge controller over an IChannelDriver,...
Unified cross-platform watchdog interface.
fl::CLEDController CLEDController
Declarations for the predefined color palettes supplied by FastLED.
Compatibility functions based on C++ version.
#define BINARY_DITHER
Enable dithering using binary dithering (only option)
FastLED dynamic library interface - lightweight header for external callers.
Defines the DMX512-based LED controllers.
Task executor — runs registered task runners and manages the run loop.
#define _FL_MAP_CLOCKED_CHIPSET(CHIPSET_ENUM, CONTROLLER_CLASS)
ClearFlags
Flags for FastLED.clear() to control what state gets cleared/reset.
@ CHANNELS
Remove all channels from controller list.
@ CHANNEL_ENGINES
Clear all channel drivers from ChannelManager.
@ POWER_SETTINGS
Reset power management (setMaxPowerInMilliWatts)
@ FPS_COUNTER
Reset FPS tracking counter to 0.
@ NONE
Clear nothing (no-op)
@ REFRESH_RATE
Reset refresh rate limiting to unlimited.
ClearFlags & operator|=(ClearFlags &a, ClearFlags b)
Enable bitwise OR assignment for ClearFlags.
SWS2812
WS2812Serial Library controller type.
ClearFlags operator|(ClearFlags a, ClearFlags b)
Enable bitwise OR for ClearFlags.
OWS2811
Octo WS2811 LED Library controller types.
ClearFlags operator&(ClearFlags a, ClearFlags b)
Enable bitwise AND for ClearFlags.
ESPIChipsets
Backwards compatibility enum - allows old code to use unscoped names (e.g., APA102 instead of fl::Spi...
@ APA102HD
APA102 LED chipset with 5-bit gamma correction.
@ P9813
P9813 LED chipset.
@ SK9822HD
SK9822 LED chipset with 5-bit gamma correction.
@ SK9822
SK9822 LED chipset.
@ MY9221
MY9221 12-channel LED driver (dual-edge clocked; 4 RGB LEDs per chip)
@ WS2803
WS2803 LED chipset.
@ HD107
Same as APA102, but in turbo 40-mhz mode.
@ HD107S
Marketed HD107S part name; alias of HD107.
@ WS2801
WS2801 LED chipset.
@ DOTSTAR
APA102 LED chipset alias.
@ APA102
APA102 LED chipset.
@ LPD8806
LPD8806 LED chipset.
@ HD107HD
Same as APA102HD, but in turbo 40-mhz mode.
@ LPD6803
LPD6803 LED chipset.
@ DOTSTARHD
APA102HD LED chipset alias.
@ SM16716
SM16716 LED chipset.
@ HD108
16-bit variant of HD107, always gamma corrected. No SD (standard definition) option available - all H...
ESM
Smart Matrix Library controller type.
EBlockChipsets
Blockless output port enum.
fl::u8(* power_func)(fl::u8 scale, fl::u32 data)
Typedef for a power consumption calculation function.
Contains definitions that can be used to configure FastLED at compile time.
Utility functions and classes for managing delay cycles.
Wrapper definitions to allow seamless use of PROGMEM in environments that have it.
Backward compatibility header - use fl/fastpin.h directly.
Serial peripheral interface (SPI) definitions per platform.
Data types and constants used by SPI interfaces.
Public color namespace facade for RGBW colorimetric profile APIs.
Functions for red, green, blue, white (RGBW) output.
Internal FastLED header for implementation files.
fl::u8 calculate_max_brightness_for_power_mW(const CRGB *ledbuffer, fl::u16 numLeds, fl::u8 target_brightness, fl::u32 max_power_mW)
Determines the highest brightness level you can use and still stay under the specified power budget f...
void set_power_model(const PowerModelRGB &model)
Set custom RGB LED power consumption model.
float get_power_scaling_exponent()
Get the current brightness-to-power response exponent.
void set_power_scaling_exponent(float exponent)
Set a non-linear brightness-to-power response exponent.
PowerModelRGB get_power_model()
Get current RGB power model.
Functions to convert from the HSV colorspace to the RGB colorspace.
Determines which platform system definitions to include.
Fast, efficient 8-bit math functions specifically designed for high-performance LED programming.
Centralized logging categories for FastLED hardware interfaces and subsystems.
Unified manager for channel drivers with priority-based fallback.
bool & colorProfileStrictMode() FL_NO_EXCEPT
SourceProfile & defaultSourceProfile() FL_NO_EXCEPT
static constexpr EmitterProfile WS2812B
Esp32SpiBus
ESP-IDF SPI host selection for an individual clocked LED controller.
constexpr common_type_t< T, U > max(T a, U b) FL_NO_EXCEPT
void delay(u32 ms, bool run_async=true) FL_NO_EXCEPT
Public delay wrapper that keeps bare Arduino delay() preferred after using fl::delay; while still all...
ChannelManager & channelManager()
Get the global ChannelManager singleton instance.
FL_DISABLE_WARNING_PUSH unsigned char * B
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NO_EXCEPT
integral_constant< bool, false > false_type
enable_if<!is_integral< T >::value, T >::type round(T value) FL_NO_EXCEPT
void busKeepAlive() FL_NO_EXCEPT
Bus
Portable public bus selector.
const DiodeProfile * get_rgbw_colorimetric_profile() FL_NO_EXCEPT
void set_rgbw_colorimetric_profile(const DiodeProfile *profile) FL_NO_EXCEPT
EOrder
RGB color channel orderings, used when instantiating controllers to determine what order the controll...
PowerCodecPolicy powerChannelCodecPolicy(const CLEDController &controller) FL_NO_EXCEPT
Identify the channel's final current/quantization choice without adding a virtual slot or storage to ...
constexpr T degrees(T rad) FL_NO_EXCEPT
constexpr enable_if< is_fixed_point< T >::value, T >::type abs(T x) FL_NO_EXCEPT
SpiChipset
LED chipsets with SPI interface (clocked protocols) Modern type-safe enum class - prefer this for new...
@ SM16716
SM16716 LED chipset.
@ LPD6803
LPD6803 LED chipset.
@ APA102HD
APA102 LED chipset with 5-bit gamma correction.
@ HD107
Same as APA102, but in turbo 40-mhz mode.
@ DOTSTARHD
APA102HD LED chipset alias.
@ SK9822HD
SK9822 LED chipset with 5-bit gamma correction.
@ HD107S
Marketed HD107S part name; protocol-compatible alias of HD107.
@ SK9822
SK9822 LED chipset.
@ DOTSTAR
APA102 LED chipset alias.
@ P9813
P9813 LED chipset.
@ APA102
APA102 LED chipset.
@ HD108
16-bit variant of HD107, always gamma corrected. No SD (standard definition) option available - all H...
@ LPD8806
LPD8806 LED chipset.
@ WS2803
WS2803 LED chipset.
@ MY9221
MY9221 12-channel LED driver (dual-edge clocked; 4 RGB LEDs per chip)
@ WS2801
WS2801 LED chipset.
@ HD107HD
Same as APA102HD, but in turbo 40-mhz mode.
integral_constant< bool, true > true_type
constexpr T radians(T deg) FL_NO_EXCEPT
Base definition for an LED controller.
Functions to generate and fill arrays with noise.
Declares classes for managing logical groups of LEDs.
Includes defintions for RGB and HSV pixels.
Functions to limit the power used by FastLED.
Common RX interfaces and shared types.
Shared "slim bridge" legacy addLeds<ESPIChipsets ...>() controller for the SPI channel API – driver-a...
SPI LED chipset enumeration.
#define FL_STATIC_ASSERT(...)
Portable compile-time assertion wrapper.
static const bool IS_VALID
RGB LED power consumption model Used for standard 3-channel LEDs (WS2812, WS2812B,...
RGBW LED power consumption model Used for 4-channel LEDs (SK6812 RGBW and similar).
RGBWW LED power consumption model (RGB + warm white + cool white).
Configuration for a single LED channel.
Singleton event router for Channel lifecycle events.
A source declaration, not a container or an output-device selection.
SPI chipset configuration (data + clock pins)
static SpiEncoder spiEncoderForChipset(SpiChipset chipset, u32 speed_hz_override=0) FL_NO_EXCEPT
Look up the default SpiEncoder for a given chipset.
SPI encoder configuration for LED protocols.
Aggregator header for the fl/ui/ family of per-element UI types.
Unified cross-platform Watchdog Timer API for FastLED.