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 3010008
38#ifndef FASTLED_INTERNAL
39# ifdef FASTLED_SHOW_VERSION
40# ifdef FASTLED_HAS_PRAGMA_MESSAGE
41# pragma message "FastLED version 3.010.008"
43# warning FastLED version 3.010.008 (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
849 template<
fl::ProfileId Profile>
851 fl::ChannelPtr channel = fl::Channel::create<Profile>(config);
852 if (channel !=
nullptr)
add(channel);
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)
FL_NO_EXCEPT {
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)
FL_NO_EXCEPT {
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)
FL_NO_EXCEPT {
1346 return addLeds(pLed, data, nLedsOrOffset, nLedsIfOffset);
1374 return addLedsImpl(&c, data, nLedsOrOffset, nLedsIfOffset);
1382 return addLedsImpl(&c, data, nLedsOrOffset, nLedsIfOffset);
1390 return addLedsImpl(&c, data, nLedsOrOffset, nLedsIfOffset);
1399#if defined(__FASTLED_HAS_FIBCC) && (__FASTLED_HAS_FIBCC == 1)
1401 static ::CLEDController &
addLeds(
CRGB *data,
int nLeds) {
1403 static fl::__FIBCC<CHIPSET, DATA_PIN, NUM_LANES, RGB_ORDER> c;
1404 return addLeds(&c, data, nLeds);
1408 #ifdef FASTSPI_USE_DMX_SIMPLE
1409 template<EClocklessChipsets CHIPSET, fl::u8 DATA_PIN, fl::EOrder RGB_ORDER=RGB, fl::Bus B = fl::Bus::AUTO>
1410 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0)
1447 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
1455 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
1458#ifdef USE_OCTOWS2811
1462 template<OWS2811 CHIPSET, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO>
1463 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0)
1478 template<OWS2811 CHIPSET, fl::Bus B = fl::Bus::AUTO>
1479 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0)
1486#ifdef USE_WS2812SERIAL
1490 template<SWS2812 CHIPSET,
int DATA_PIN, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO>
1491 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0)
1494 static CWS2812SerialController<DATA_PIN,RGB_ORDER>
controller;
1502 template<ESM CHIPSET, fl::Bus B = fl::Bus::AUTO>
1503 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0)
1514#ifdef FASTLED_HAS_BLOCKLESS
1538 template<EBlockChipsets CHIPSET,
int NUM_LANES, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO>
1539 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1542 #ifdef PORTA_FIRST_PIN
1543 case WS2811_PORTA:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, fl::TIMING_WS2811_800KHZ_LEGACY, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1544 case WS2811_400_PORTA:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, fl::TIMING_WS2811_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1545 case WS2813_PORTA:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, fl::TIMING_WS2813, RGB_ORDER, 0, false>(), data, nLedsOrOffset, nLedsIfOffset);
1546 case TM1803_PORTA:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, fl::TIMING_TM1803_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1547 case UCS1903_PORTA:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, fl::TIMING_UCS1903_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1549 #ifdef PORTB_FIRST_PIN
1550 case WS2811_PORTB:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, fl::TIMING_WS2811_800KHZ_LEGACY, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1551 case WS2811_400_PORTB:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, fl::TIMING_WS2811_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1552 case WS2813_PORTB:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, fl::TIMING_WS2813, RGB_ORDER, 0, false>(), data, nLedsOrOffset, nLedsIfOffset);
1553 case TM1803_PORTB:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, fl::TIMING_TM1803_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1554 case UCS1903_PORTB:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, fl::TIMING_UCS1903_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1556 #ifdef PORTC_FIRST_PIN
1557 case WS2811_PORTC:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, fl::TIMING_WS2811_800KHZ_LEGACY, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1558 case WS2811_400_PORTC:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, fl::TIMING_WS2811_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1559 case WS2813_PORTC:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, fl::TIMING_WS2813, RGB_ORDER, 0, false>(), data, nLedsOrOffset, nLedsIfOffset);
1560 case TM1803_PORTC:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, fl::TIMING_TM1803_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1561 case UCS1903_PORTC:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, fl::TIMING_UCS1903_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1563 #ifdef PORTD_FIRST_PIN
1564 case WS2811_PORTD:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, fl::TIMING_WS2811_800KHZ_LEGACY, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1565 case WS2811_400_PORTD:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, fl::TIMING_WS2811_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1566 case WS2813_PORTD:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, fl::TIMING_WS2813, RGB_ORDER, 0, false>(), data, nLedsOrOffset, nLedsIfOffset);
1567 case TM1803_PORTD:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, fl::TIMING_TM1803_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1568 case UCS1903_PORTD:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, fl::TIMING_UCS1903_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1571 case WS2811_PORTDC:
return addLeds(
new fl::SixteenWayInlineBlockClocklessController<NUM_LANES, fl::TIMING_WS2811_800KHZ_LEGACY, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1572 case WS2811_400_PORTDC:
return addLeds(
new fl::SixteenWayInlineBlockClocklessController<NUM_LANES, fl::TIMING_WS2811_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1573 case WS2813_PORTDC:
return addLeds(
new fl::SixteenWayInlineBlockClocklessController<NUM_LANES, fl::TIMING_WS2813, RGB_ORDER, 0, false>(), data, nLedsOrOffset, nLedsIfOffset);
1574 case TM1803_PORTDC:
return addLeds(
new fl::SixteenWayInlineBlockClocklessController<NUM_LANES, fl::TIMING_TM1803_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1575 case UCS1903_PORTDC:
return addLeds(
new fl::SixteenWayInlineBlockClocklessController<NUM_LANES, fl::TIMING_UCS1903_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1581 template<EBlockChipsets CHIPSET,
int NUM_LANES, fl::Bus B = fl::Bus::AUTO>
1582 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1632 template<fl::Bus B, fl::u8 Which = 0>
1688#if FL_COLOR_PIPELINE_SHARED
1689 fl::activeFramePowerDispatch() = fl::framePowerDispatch();
1690 mPPowerFunc = fl::activeFramePowerDispatch()->showBrightness;
2012#define FastSPI_LED FastLED
2014#define FastSPI_LED2 FastLED
2026#ifndef HAS_HARDWARE_PIN_SUPPORT
2027#warning "No pin/port mappings found, pin access will be slightly slower. See fastpin.h for info."
2028#define NO_HARDWARE_PIN_SUPPORT
2037#if !defined(FASTLED_INTERNAL) && !defined(FASTLED_LEAN_AND_MEAN)
2053#if defined(FL_INCLUDE_REMOTE)
2095#if defined(FASTLED_STUB_IMPL)
2107#define FASTLED_TITLE(text) fl::UITitle g_title(text)
2108#define FASTLED_DESCRIPTION(text) fl::UIDescription g_description(text)
2109#define FASTLED_HELP(text) fl::UIHelp g_help(text)
2140#ifndef FASTLED_LOOP_RUNS_ASYNC
2141#define FASTLED_LOOP_RUNS_ASYNC 0
2144#if FASTLED_LOOP_RUNS_ASYNC == 1
2149 void loop() { sketch_loop(); fl::task::run(); } \
fl::UIAudio audio("Audio Input")
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
ClearFlags operator&(ClearFlags a, ClearFlags b) FL_NO_EXCEPT
Enable bitwise AND for ClearFlags.
#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) FL_NO_EXCEPT
Enable bitwise OR assignment for ClearFlags.
ClearFlags operator|(ClearFlags a, ClearFlags b) FL_NO_EXCEPT
Enable bitwise OR for ClearFlags.
SWS2812
WS2812Serial Library controller type.
OWS2811
Octo WS2811 LED Library controller types.
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.
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.
void clear(bool writeData=false) FL_NO_EXCEPT
Clear the leds, wiping the local array of data.
power_func mPPowerFunc
function for overriding brightness when using FastLED.show();
_FL_MAP_CLOCKED_CHIPSET(LPD6803, LPD6803Controller) _FL_MAP_CLOCKED_CHIPSET(LPD8806
fl::u8 getBrightness() FL_NO_EXCEPT
Get the current global brightness setting.
fl::u8 getHdFieldFloor() const FL_NO_EXCEPT
void setExclusiveDriver() FL_NO_EXCEPT
Register a single driver at a priority above the platform default (compile-time TU-linking variant).
void setCorrection(const CRGB &correction) FL_NO_EXCEPT
Set a global color correction.
float getPowerScalingExponent() const FL_NO_EXCEPT
Get the configured brightness-to-power response exponent.
void setPowerModel(const PowerModelRGBW &model) FL_NO_EXCEPT
static void _setWaitSpinBudgetUs(fl::u32 budget_us) FL_NO_EXCEPT
static void add(fl::ChannelPtr channel) FL_NO_EXCEPT
Add a Channel-based LED controller (from ChannelPtr)
void show() FL_NO_EXCEPT
Update all our controllers with the current led colors.
void setDriverEnabled(const char *name, bool enabled) FL_NO_EXCEPT
Enable or disable a channel driver by name at runtime.
static fl::ChannelEvents & channelEvents() FL_NO_EXCEPT
Access the channel event system.
void countFPS(int nFrames=25) FL_NO_EXCEPT
For debugging, this will keep track of time between calls to countFPS().
bool colorManagementStrict() const FL_NO_EXCEPT
void onEndShowLeds() FL_NO_EXCEPT
Manually trigger the end show LEDs event.
fl::u32 getWaitSpinBudgetUs() const FL_NO_EXCEPT
Get the current tiered-wait spin budget (microseconds).
::CLEDController & addLeds(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0) FL_NO_EXCEPT
Add a 3rd party library based CLEDController instance to the world.
void setWaitSpinBudgetUs(fl::u32 budget_us) FL_NO_EXCEPT
Override the channel-manager tiered-wait spin budget (microseconds).
static fl::u32 _getWaitSpinBudgetUs() FL_NO_EXCEPT
static fl::Watchdog & watchdog() FL_NO_EXCEPT
Access the unified cross-platform watchdog timer.
static void remove(fl::ChannelPtr channel) FL_NO_EXCEPT
Remove a channel from the LED controller list.
int size() FL_NO_EXCEPT
Get the number of leds in the first controller.
void setMaxPowerInMilliWatts(fl::u32 milliwatts) FL_NO_EXCEPT
Set the maximum power to be used, given in milliwatts.
::CLEDController & addLeds(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0) FL_NO_EXCEPT
Add an SPI based CLEDController instance to the world (legacy path).
void setBrightness(fl::u8 scale) FL_NO_EXCEPT
Set the global brightness scaling.
void setMaxPowerInVoltsAndMilliamps(fl::u8 volts, fl::u32 milliamps) FL_NO_EXCEPT
Set the maximum power to be used, given in volts and milliamps.
::CLEDController & addLedsSpiDispatch(CRGB *data, int nLedsOrOffset, int nLedsIfOffset, const fl::SpiChipsetConfig &spiCfg, fl::false_type) FL_NO_EXCEPT
void clearData() FL_NO_EXCEPT
Clear out the local data array.
void setDither(fl::u8 ditherMode=BINARY_DITHER) FL_NO_EXCEPT
Set the dithering mode.
::CLEDController & addLeds(CRGB *data, int nLeds, fl::Esp32SpiBus spiBus) FL_NO_EXCEPT
Add an SPI controller on a selected ESP-IDF host.
const fl::DiodeProfile * getRgbwColorimetricProfile() const FL_NO_EXCEPT
Currently active RGBW colorimetric profile (defaults to &fl::kRgbwDefaultProfile).
fl::u16 getFPS() FL_NO_EXCEPT
Get the number of frames/second being written out.
fl::u8 getLastShowBrightness() const FL_NO_EXCEPT
Brightness the most recent show() / showColor() actually applied, after the power limiter set by setM...
static fl::vector< fl::ChannelPtr > & channels() FL_NO_EXCEPT
stored ChannelPtrs to keep them alive
LPD8806Controller WS2803Controller MY9221Controller APA102Controller APA102ControllerHD APA102Controller HD108Controller SK9822ControllerHD ::CLEDController & addLedsSpiDispatch(CRGB *data, int nLedsOrOffset, int nLedsIfOffset, const fl::SpiChipsetConfig &spiCfg, fl::true_type) FL_NO_EXCEPT
void onBeginFrame() FL_NO_EXCEPT
Manually trigger the begin frame event.
void showColor(const CRGB &color, fl::u8 scale) FL_NO_EXCEPT
Set all leds on all controllers to the given color/scale.
void setColorManagementStrict(bool strict) FL_NO_EXCEPT
In strict mode a channel that requests color management without an emitter profile reports a rejected...
void wait() FL_NO_EXCEPT
Wait for all channel bus transmissions to complete.
fl::u8 mScale
the current global brightness scale setting
void onEndFrame() FL_NO_EXCEPT
bool isPowerLimited() const FL_NO_EXCEPT
True if the power limiter lowered the brightness of the most recent show() / showColor() below what i...
CRGB * leds() FL_NO_EXCEPT
Get a pointer to led data for the first controller.
::CLEDController & addLedsSpiChannel(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0) FL_NO_EXCEPT
Add an SPI based CLEDController via Channel API (default RGB order and speed).
void showColor(const CRGB &color) FL_NO_EXCEPT
Set all leds on all controllers to the given color.
static ::CLEDController & addLeds(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0) FL_NO_EXCEPT
Add an SPI based CLEDController instance to the world (legacy path).
void setPowerModel(const PowerModelRGB &model) FL_NO_EXCEPT
void delay(unsigned long ms) FL_NO_EXCEPT
Delay for the given number of milliseconds.
static fl::RxChannelPtr addRx(const fl::RxChannelConfig &config) FL_NO_EXCEPT
Add an RX channel with runtime configuration.
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
fl::u16 mNFPS
tracking for current frames per second (FPS) value
void setMaxRefreshRate(fl::u16 refresh, bool constrain=false) FL_NO_EXCEPT
Set the maximum refresh rate.
void init() FL_NO_EXCEPT
Initialize platform-specific subsystems.
fl::u8 mLastShownScale
brightness the last show()/showColor() applied, after the power limiter
::CLEDController & addLedsSpiChannel(CRGB *data, int nLeds, fl::Esp32SpiBus spiBus) FL_NO_EXCEPT
Add an SPI controller with an explicit ESP-IDF SPI host.
void addListener(fl::EngineEvents::Listener *listener) FL_NO_EXCEPT
::CLEDController & addLeds(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a OCTOWS2811 based CLEDController instance to the world.
void setTemperature(const CRGB &temp) FL_NO_EXCEPT
Set a global color temperature.
int count() FL_NO_EXCEPT
Get how many controllers have been registered.
fl::u8 mLastRequestedScale
brightness the last show()/showColor() was asked for
::CLEDController & addLedsSpiChannel(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0) FL_NO_EXCEPT
Add an SPI based CLEDController via Channel API (default speed).
::CLEDController & addLedsSpiChannel(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0) FL_NO_EXCEPT
Add an SPI based CLEDController via Channel API.
const fl::SourceProfile & defaultSourceProfile() const FL_NO_EXCEPT
::CLEDController & addLeds(::CLEDController *pLed, CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0) FL_NO_EXCEPT
Add a CLEDController instance to the world.
void setPowerModel(const PowerModelRGBWW &model) FL_NO_EXCEPT
::CLEDController & addLeds(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0) FL_NO_EXCEPT
Add an SPI based CLEDController instance to the world (legacy path).
::CLEDController & addLeds(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a WS2812Serial library based CLEDController instance to the world.
fl::span< const fl::DriverInfo > getDriverInfos() const FL_NO_EXCEPT
Get full state of all registered channel drivers.
void setPowerScalingExponent(float exponent) FL_NO_EXCEPT
Set a non-linear brightness-to-power response exponent.
bool isDriverEnabled(const char *name) const FL_NO_EXCEPT
Check if a driver is enabled by name.
fl::u32 getEstimatedPowerInMilliWatts(bool apply_limiter=true) const FL_NO_EXCEPT
Get estimated power consumption in milliwatts.
void setHdFieldFloor(fl::u8 min_field) FL_NO_EXCEPT
Lowest 5-bit current field the colour-managed APA102-HD path may use (B1's flicker floor,...
fl::size getDriverCount() const FL_NO_EXCEPT
Get count of registered channel drivers.
::CLEDController & addLeds(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0) FL_NO_EXCEPT
Add a 3rd party library based CLEDController instance to the world.
::CLEDController & addLeds(CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a OCTOWS2811 library based CLEDController instance to the world.
PowerModelRGB getPowerModel() const FL_NO_EXCEPT
Get current RGB power model.
void removeListener(fl::EngineEvents::Listener *listener) FL_NO_EXCEPT
static void enableAllDrivers() FL_NO_EXCEPT
Enroll every channel driver available on this platform with ChannelManager.
fl::u16 mMaxRefreshHz
frame-rate cap in Hz, 0 = unlimited (u16 saves 2 B over micros, #4788)
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,...
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.
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) FL_NO_EXCEPT
Determines the highest brightness level you can use and still stay under the specified power budget f...
void set_power_scaling_exponent(float exponent) FL_NO_EXCEPT
Set a non-linear brightness-to-power response exponent.
PowerModelRGB get_power_model() FL_NO_EXCEPT
Get current RGB power model.
void set_power_model(const PowerModelRGB &model) FL_NO_EXCEPT
Set custom RGB LED power consumption model.
float get_power_scaling_exponent() FL_NO_EXCEPT
Get the current brightness-to-power response exponent.
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
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() FL_NO_EXCEPT
Get the global ChannelManager singleton instance.
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.
#define FL_STATIC_ASSERT(...)
Shared "slim bridge" legacy addLeds<ESPIChipsets ...>() controller for the SPI channel API – driver-a...
SPI LED chipset enumeration.
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).
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.