4#ifndef __INC_FASTSPI_LED2_H
5#define __INC_FASTSPI_LED2_H
11#include "platforms/is_platform.h"
17#if defined(ARDUINO) && !defined(FL_IS_ESP32)
24#if defined(FL_IS_GCC) || defined(FL_IS_CLANG)
25#define FASTLED_HAS_PRAGMA_MESSAGE
33#define FASTLED_VERSION 3010009
34#ifndef FASTLED_INTERNAL
35# ifdef FASTLED_SHOW_VERSION
36# ifdef FASTLED_HAS_PRAGMA_MESSAGE
37# pragma message "FastLED version 3.010.009"
39# warning FastLED version 3.010.009 (Not really a warning, just telling you here.)
50#if defined(FASTLED_ESP32_I2S) && !defined(FASTLED_INTERNAL)
51#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>()."
66#if (defined(FL_IS_TEENSY_3X) || defined(FL_IS_TEENSY_LC)) && \
67 !defined(FASTLED_INTERNAL) && !defined(FL_TEENSY_EOL_SUPPRESS_WARNING)
68#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."
84#if defined(FL_IS_ESP32)
85#include "platforms/esp/esp_version.h"
86#include "platforms/esp/32/feature_flags/enabled.h"
87#include "platforms/esp/32/esp32_lazy_serial0_main.h"
88#if FASTLED_RMT5 == 0 && FASTLED_ESP32_HAS_RMT && ESP_IDF_VERSION_5_OR_HIGHER
89#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"
94#if !defined(FASTLED_FAKE_SPI_FORWARDS_TO_FAKE_CLOCKLESS)
95#if defined(FL_IS_WASM)
96#define FASTLED_FAKE_SPI_FORWARDS_TO_FAKE_CLOCKLESS 1
98#define FASTLED_FAKE_SPI_FORWARDS_TO_FAKE_CLOCKLESS 0
104#if !defined(FASTLED_HAS_CHANNELS)
105#if defined(FL_IS_ESP32) || defined(FL_IS_TEENSY_4X) || \
106 defined(FL_IS_RP) || defined(FL_IS_STM32) || \
107 defined(FL_IS_SAMD) || defined(FL_IS_NRF52)
108#define FASTLED_HAS_CHANNELS 1
110#define FASTLED_HAS_CHANNELS 0
118#if !defined(FASTLED_SPI_USES_CHANNEL_API)
119#if FASTLED_HAS_CHANNELS && (defined(FL_IS_ESP32) || defined(FL_IS_TEENSY_4X) || \
120 defined(FL_IS_RP2040) || defined(FL_IS_RP2350))
121#define FASTLED_SPI_USES_CHANNEL_API 1
123#define FASTLED_SPI_USES_CHANNEL_API 0
127#ifndef __PROG_TYPES_COMPAT__
131#define __PROG_TYPES_COMPAT__
135#include "platforms/wasm/js.h"
136#include "platforms/wasm/led_sysdefs_wasm.h"
137#include "platforms/wasm/compiler/Arduino.h"
138#include "platforms/wasm/js_fetch.h"
143#include <SmartMatrix.h>
149#include <DmxSimple.h>
155#include <DMXSerial.h>
161#include <OctoWS2811.h>
238#include "platforms/default_pins.h"
244#include "platforms/ldf_headers.h"
254#if !defined(FL_IS_TEENSY)
326template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
class PIXIE :
public PixieController<DATA_PIN, RGB_ORDER> {};
329#ifdef FL_CLOCKLESS_CONTROLLER_DEFINED
337template<fl::u8 DATA_PIN>
class NEOPIXEL :
public WS2812Controller800Khz<DATA_PIN, GRB> {};
341template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
342class SM16703 :
public SM16703Controller<DATA_PIN, RGB_ORDER> {};
346template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
347class SM16824E :
public SM16824EController<DATA_PIN, RGB_ORDER> {};
351template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
352class TM1829 :
public TM1829Controller800Khz<DATA_PIN, RGB_ORDER> {};
359template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
360class TX1813N1 :
public TM1829Controller800Khz<DATA_PIN, RGB_ORDER> {};
367template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
368class TM1812 :
public TM1809Controller800Khz<DATA_PIN, RGB_ORDER> {};
372template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
373class TM1809 :
public TM1809Controller800Khz<DATA_PIN, RGB_ORDER> {};
379template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
380class TM1908 :
public TM1908Controller<DATA_PIN, RGB_ORDER> {};
384template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
385class TM1804 :
public TM1809Controller800Khz<DATA_PIN, RGB_ORDER> {};
389template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
390class TM1803 :
public TM1803Controller400Khz<DATA_PIN, RGB_ORDER> {};
394template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
395class UCS1903 :
public UCS1903Controller400Khz<DATA_PIN, RGB_ORDER> {};
399template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
400class UCS1903B :
public UCS1903BController800Khz<DATA_PIN, RGB_ORDER> {};
404template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
405class UCS1904 :
public UCS1904Controller800Khz<DATA_PIN, RGB_ORDER> {};
409template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
410class UCS2903 :
public UCS2903Controller<DATA_PIN, RGB_ORDER> {};
414template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
415class UCS7604 :
public UCS7604Controller8bit<DATA_PIN, RGB_ORDER> {};
419template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
420class UCS7604HD :
public UCS7604Controller16bit<DATA_PIN, RGB_ORDER> {};
425template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
426class UCS7604HD_1600 :
public UCS7604Controller16bit1600<DATA_PIN, RGB_ORDER> {};
430template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
431class WS2812 :
public WS2812Controller800Khz<DATA_PIN, RGB_ORDER> {};
434template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
435class WS2815 :
public WS2815Controller<DATA_PIN, RGB_ORDER> {};
438template <fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
439class WS2816 :
public WS2816Controller<DATA_PIN, RGB_ORDER> {};
443template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
444class WS2852 :
public WS2812Controller800Khz<DATA_PIN, RGB_ORDER> {};
448template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
449class WS2812B :
public WS2812Controller800Khz<DATA_PIN, RGB_ORDER> {};
456template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
457class OSTW2020C1E :
public OSTW2020C1EController<DATA_PIN, RGB_ORDER> {};
461template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
462class WS2812BMiniV3 :
public WS2812BMiniV3Controller<DATA_PIN, RGB_ORDER> {};
466template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
467class WS2812BV5 :
public WS2812BV5Controller<DATA_PIN, RGB_ORDER> {};
475template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
476class GS1903 :
public GS1903Controller<DATA_PIN, RGB_ORDER> {};
480template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
481class SK6812 :
public SK6812Controller<DATA_PIN, RGB_ORDER> {};
487template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
488class LC8816E :
public LC8816EController<DATA_PIN, RGB_ORDER> {};
499template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
500class SK6812WWA :
public SK6812Controller<DATA_PIN, RGB_ORDER> {};
504template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
505class SK6822 :
public SK6822Controller<DATA_PIN, RGB_ORDER> {};
509template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
510class APA106 :
public SK6822Controller<DATA_PIN, RGB_ORDER> {};
514template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
515class PL9823 :
public PL9823Controller<DATA_PIN, RGB_ORDER> {};
519template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
520class WS2811 :
public WS2811Controller800Khz<DATA_PIN, RGB_ORDER> {};
524template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
525class WS2813 :
public WS2813Controller<DATA_PIN, RGB_ORDER> {};
532template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
533class WS2814 :
public WS2814Controller<DATA_PIN, RGB_ORDER> {};
540template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
541class WS2818 :
public WS2818Controller<DATA_PIN, RGB_ORDER> {};
545template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
546class APA104 :
public WS2811Controller800Khz<DATA_PIN, RGB_ORDER> {};
550template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
551class WS2811_400 :
public WS2811Controller400Khz<DATA_PIN, RGB_ORDER> {};
555template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
556class GE8822 :
public GE8822Controller800Khz<DATA_PIN, RGB_ORDER> {};
560template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
561class GW6205 :
public GW6205Controller800Khz<DATA_PIN, RGB_ORDER> {};
565template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
566class GW6205_400 :
public GW6205Controller400Khz<DATA_PIN, RGB_ORDER> {};
570template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
571class LPD1886 :
public LPD1886Controller1250Khz<DATA_PIN, RGB_ORDER> {};
575template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
576class LPD1886_8BIT :
public LPD1886Controller1250Khz_8bit<DATA_PIN, RGB_ORDER> {};
579template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
580class UCS1912 :
public UCS1912Controller<DATA_PIN, RGB_ORDER> {};
582#if defined(DmxSimple_h) || defined(FASTLED_DOXYGEN)
584template<fl::u8 DATA_PIN, fl::EOrder RGB_ORDER>
class DMXSIMPLE :
public DMXSimpleController<DATA_PIN, RGB_ORDER> {};
586#if defined(DmxSerial_h) || defined(FASTLED_DOXYGEN)
597#ifdef PORTA_FIRST_PIN
604#ifdef PORTB_FIRST_PIN
611#ifdef PORTC_FIRST_PIN
618#ifdef PORTD_FIRST_PIN
673 return static_cast<ClearFlags>(
static_cast<fl::u32
>(a) |
static_cast<fl::u32
>(b));
678 return static_cast<ClearFlags>(
static_cast<fl::u32
>(a) &
static_cast<fl::u32
>(b));
712#define FL_DITHER_ENABLE_MIN_REFRESH_HZ 100
844 template<
fl::ProfileId Profile>
846 fl::ChannelPtr channel = fl::Channel::create<Profile>(config);
847 if (channel !=
nullptr)
add(channel);
1075 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN>
1083 #define _FL_MAP_CLOCKED_CHIPSET(CHIPSET_ENUM, CONTROLLER_CLASS) \
1084 template<fl::u8 DATA_PIN, fl::u8 CLOCK_PIN> \
1085 struct ClockedChipsetHelper<CHIPSET_ENUM, DATA_PIN, CLOCK_PIN> { \
1086 static const bool IS_VALID = true; \
1087 typedef CONTROLLER_CLASS<DATA_PIN, CLOCK_PIN> ControllerType; \
1089 template<fl::EOrder RGB_ORDER> \
1090 struct CONTROLLER_CLASS_WITH_ORDER { \
1091 typedef CONTROLLER_CLASS<DATA_PIN, CLOCK_PIN, RGB_ORDER> ControllerType; \
1094 template<fl::EOrder RGB_ORDER, fl::u32 FREQ> \
1095 struct CONTROLLER_CLASS_WITH_ORDER_AND_FREQ { \
1096 typedef CONTROLLER_CLASS<DATA_PIN, CLOCK_PIN, RGB_ORDER, FREQ> ControllerType; \
1127 #if FASTLED_FAKE_SPI_FORWARDS_TO_FAKE_CLOCKLESS
1131 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) {
1138 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) {
1145 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO>
1178 return addLeds(&sCtrl, data, nLedsOrOffset, nLedsIfOffset);
1189 static bool sRegistered =
false;
1194 return addLeds(&sCtrl, data, nLedsOrOffset, nLedsIfOffset);
1200#if defined(FL_IS_ESP32)
1202 fl::platforms::registerNativeSpiDriver();
1214 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>
1220 return addLedsSpiDispatch<CHIPSET, DATA_PIN, CLOCK_PIN, SPI_DATA_RATE, 0, RGB_ORDER, B, B_WHICH>(data, nLedsOrOffset, nLedsIfOffset, spiCfg, UseSlim());
1224 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>
1231 return addLedsSpiDispatch<CHIPSET, DATA_PIN, CLOCK_PIN, SPI_DATA_RATE, 1, RGB_ORDER, B, B_WHICH>(data, nLeds, 0, spiCfg, UseSlim());
1235 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::Bus B = fl::Bus::AUTO, fl::u8 B_WHICH = 0>
1245 return addLedsSpiDispatch<CHIPSET, DATA_PIN, CLOCK_PIN, 0, 2, order, B, B_WHICH>(data, nLedsOrOffset, nLedsIfOffset, spiCfg, UseSlim());
1249 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>
1255 return addLedsSpiDispatch<CHIPSET, DATA_PIN, CLOCK_PIN, 0, 3, RGB_ORDER, B, B_WHICH>(data, nLedsOrOffset, nLedsIfOffset, spiCfg, UseSlim());
1258 #if FASTLED_FAKE_SPI_FORWARDS_TO_FAKE_CLOCKLESS
1260 #elif FASTLED_SPI_USES_CHANNEL_API
1263 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>
1269 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>
1275 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::Bus B = fl::Bus::AUTO, fl::u8 B_WHICH = 0>
1276 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1281 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>
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>
::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0)
FL_NO_EXCEPT {
1294 typedef typename CHIP::template CONTROLLER_CLASS_WITH_ORDER_AND_FREQ<RGB_ORDER, SPI_DATA_RATE>::ControllerType ControllerTypeWithFreq;
1295 static ControllerTypeWithFreq c;
1296 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
1301 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>
1306 typedef typename CHIP::template CONTROLLER_CLASS_WITH_ORDER_AND_FREQ<RGB_ORDER, SPI_DATA_RATE>::ControllerType ControllerTypeWithFreq;
1307 static ControllerTypeWithFreq c;
1308 c.setSpiBus(spiBus);
1309 return addLeds(&c, data, nLeds, 0);
1313 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 {
1317 typedef typename CHIP::ControllerType ControllerType;
1318 static ControllerType c;
1319 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
1323 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO>
1328 typedef typename CHIP::template CONTROLLER_CLASS_WITH_ORDER<RGB_ORDER>::ControllerType ControllerTypeWithOrder;
1329 static ControllerTypeWithOrder c;
1330 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
1336 template<ESPIChipsets CHIPSET, fl::Bus B = fl::Bus::AUTO> static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1340 template<ESPIChipsets CHIPSET, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO> static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1344 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) {
1351#ifdef FL_CLOCKLESS_CONTROLLER_DEFINED
1355 template<
typename ControllerType>
1356 static inline ::CLEDController& addLedsImpl(ControllerType*
controller,
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset)
FL_NO_EXCEPT {
1358 return addLeds(pLed, data, nLedsOrOffset, nLedsIfOffset);
1386 return addLedsImpl(&c, data, nLedsOrOffset, nLedsIfOffset);
1394 return addLedsImpl(&c, data, nLedsOrOffset, nLedsIfOffset);
1402 return addLedsImpl(&c, data, nLedsOrOffset, nLedsIfOffset);
1411#if defined(__FASTLED_HAS_FIBCC) && (__FASTLED_HAS_FIBCC == 1)
1413 static ::CLEDController &
addLeds(
CRGB *data,
int nLeds) {
1415 static fl::__FIBCC<CHIPSET, DATA_PIN, NUM_LANES, RGB_ORDER> c;
1416 return addLeds(&c, data, nLeds);
1420 #ifdef FASTSPI_USE_DMX_SIMPLE
1421 template<EClocklessChipsets CHIPSET, fl::u8 DATA_PIN, fl::EOrder RGB_ORDER=RGB, fl::Bus B = fl::Bus::AUTO>
1422 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0)
1459 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
1467 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
1470#ifdef USE_OCTOWS2811
1474 template<OWS2811 CHIPSET, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO>
1475 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0)
1490 template<OWS2811 CHIPSET, fl::Bus B = fl::Bus::AUTO>
1491 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0)
1498#ifdef USE_WS2812SERIAL
1502 template<SWS2812 CHIPSET,
int DATA_PIN, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO>
1503 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0)
1506 static CWS2812SerialController<DATA_PIN,RGB_ORDER>
controller;
1514 template<ESM CHIPSET, fl::Bus B = fl::Bus::AUTO>
1515 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0)
1526#ifdef FASTLED_HAS_BLOCKLESS
1550 template<EBlockChipsets CHIPSET,
int NUM_LANES, fl::EOrder RGB_ORDER, fl::Bus B = fl::Bus::AUTO>
1551 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1554 #ifdef PORTA_FIRST_PIN
1555 case WS2811_PORTA:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, fl::TIMING_WS2811_800KHZ_LEGACY, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1556 case WS2811_400_PORTA:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, fl::TIMING_WS2811_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1557 case WS2813_PORTA:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, fl::TIMING_WS2813, RGB_ORDER, 0, false>(), data, nLedsOrOffset, nLedsIfOffset);
1558 case TM1803_PORTA:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, fl::TIMING_TM1803_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1559 case UCS1903_PORTA:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, fl::TIMING_UCS1903_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1561 #ifdef PORTB_FIRST_PIN
1562 case WS2811_PORTB:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, fl::TIMING_WS2811_800KHZ_LEGACY, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1563 case WS2811_400_PORTB:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, fl::TIMING_WS2811_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1564 case WS2813_PORTB:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, fl::TIMING_WS2813, RGB_ORDER, 0, false>(), data, nLedsOrOffset, nLedsIfOffset);
1565 case TM1803_PORTB:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, fl::TIMING_TM1803_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1566 case UCS1903_PORTB:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, fl::TIMING_UCS1903_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1568 #ifdef PORTC_FIRST_PIN
1569 case WS2811_PORTC:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, fl::TIMING_WS2811_800KHZ_LEGACY, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1570 case WS2811_400_PORTC:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, fl::TIMING_WS2811_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1571 case WS2813_PORTC:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, fl::TIMING_WS2813, RGB_ORDER, 0, false>(), data, nLedsOrOffset, nLedsIfOffset);
1572 case TM1803_PORTC:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, fl::TIMING_TM1803_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1573 case UCS1903_PORTC:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, fl::TIMING_UCS1903_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1575 #ifdef PORTD_FIRST_PIN
1576 case WS2811_PORTD:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, fl::TIMING_WS2811_800KHZ_LEGACY, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1577 case WS2811_400_PORTD:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, fl::TIMING_WS2811_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1578 case WS2813_PORTD:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, fl::TIMING_WS2813, RGB_ORDER, 0, false>(), data, nLedsOrOffset, nLedsIfOffset);
1579 case TM1803_PORTD:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, fl::TIMING_TM1803_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1580 case UCS1903_PORTD:
return addLeds(
new fl::InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, fl::TIMING_UCS1903_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1583 case WS2811_PORTDC:
return addLeds(
new fl::SixteenWayInlineBlockClocklessController<NUM_LANES, fl::TIMING_WS2811_800KHZ_LEGACY, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1584 case WS2811_400_PORTDC:
return addLeds(
new fl::SixteenWayInlineBlockClocklessController<NUM_LANES, fl::TIMING_WS2811_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1585 case WS2813_PORTDC:
return addLeds(
new fl::SixteenWayInlineBlockClocklessController<NUM_LANES, fl::TIMING_WS2813, RGB_ORDER, 0, false>(), data, nLedsOrOffset, nLedsIfOffset);
1586 case TM1803_PORTDC:
return addLeds(
new fl::SixteenWayInlineBlockClocklessController<NUM_LANES, fl::TIMING_TM1803_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1587 case UCS1903_PORTDC:
return addLeds(
new fl::SixteenWayInlineBlockClocklessController<NUM_LANES, fl::TIMING_UCS1903_400KHZ, RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
1593 template<EBlockChipsets CHIPSET,
int NUM_LANES, fl::Bus B = fl::Bus::AUTO>
1594 static ::CLEDController &
addLeds(
CRGB *data,
int nLedsOrOffset,
int nLedsIfOffset = 0) {
1644 template<fl::Bus B, fl::u8 Which = 0>
1700#if FL_COLOR_PIPELINE_SHARED
1701 fl::activeFramePowerDispatch() = fl::framePowerDispatch();
1702 mPPowerFunc = fl::activeFramePowerDispatch()->showBrightness;
2024#define FastSPI_LED FastLED
2026#define FastSPI_LED2 FastLED
2038#ifndef HAS_HARDWARE_PIN_SUPPORT
2039#warning "No pin/port mappings found, pin access will be slightly slower. See fastpin.h for info."
2040#define NO_HARDWARE_PIN_SUPPORT
2049#if !defined(FASTLED_INTERNAL) && !defined(FASTLED_LEAN_AND_MEAN)
2065#if defined(FL_INCLUDE_REMOTE)
2107#if defined(FASTLED_STUB_IMPL)
2119#define FASTLED_TITLE(text) fl::UITitle g_title(text)
2120#define FASTLED_DESCRIPTION(text) fl::UIDescription g_description(text)
2121#define FASTLED_HELP(text) fl::UIHelp g_help(text)
2152#ifndef FASTLED_LOOP_RUNS_ASYNC
2153#define FASTLED_LOOP_RUNS_ASYNC 0
2156#if FASTLED_LOOP_RUNS_ASYNC == 1
2161 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 void registerExplicitSpiHost(const fl::SpiChipsetConfig &spiCfg, fl::true_type) FL_NO_EXCEPT
static void registerExplicitSpiHost(const fl::SpiChipsetConfig &spiCfg, fl::false_type) FL_NO_EXCEPT
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.