FastLED 3.9.15
Loading...
Searching...
No Matches
FastLED.h
Go to the documentation of this file.
1#pragma once
2#ifndef __INC_FASTSPI_LED2_H
3#define __INC_FASTSPI_LED2_H
4
5#include "fl/stdint.h"
6#include "fl/dll.h" // Will optionally compile in.
7
10
11#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
12#define FASTLED_HAS_PRAGMA_MESSAGE
13#endif
14
20#define FASTLED_VERSION 3010002
21#ifndef FASTLED_INTERNAL
22# ifdef FASTLED_SHOW_VERSION
23# ifdef FASTLED_HAS_PRAGMA_MESSAGE
24# pragma message "FastLED version 3.010.002"
25# else
26# warning FastLED version 3.010.002 (Not really a warning, just telling you here.)
27# endif
28# endif
29#endif
30
31
32#if !defined(FASTLED_FAKE_SPI_FORWARDS_TO_FAKE_CLOCKLESS)
33#if defined(__EMSCRIPTEN__)
34#define FASTLED_FAKE_SPI_FORWARDS_TO_FAKE_CLOCKLESS 1
35#else
36#define FASTLED_FAKE_SPI_FORWARDS_TO_FAKE_CLOCKLESS 0
37#endif
38#endif
39
40#ifndef __PROG_TYPES_COMPAT__
44#define __PROG_TYPES_COMPAT__
45#endif
46
47#ifdef __EMSCRIPTEN__
48#include "platforms/wasm/js.h"
49#include "platforms/wasm/led_sysdefs_wasm.h"
50#include "platforms/wasm/compiler/Arduino.h"
51#include "platforms/wasm/js_fetch.h"
52#endif
53
54#ifdef SmartMatrix_h
55#include <SmartMatrix.h>
56#endif
57
58#ifdef DmxSimple_h
59#include <DmxSimple.h>
60#endif
61
62#ifdef DmxSerial_h
63#include <DMXSerial.h>
64#endif
65
66#ifdef USE_OCTOWS2811
67#include <OctoWS2811.h>
68#endif
69
70
71
72#include "fl/force_inline.h"
73#include "cpp_compat.h"
74
75#include "fastled_config.h"
76#include "led_sysdefs.h"
77
78// Utility functions
79#include "fastled_delay.h"
80#include "bitswap.h"
81
82#include "controller.h"
83#include "fastpin.h"
84#include "fastspi_types.h"
85#include "dmx.h"
86
87#include "platforms.h"
88#include "fastled_progmem.h"
89
90#include "lib8tion.h"
91#include "pixeltypes.h"
92#include "hsv2rgb.h"
93#include "colorutils.h"
94#include "pixelset.h"
95#include "colorpalettes.h"
96
97#include "noise.h"
98#include "power_mgt.h"
99
100#include "fastspi.h"
101#include "chipsets.h"
102#include "fl/engine_events.h"
103
104#include "fl/leds.h"
105#include "fl/int.h"
106
108
109// Backdoor to get the size of the CLedController object. The one place
110// that includes this just uses extern to declare the function.
111fl::u16 cled_contoller_size();
112
131
135
140
145
146#ifdef HAS_PIXIE
147template<fl::u8 DATA_PIN, EOrder RGB_ORDER> class PIXIE : public PixieController<DATA_PIN, RGB_ORDER> {};
148#endif
149
150#ifdef FASTLED_HAS_CLOCKLESS
155
158template<fl::u8 DATA_PIN> class NEOPIXEL : public WS2812Controller800Khz<DATA_PIN, GRB> {};
159
162template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
163class SM16703 : public SM16703Controller<DATA_PIN, RGB_ORDER> {};
164
167template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
168class SM16824E : public SM16824EController<DATA_PIN, RGB_ORDER> {};
169
172template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
173class TM1829 : public TM1829Controller800Khz<DATA_PIN, RGB_ORDER> {};
174
177template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
178class TM1812 : public TM1809Controller800Khz<DATA_PIN, RGB_ORDER> {};
179
182template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
183class TM1809 : public TM1809Controller800Khz<DATA_PIN, RGB_ORDER> {};
184
187template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
188class TM1804 : public TM1809Controller800Khz<DATA_PIN, RGB_ORDER> {};
189
192template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
193class TM1803 : public TM1803Controller400Khz<DATA_PIN, RGB_ORDER> {};
194
197template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
198class UCS1903 : public UCS1903Controller400Khz<DATA_PIN, RGB_ORDER> {};
199
202template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
203class UCS1903B : public UCS1903BController800Khz<DATA_PIN, RGB_ORDER> {};
204
207template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
208class UCS1904 : public UCS1904Controller800Khz<DATA_PIN, RGB_ORDER> {};
209
212template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
213class UCS2903 : public UCS2903Controller<DATA_PIN, RGB_ORDER> {};
214
217template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
218class WS2812 : public WS2812Controller800Khz<DATA_PIN, RGB_ORDER> {};
219
221template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
222class WS2815 : public WS2815Controller<DATA_PIN, RGB_ORDER> {};
223
225template <fl::u8 DATA_PIN, EOrder RGB_ORDER>
226class WS2816 : public WS2816Controller<DATA_PIN, RGB_ORDER> {};
227
230template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
231class WS2852 : public WS2812Controller800Khz<DATA_PIN, RGB_ORDER> {};
232
235template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
236class WS2812B : public WS2812Controller800Khz<DATA_PIN, RGB_ORDER> {};
237
240template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
241class GS1903 : public WS2812Controller800Khz<DATA_PIN, RGB_ORDER> {};
242
245template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
246class SK6812 : public SK6812Controller<DATA_PIN, RGB_ORDER> {};
247
250template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
251class SK6822 : public SK6822Controller<DATA_PIN, RGB_ORDER> {};
252
255template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
256class APA106 : public SK6822Controller<DATA_PIN, RGB_ORDER> {};
257
260template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
261class PL9823 : public PL9823Controller<DATA_PIN, RGB_ORDER> {};
262
265template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
266class WS2811 : public WS2811Controller800Khz<DATA_PIN, RGB_ORDER> {};
267
270template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
271class WS2813 : public WS2813Controller<DATA_PIN, RGB_ORDER> {};
272
275template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
276class APA104 : public WS2811Controller800Khz<DATA_PIN, RGB_ORDER> {};
277
280template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
281class WS2811_400 : public WS2811Controller400Khz<DATA_PIN, RGB_ORDER> {};
282
285template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
286class GE8822 : public GE8822Controller800Khz<DATA_PIN, RGB_ORDER> {};
287
290template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
291class GW6205 : public GW6205Controller800Khz<DATA_PIN, RGB_ORDER> {};
292
295template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
296class GW6205_400 : public GW6205Controller400Khz<DATA_PIN, RGB_ORDER> {};
297
300template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
301class LPD1886 : public LPD1886Controller1250Khz<DATA_PIN, RGB_ORDER> {};
302
305template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
306class LPD1886_8BIT : public LPD1886Controller1250Khz_8bit<DATA_PIN, RGB_ORDER> {};
307
309template<fl::u8 DATA_PIN, EOrder RGB_ORDER>
310class UCS1912 : public UCS1912Controller<DATA_PIN, RGB_ORDER> {};
311
312#if defined(DmxSimple_h) || defined(FASTLED_DOXYGEN)
314template<fl::u8 DATA_PIN, EOrder RGB_ORDER> class DMXSIMPLE : public DMXSimpleController<DATA_PIN, RGB_ORDER> {};
315#endif
316#if defined(DmxSerial_h) || defined(FASTLED_DOXYGEN)
318template<EOrder RGB_ORDER> class DMXSERIAL : public DMXSerialController<RGB_ORDER> {};
319#endif
320#endif
323
324
327#ifdef PORTA_FIRST_PIN
328 WS2811_PORTA,
329 WS2813_PORTA,
330 WS2811_400_PORTA,
331 TM1803_PORTA,
332 UCS1903_PORTA,
333#endif
334#ifdef PORTB_FIRST_PIN
335 WS2811_PORTB,
336 WS2813_PORTB,
337 WS2811_400_PORTB,
338 TM1803_PORTB,
339 UCS1903_PORTB,
340#endif
341#ifdef PORTC_FIRST_PIN
342 WS2811_PORTC,
343 WS2813_PORTC,
344 WS2811_400_PORTC,
345 TM1803_PORTC,
346 UCS1903_PORTC,
347#endif
348#ifdef PORTD_FIRST_PIN
349 WS2811_PORTD,
350 WS2813_PORTD,
351 WS2811_400_PORTD,
352 TM1803_PORTD,
353 UCS1903_PORTD,
354#endif
355#ifdef HAS_PORTDC
356 WS2811_PORTDC,
357 WS2813_PORTDC,
358 WS2811_400_PORTDC,
359 TM1803_PORTDC,
360 UCS1903_PORTDC,
361#endif
362};
363
370typedef fl::u8 (*power_func)(fl::u8 scale, fl::u32 data);
371
378class CFastLED {
379 // int m_nControllers;
381 fl::u16 m_nFPS;
382 fl::u32 m_nMinMicros;
383 fl::u32 m_nPowerData;
385
386public:
387 CFastLED();
388
389 // Useful when you want to know when an event like onFrameBegin or onFrameEnd is happening.
390 // This is disabled on AVR to save space.
393
398
402
406
408
420 static CLEDController &addLeds(CLEDController *pLed, struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0);
421
441
442
443 // Base template: Causes a compile-time error if an unsupported CHIPSET is used
444 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN>
446 // Default implementation, will be specialized for supported chipsets
447 static const bool IS_VALID = false;
448 };
449
450 // Macro to define a mapping from the ESPIChipeset enum to the controller class
451 // in it's various template configurations.
452 #define _FL_MAP_CLOCKED_CHIPSET(CHIPSET_ENUM, CONTROLLER_CLASS) \
453 template<fl::u8 DATA_PIN, fl::u8 CLOCK_PIN> \
454 struct ClockedChipsetHelper<CHIPSET_ENUM, DATA_PIN, CLOCK_PIN> { \
455 static const bool IS_VALID = true; \
456 typedef CONTROLLER_CLASS<DATA_PIN, CLOCK_PIN> ControllerType; \
457 /* Controller type with RGB_ORDER specified */ \
458 template<EOrder RGB_ORDER> \
459 struct CONTROLLER_CLASS_WITH_ORDER { \
460 typedef CONTROLLER_CLASS<DATA_PIN, CLOCK_PIN, RGB_ORDER> ControllerType; \
461 }; \
462 /* Controller type with RGB_ORDER and spi frequency specified */ \
463 template<EOrder RGB_ORDER, fl::u32 FREQ> \
464 struct CONTROLLER_CLASS_WITH_ORDER_AND_FREQ { \
465 typedef CONTROLLER_CLASS<DATA_PIN, CLOCK_PIN, RGB_ORDER, FREQ> ControllerType; \
466 }; \
467 };
468
469 // Define specializations for each supported CHIPSET
476
477 // Both DOTSTAR and APA102 use the same controller class
480
481 // Both DOTSTARHD and APA102HD use the same controller class
484
487
490
491
492 #if FASTLED_FAKE_SPI_FORWARDS_TO_FAKE_CLOCKLESS
496 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, EOrder RGB_ORDER, fl::u32 SPI_DATA_RATE > CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
497 // Instantiate the controller using ClockedChipsetHelper
498 // Always USE WS2812 clockless controller since it's the common path.
499 return addLeds<WS2812, DATA_PIN, RGB_ORDER>(data, nLedsOrOffset, nLedsIfOffset);
500 }
501
503 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN > static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
504 // Always USE WS2812 clockless controller since it's the common path.
505 return addLeds<WS2812, DATA_PIN>(data, nLedsOrOffset, nLedsIfOffset);
506 }
507
508
509 // The addLeds function using ChipsetHelper
510 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, EOrder RGB_ORDER>
511 CLEDController& addLeds(struct CRGB* data, int nLedsOrOffset, int nLedsIfOffset = 0) {
512 // Always USE WS2812 clockless controller since it's the common path.
513 return addLeds<WS2812, DATA_PIN, RGB_ORDER>(data, nLedsOrOffset, nLedsIfOffset);
514 }
515
516 #else
517
518
520 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, EOrder RGB_ORDER, fl::u32 SPI_DATA_RATE > CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
521 // Instantiate the controller using ClockedChipsetHelper
523 typedef typename CHIP::template CONTROLLER_CLASS_WITH_ORDER_AND_FREQ<RGB_ORDER, SPI_DATA_RATE>::ControllerType ControllerTypeWithFreq;
524 static_assert(CHIP::IS_VALID, "Unsupported chipset");
525 static ControllerTypeWithFreq c;
526 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
527 }
528
530 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN > static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
532 typedef typename CHIP::ControllerType ControllerType;
533 static_assert(CHIP::IS_VALID, "Unsupported chipset");
534 static ControllerType c;
535 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
536 }
537
538
539 // The addLeds function using ChipsetHelper
540 template<ESPIChipsets CHIPSET, fl::u8 DATA_PIN, fl::u8 CLOCK_PIN, EOrder RGB_ORDER>
541 CLEDController& addLeds(struct CRGB* data, int nLedsOrOffset, int nLedsIfOffset = 0) {
543 static_assert(CHIP::IS_VALID, "Unsupported chipset");
544 typedef typename CHIP::template CONTROLLER_CLASS_WITH_ORDER<RGB_ORDER>::ControllerType ControllerTypeWithOrder;
545 static ControllerTypeWithOrder c;
546 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
547 }
548 #endif
549
550
551#ifdef SPI_DATA
552 template<ESPIChipsets CHIPSET> static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
553 return addLeds<CHIPSET, SPI_DATA, SPI_CLOCK, RGB>(data, nLedsOrOffset, nLedsIfOffset);
554 }
555
556 template<ESPIChipsets CHIPSET, EOrder RGB_ORDER> static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
557 return addLeds<CHIPSET, SPI_DATA, SPI_CLOCK, RGB_ORDER>(data, nLedsOrOffset, nLedsIfOffset);
558 }
559
560 template<ESPIChipsets CHIPSET, EOrder RGB_ORDER, fl::u32 SPI_DATA_RATE> static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
561 return addLeds<CHIPSET, SPI_DATA, SPI_CLOCK, RGB_ORDER, SPI_DATA_RATE>(data, nLedsOrOffset, nLedsIfOffset);
562 }
563
564#endif
566
567#ifdef FASTLED_HAS_CLOCKLESS
588
590 template<template<fl::u8 DATA_PIN, EOrder RGB_ORDER> class CHIPSET, fl::u8 DATA_PIN, EOrder RGB_ORDER>
591 static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
593 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
594 }
595
597 template<template<fl::u8 DATA_PIN, EOrder RGB_ORDER> class CHIPSET, fl::u8 DATA_PIN>
598 static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
599 static CHIPSET<DATA_PIN, RGB> c;
600 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
601 }
602
604 template<template<fl::u8 DATA_PIN> class CHIPSET, fl::u8 DATA_PIN>
605 static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
606 static CHIPSET<DATA_PIN> c;
607 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
608 }
609
610 template<template<fl::u8 DATA_PIN> class CHIPSET, fl::u8 DATA_PIN>
611 static CLEDController &addLeds(class fl::Leds& leds, int nLedsOrOffset, int nLedsIfOffset = 0) {
612 CRGB* rgb = leds;
613 return addLeds<CHIPSET, DATA_PIN>(rgb, nLedsOrOffset, nLedsIfOffset);
614 }
615
616#if defined(__FASTLED_HAS_FIBCC) && (__FASTLED_HAS_FIBCC == 1)
617 template<fl::u8 NUM_LANES, template<fl::u8 DATA_PIN, EOrder RGB_ORDER> class CHIPSET, fl::u8 DATA_PIN, EOrder RGB_ORDER=RGB>
618 static CLEDController &addLeds(struct CRGB *data, int nLeds) {
619 static __FIBCC<CHIPSET, DATA_PIN, NUM_LANES, RGB_ORDER> c;
620 return addLeds(&c, data, nLeds);
621 }
622#endif
623
624 #ifdef FASTSPI_USE_DMX_SIMPLE
625 template<EClocklessChipsets CHIPSET, fl::u8 DATA_PIN, EOrder RGB_ORDER=RGB>
626 static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0)
627 {
628 switch(CHIPSET) {
629 case DMX: { static DMXController<DATA_PIN> controller; return addLeds(&controller, data, nLedsOrOffset, nLedsIfOffset); }
630 }
631 }
632 #endif
634#endif
635
656
658 template<template<EOrder RGB_ORDER> class CHIPSET, EOrder RGB_ORDER>
659 static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
660 static CHIPSET<RGB_ORDER> c;
661 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
662 }
663
665 template<template<EOrder RGB_ORDER> class CHIPSET>
666 static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
667 static CHIPSET<RGB> c;
668 return addLeds(&c, data, nLedsOrOffset, nLedsIfOffset);
669 }
670
671#ifdef USE_OCTOWS2811
675 template<OWS2811 CHIPSET, EOrder RGB_ORDER>
676 static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0)
677 {
678 switch(CHIPSET) {
679 case OCTOWS2811: { static COctoWS2811Controller<RGB_ORDER,WS2811_800kHz> controller; return addLeds(&controller, data, nLedsOrOffset, nLedsIfOffset); }
680 case OCTOWS2811_400: { static COctoWS2811Controller<RGB_ORDER,WS2811_400kHz> controller; return addLeds(&controller, data, nLedsOrOffset, nLedsIfOffset); }
681#ifdef WS2813_800kHz
682 case OCTOWS2813: { static COctoWS2811Controller<RGB_ORDER,WS2813_800kHz> controller; return addLeds(&controller, data, nLedsOrOffset, nLedsIfOffset); }
683#endif
684 }
685 }
686
690 template<OWS2811 CHIPSET>
691 static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0)
692 {
693 return addLeds<CHIPSET,GRB>(data,nLedsOrOffset,nLedsIfOffset);
694 }
695
696#endif
697
698#ifdef USE_WS2812SERIAL
702 template<SWS2812 CHIPSET, int DATA_PIN, EOrder RGB_ORDER>
703 static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0)
704 {
705 static CWS2812SerialController<DATA_PIN,RGB_ORDER> controller;
706 return addLeds(&controller, data, nLedsOrOffset, nLedsIfOffset);
707 }
708#endif
709
710#ifdef SmartMatrix_h
713 template<ESM CHIPSET>
714 static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0)
715 {
716 switch(CHIPSET) {
717 case SMART_MATRIX: { static CSmartMatrixController controller; return addLeds(&controller, data, nLedsOrOffset, nLedsIfOffset); }
718 }
719 }
720#endif
722
723
724#ifdef FASTLED_HAS_BLOCKLESS
725
746
748 template<EBlockChipsets CHIPSET, int NUM_LANES, EOrder RGB_ORDER>
749 static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
750 switch(CHIPSET) {
751 #ifdef PORTA_FIRST_PIN
752 case WS2811_PORTA: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, NS(320), NS(320), NS(640), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
753 case WS2811_400_PORTA: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, NS(800), NS(800), NS(900), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
754 case WS2813_PORTA: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, NS(320), NS(320), NS(640), RGB_ORDER, 0, false, 300>(), data, nLedsOrOffset, nLedsIfOffset);
755 case TM1803_PORTA: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, NS(700), NS(1100), NS(700), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
756 case UCS1903_PORTA: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTA_FIRST_PIN, NS(500), NS(1500), NS(500), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
757 #endif
758 #ifdef PORTB_FIRST_PIN
759 case WS2811_PORTB: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, NS(320), NS(320), NS(640), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
760 case WS2811_400_PORTB: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, NS(800), NS(800), NS(900), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
761 case WS2813_PORTB: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, NS(320), NS(320), NS(640), RGB_ORDER, 0, false, 300>(), data, nLedsOrOffset, nLedsIfOffset);
762 case TM1803_PORTB: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, NS(700), NS(1100), NS(700), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
763 case UCS1903_PORTB: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTB_FIRST_PIN, NS(500), NS(1500), NS(500), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
764 #endif
765 #ifdef PORTC_FIRST_PIN
766 case WS2811_PORTC: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, NS(320), NS(320), NS(640), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
767 case WS2811_400_PORTC: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, NS(800), NS(800), NS(900), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
768 case WS2813_PORTC: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, NS(320), NS(320), NS(640), RGB_ORDER, 0, false, 300>(), data, nLedsOrOffset, nLedsIfOffset);
769 case TM1803_PORTC: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, NS(700), NS(1100), NS(700), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
770 case UCS1903_PORTC: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTC_FIRST_PIN, NS(500), NS(1500), NS(500), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
771 #endif
772 #ifdef PORTD_FIRST_PIN
773 case WS2811_PORTD: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, NS(320), NS(320), NS(640), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
774 case WS2811_400_PORTD: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, NS(800), NS(800), NS(900), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
775 case WS2813_PORTD: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, NS(320), NS(320), NS(640), RGB_ORDER, 0, false, 300>(), data, nLedsOrOffset, nLedsIfOffset);
776 case TM1803_PORTD: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, NS(700), NS(1100), NS(700), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
777 case UCS1903_PORTD: return addLeds(new InlineBlockClocklessController<NUM_LANES, PORTD_FIRST_PIN, NS(500), NS(1500), NS(500), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
778 #endif
779 #ifdef HAS_PORTDC
780 case WS2811_PORTDC: return addLeds(new SixteenWayInlineBlockClocklessController<NUM_LANES,NS(320), NS(320), NS(640), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
781 case WS2811_400_PORTDC: return addLeds(new SixteenWayInlineBlockClocklessController<NUM_LANES,NS(800), NS(800), NS(900), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
782 case WS2813_PORTDC: return addLeds(new SixteenWayInlineBlockClocklessController<NUM_LANES, NS(320), NS(320), NS(640), RGB_ORDER, 0, false, 300>(), data, nLedsOrOffset, nLedsIfOffset);
783 case TM1803_PORTDC: return addLeds(new SixteenWayInlineBlockClocklessController<NUM_LANES, NS(700), NS(1100), NS(700), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
784 case UCS1903_PORTDC: return addLeds(new SixteenWayInlineBlockClocklessController<NUM_LANES, NS(500), NS(1500), NS(500), RGB_ORDER>(), data, nLedsOrOffset, nLedsIfOffset);
785 #endif
786 }
787 }
788
790 template<EBlockChipsets CHIPSET, int NUM_LANES>
791 static CLEDController &addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset = 0) {
792 return addLeds<CHIPSET,NUM_LANES,GRB>(data,nLedsOrOffset,nLedsIfOffset);
793 }
794
795#endif
796
800
804
808 inline void setMaxPowerInVoltsAndMilliamps(fl::u8 volts, fl::u32 milliamps) { setMaxPowerInMilliWatts(volts * milliamps); }
809
812 inline void setMaxPowerInMilliWatts(fl::u32 milliwatts) { m_pPowerFunc = static_cast<power_func>(&calculate_max_brightness_for_power_mW); m_nPowerData = milliwatts; }
813
817
819 void show() { show(m_Scale); }
820
821 // Called automatically at the end of show().
822 void onEndFrame();
823
827 void clear(bool writeData = false);
828
830 void clearData();
831
835 void showColor(const struct CRGB & color, fl::u8 scale);
836
839 void showColor(const struct CRGB & color) { showColor(color, m_Scale); }
840
845 void delay(unsigned long ms);
846
850 void setTemperature(const struct CRGB & temp);
851
855 void setCorrection(const struct CRGB & correction);
856
860 void setDither(fl::u8 ditherMode = BINARY_DITHER);
861
869 void setMaxRefreshRate(fl::u16 refresh, bool constrain=false);
870
875 void countFPS(int nFrames=25);
876
879 fl::u16 getFPS() { return m_nFPS; }
880
883 int count();
884
888
891 int size();
892
895 CRGB *leds();
896};
897
898
900extern CFastLED FastLED;
901
905#ifndef HAS_HARDWARE_PIN_SUPPORT
906#warning "No pin/port mappings found, pin access will be slightly slower. See fastpin.h for info."
907#define NO_HARDWARE_PIN_SUPPORT
908#endif
909
910
912
913#endif
914
915
917
918#if !defined(FASTLED_INTERNAL) && !defined(FASTLED_LEAN_AND_MEAN)
919
920#include "fl/str.h" // Awesome Str class that has stack allocation and heap overflow, copy on write.
921#include "fl/xymap.h" // XYMap class for mapping 2D coordinates on seperintine matrices.
922
923#include "fl/clamp.h" // fl::clamp(value, min, max)
924#include "fl/map_range.h" // fl::map_range(value, in_min, in_max, out_min, out_max)
925
926#include "fl/warn.h" // FASTLED_WARN("time now: " << millis()), FASTLED_WARN_IF(condition, "time now: " << millis());"
927#include "fl/assert.h" // FASTLED_ASSERT(condition, "message");
928#include "fl/unused.h" // FASTLED_UNUSED(variable), for strict compiler settings.
929
930// provides:
931// fl::vector<T> - Standard heap vector
932// fl::vector_inlined<T,N> - Allocate on stack N elements, then overflow to heap vector.
933// fl::vector_fixed<T,N> - Stack allocated fixed size vector, elements will fail to add when full.
934#include "fl/vector.h"
935
936// Flexible callbacks in the style of std::function.
937#include "fl/function.h"
938
939// Clears the led data and other objects.
940// CRGB leds[NUM_LEDS];
941// fl::clear(leds)
942#include "fl/clear.h"
943
944// Leds has a CRGB block and an XYMap
945#include "fl/leds.h"
946
947#include "fl/ui.h" // Provides UIButton, UISlider, UICheckbox, UINumberField and UITitle, UIDescription, UIHelp, UIGroup.
948using fl::UITitle;
950using fl::UIHelp;
951using fl::UIButton; // These names are unique enough that we don't need to namespace them
952using fl::UICheckbox;
954using fl::UISlider;
955using fl::UIDropdown;
956using fl::UIGroup;
957using fl::XYMap;
958
959// Common fl:: type aliases for global namespace convenience
960template<typename T> using fl_vector = fl::vector<T>;
961template<typename Key, typename Value, typename Compare = fl::less<Key>> using fl_map = fl::fl_map<Key, Value, Compare>;
962using fl_string = fl::string;
963
964#define FASTLED_TITLE(text) fl::UITitle g_title(text)
965#define FASTLED_DESCRIPTION(text) fl::UIDescription g_description(text)
966#define FASTLED_HELP(text) fl::UIHelp g_help(text)
967
968
969#endif // FASTLED_INTERNAL && !FASTLED_LEAN_AND_MEAN
970
971
972// Auto namespace if necessary.
973#if defined(FASTLED_FORCE_USE_NAMESPACE) && FASTLED_FORCE_USE_NAMESPACE==1
974using namespace fl;
975#endif
976
977
978// Experimental: loop() hijacking.
979//
980// EngineEvents requires that FastLED.show() be invoked.
981// If the user skips that then certain updates will be skipped.
982//
983// Right now this isn't a big deal, but in the future it could be.
984//
985// Therefore this experiment is done so that this loop() hijack trick
986// can be used to insert code at the start of every loop(), such as a
987// scoped object that forces a begin and end frame event.
988//
989// It's possible to hijack the loop() via a macro so that
990// extra code can be injected at the start of every frame.
991// When FASTLED_LOOP_RUNS_ASYNC == 1
992// then use loop() to also run the async.
993//
994// EXAMPLE:
995// #define FASTLED_LOOP_RUNS_ASYNC 1
996// #include "FastLED.h"
997// void loop() {
998// FASTLED_WARN("async will run in the loop");
999// delay(500);
1000// }
1001
1002#ifndef FASTLED_LOOP_RUNS_ASYNC
1003#define FASTLED_LOOP_RUNS_ASYNC 0
1004#endif
1005
1006#if FASTLED_LOOP_RUNS_ASYNC == 1
1007#include "fl/async.h"
1008// The loop is set as a macro that re-defines the user loop function
1009// to sketch_loop()
1010#define loop() \
1011 sketch_loop(); \
1012 void loop() { sketch_loop(); fl::async_run(); } \
1013 void sketch_loop()
1014#endif
1015
1016
1017#include "fl/sketch_macros.h"
#define DATA_PIN
int x
Definition simple.h:92
#define CHIPSET
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
Definition FastLED.cpp:74
#define _FL_MAP_CLOCKED_CHIPSET(CHIPSET_ENUM, CONTROLLER_CLASS)
Definition FastLED.h:452
SWS2812
WS2812Serial Library controller type.
Definition FastLED.h:144
@ WS2812SERIAL
Definition FastLED.h:144
OWS2811
Octo WS2811 LED Library controller types.
Definition FastLED.h:139
@ OCTOWS2811
Definition FastLED.h:139
@ OCTOWS2813
Definition FastLED.h:139
@ OCTOWS2811_400
Definition FastLED.h:139
FASTLED_NAMESPACE_BEGIN fl::u16 cled_contoller_size()
Definition FastLED.cpp:61
ESPIChipsets
LED chipsets with SPI interface.
Definition FastLED.h:114
@ APA102HD
APA102 LED chipset with 5-bit gamma correction.
Definition FastLED.h:126
@ P9813
P9813 LED chipset.
Definition FastLED.h:120
@ SK9822HD
SK9822 LED chipset with 5-bit gamma correction.
Definition FastLED.h:123
@ SK9822
SK9822 LED chipset.
Definition FastLED.h:122
@ WS2803
WS2803 LED chipset.
Definition FastLED.h:118
@ HD107
Definition FastLED.h:127
@ WS2801
WS2801 LED chipset.
Definition FastLED.h:117
@ DOTSTAR
APA102 LED chipset alias.
Definition FastLED.h:124
@ APA102
APA102 LED chipset.
Definition FastLED.h:121
@ LPD8806
LPD8806 LED chipset.
Definition FastLED.h:116
@ HD107HD
Same as APA102, but in turbo 40-mhz mode.
Definition FastLED.h:128
@ LPD6803
LPD6803 LED chipset.
Definition FastLED.h:115
@ DOTSTARHD
APA102HD LED chipset alias.
Definition FastLED.h:125
@ SM16716
SM16716 LED chipset.
Definition FastLED.h:119
ESM
Smart Matrix Library controller type.
Definition FastLED.h:134
@ SMART_MATRIX
Definition FastLED.h:134
EBlockChipsets
Blockless output port enum.
Definition FastLED.h:326
fl::u8(* power_func)(fl::u8 scale, fl::u32 data)
Typedef for a power consumption calculation function.
Definition FastLED.h:370
CLEDController * controller
uint16_t scale
Definition Noise.ino:74
Functions for doing a rotation of bits/bytes used by parallel output.
Contains the bulk of the definitions for the various LED chipsets supported.
APA102 high definition controller class.
Definition chipsets.h:570
APA102 controller class.
Definition chipsets.h:399
APA104 controller class.
Definition FastLED.h:276
APA106 controller class.
Definition FastLED.h:256
_FL_MAP_CLOCKED_CHIPSET(LPD6803, LPD6803Controller) _FL_MAP_CLOCKED_CHIPSET(LPD8806
void onEndFrame()
Definition FastLED.cpp:183
int size()
Get the number of leds in the first controller.
Definition FastLED.cpp:102
void setMaxPowerInVoltsAndMilliamps(fl::u8 volts, fl::u32 milliamps)
Set the maximum power to be used, given in volts and milliamps.
Definition FastLED.h:808
CRGB * leds()
Get a pointer to led data for the first controller.
Definition FastLED.cpp:106
CLEDController & addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Definition FastLED.h:541
void onEndShowLeds()
Manually trigger the end show LEDs event.
Definition FastLED.h:405
void setTemperature(const struct CRGB &temp)
Set a global color temperature.
Definition FastLED.cpp:281
void setMaxRefreshRate(fl::u16 refresh, bool constrain=false)
Set the maximum refresh rate.
Definition FastLED.cpp:372
static CLEDController & addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add an SPI based CLEDController instance to the world.
Definition FastLED.h:530
void show(fl::u8 scale)
Update all our controllers with the current led colors, using the passed in brightness.
void show()
Update all our controllers with the current led colors.
Definition FastLED.h:819
fl::u8 getBrightness()
Get the current global brightness setting.
Definition FastLED.h:803
void onBeginFrame()
Manually trigger the begin frame event.
Definition FastLED.h:401
void showColor(const struct CRGB &color, fl::u8 scale)
Set all leds on all controllers to the given color/scale.
power_func m_pPowerFunc
function for overriding brightness when using FastLED.show();
Definition FastLED.h:384
void removeListener(fl::EngineEvents::Listener *listener)
Definition FastLED.h:392
void showColor(const struct CRGB &color)
Set all leds on all controllers to the given color.
Definition FastLED.h:839
fl::u32 m_nPowerData
max power use parameter
Definition FastLED.h:383
void countFPS(int nFrames=25)
For debugging, this will keep track of time between calls to countFPS().
Definition FastLED.cpp:356
CLEDController & operator[](int x)
Get a reference to a registered controller.
Definition FastLED.cpp:197
void setMaxPowerInMilliWatts(fl::u32 milliwatts)
Set the maximum power to be used, given in milliwatts.
Definition FastLED.h:812
fl::u8 m_Scale
the current global brightness scale setting
Definition FastLED.h:380
void delay(unsigned long ms)
Delay for the given number of milliseconds.
Definition FastLED.cpp:267
LPD8806Controller WS2803Controller P9813Controller APA102Controller APA102ControllerHD APA102ControllerHD SK9822ControllerHD CLEDController & addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add an SPI based CLEDController instance to the world.
Definition FastLED.h:520
fl::u32 m_nMinMicros
minimum µs between frames, used for capping frame rates
Definition FastLED.h:382
void setBrightness(fl::u8 scale)
Set the global brightness scaling.
Definition FastLED.h:799
void setDither(fl::u8 ditherMode=BINARY_DITHER)
Set the dithering mode.
void clearData()
Clear out the local data array.
Definition FastLED.cpp:259
void addListener(fl::EngineEvents::Listener *listener)
Definition FastLED.h:391
void setCorrection(const struct CRGB &correction)
Set a global color correction.
Definition FastLED.cpp:289
int count()
Get how many controllers have been registered.
Definition FastLED.cpp:187
static CLEDController & addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a 3rd party library based CLEDController instance to the world.
Definition FastLED.h:666
void clear(bool writeData=false)
Clear the leds, wiping the local array of data.
Definition FastLED.cpp:252
fl::u16 getFPS()
Get the number of frames/second being written out.
Definition FastLED.h:879
static CLEDController & addLeds(class fl::Leds &leds, int nLedsOrOffset, int nLedsIfOffset=0)
Definition FastLED.h:611
static CLEDController & addLeds(struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a clockless based CLEDController instance to the world.
Definition FastLED.h:598
fl::u16 m_nFPS
tracking for current frames per second (FPS) value
Definition FastLED.h:381
static CLEDController & addLeds(CLEDController *pLed, struct CRGB *data, int nLedsOrOffset, int nLedsIfOffset=0)
Add a CLEDController instance to the world.
Definition FastLED.cpp:110
High level controller interface for FastLED.
Definition FastLED.h:378
Base definition for an LED controller.
DMX512 based LED controller class, using the DMXSerial library.
Definition FastLED.h:318
DMX512 based LED controller class, using the DmxSimple library.
Definition FastLED.h:314
DMX512 based LED controller class, using the DMXSerial library.
Definition dmx.h:64
DMX512 based LED controller class, using the DmxSimple library.
Definition dmx.h:28
GE8822 controller class.
Definition chipsets.h:801
GE8822 controller class.
Definition FastLED.h:286
GS1903 controller class.
Definition FastLED.h:241
GW6205_400 controller class.
Definition FastLED.h:296
GW6205 controller class @ 400 KHz.
Definition chipsets.h:904
UCS1904 controller class @ 800 KHz.
Definition chipsets.h:909
GW6205 controller class.
Definition FastLED.h:291
LPD1886_8BIT controller class.
Definition FastLED.h:306
LPD1886 controller class.
Definition chipsets.h:811
LPD1886 controller class.
Definition chipsets.h:806
LPD1886 controller class.
Definition FastLED.h:301
LPD6803 controller class (LPD1101).
Definition chipsets.h:336
LPD8806 controller class.
Definition chipsets.h:255
LED controller for WS2812 LEDs with GRB color order.
Definition FastLED.h:158
P9813 controller class.
Definition chipsets.h:665
PL9823 controller class.
Definition chipsets.h:914
PL9823 controller class.
Definition FastLED.h:261
SK6812 controller class.
Definition chipsets.h:864
SK6812 controller class.
Definition FastLED.h:246
SK6822 controller class.
Definition chipsets.h:854
SK6822 controller class.
Definition FastLED.h:251
SK9822 controller class.
Definition chipsets.h:617
SK9822 controller class.
Definition chipsets.h:595
SM16703 controller class.
Definition chipsets.h:859
SM16703 controller class.
Definition FastLED.h:163
SM16716 controller class.
Definition chipsets.h:715
SM16824E controller class.
Definition chipsets.h:923
SM16824E controller class.
Definition FastLED.h:168
TM1803 controller class.
Definition chipsets.h:894
TM1803 controller class.
Definition FastLED.h:193
TM1804 controller class.
Definition FastLED.h:188
TM1809 controller class.
Definition chipsets.h:889
TM1809 controller class.
Definition FastLED.h:183
TM1812 controller class.
Definition FastLED.h:178
TM1829 controller class.
Definition chipsets.h:899
TM1829 controller class.
Definition FastLED.h:173
UCS1903B controller class.
Definition chipsets.h:874
UCS1903B controller class.
Definition FastLED.h:203
UCS1903 controller class @ 400 KHz.
Definition chipsets.h:869
UCS1903 controller class.
Definition FastLED.h:198
UCS1904 controller class.
Definition chipsets.h:879
UCS1904 controller class.
Definition FastLED.h:208
UCS1912 controller class.
Definition FastLED.h:310
UCS2903 controller class.
Definition chipsets.h:884
UCS2903 controller class.
Definition FastLED.h:213
WS2801 controller class.
Definition chipsets.h:298
WS2803 controller class.
Definition chipsets.h:325
WS2811_400 controller class.
Definition FastLED.h:281
WS2811 controller class @ 400 KHz.
Definition chipsets.h:849
WS2811 controller class @ 800 KHz.
Definition chipsets.h:829
WS2811 controller class.
Definition FastLED.h:266
WS2812B controller class.
Definition FastLED.h:236
WS2812 controller class @ 800 KHz.
Definition chipsets.h:818
WS2812 controller class.
Definition FastLED.h:218
WS2813 controller class.
Definition chipsets.h:844
WS2813 controller class.
Definition FastLED.h:271
WS2815 controller class @ 400 KHz.
Definition chipsets.h:824
WS2815 controller class.
Definition FastLED.h:222
WS2816 controller class.
Definition FastLED.h:226
WS2852 controller class.
Definition FastLED.h:231
static void addListener(Listener *listener, int priority=0)
static void removeListener(Listener *listener)
static void onBeginFrame()
static void onEndShowLeds()
Declarations for the predefined color palettes supplied by FastLED.
deprecated: base definitions used by led controllers for writing out led data
Compatibility functions based on C++ version.
#define BINARY_DITHER
Enable dithering using binary dithering (only option)
Definition dither_mode.h:14
FastLED dynamic library interface - lightweight header for external callers.
Defines the DMX512-based LED controllers.
fl::EOrder EOrder
Definition eorder.h:9
@ RGB
Red, Green, Blue (0012)
Definition eorder.h:14
Contains definitions that can be used to configure FastLED at compile time.
#define NS(_NS)
Convert from nanoseconds to number of clock cycles.
Utility functions and classes for managing delay cycles.
Wrapper definitions to allow seamless use of PROGMEM in environments that have it.
Class base definitions for defining fast pin access.
Serial peripheral interface (SPI) definitions per platform.
Data types and constants used by SPI interfaces.
uint8_t calculate_max_brightness_for_power_mW(const CRGB *ledbuffer, uint16_t numLeds, uint8_t target_brightness, uint32_t max_power_mW)
Determines the highest brightness level you can use and still stay under the specified power budget f...
Definition power_mgt.cpp:95
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.
#define FASTLED_NAMESPACE_END
Definition namespace.h:23
#define FASTLED_NAMESPACE_BEGIN
Definition namespace.h:22
unsigned char u8
Definition int.h:17
MapRedBlackTree< Key, T, Compare, fl::allocator_slab< char > > fl_map
Definition map.h:540
HeapVector< T, Allocator > vector
Definition vector.h:1214
IMPORTANT!
Definition crgb.h:20
Functions to generate and fill arrays with noise.
Declares classes for managing logical groups of LEDs.
Includes defintions for RGB and HSV pixels.
Determines which platforms headers to include.
Functions to limit the power used by FastLED.
Generic asynchronous task management for FastLED.
static const bool IS_VALID
Definition FastLED.h:447
Representation of an RGB pixel (Red, Green, Blue)
Definition crgb.h:86