1#ifndef __INC_CHIPSETS_H
2#define __INC_CHIPSETS_H
6#include "fl/force_inline.h"
13#ifndef FASTLED_CLOCKLESS_USES_NANOSECONDS
14 #if defined(FASTLED_TEENSY4)
15 #define FASTLED_CLOCKLESS_USES_NANOSECONDS 1
17 #include "third_party/espressif/led_strip/src/enabled.h"
20 #define FASTLED_CLOCKLESS_USES_NANOSECONDS 1
22 #define FASTLED_CLOCKLESS_USES_NANOSECONDS 0
25 #define FASTLED_CLOCKLESS_USES_NANOSECONDS 0
31#include "platforms/arm/k20/clockless_objectfled.h"
47#if defined(SoftwareSerial_h) || defined(__SoftwareSerial_h)
48#include <SoftwareSerial.h>
57template<u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
59 SoftwareSerial Serial;
63 PixieController() : Serial(-1, DATA_PIN) {}
75 while(pixels.
has(1)) {
111 CONTROLLER::MASK_VALUE> {
113 static const int LANES = CONTROLLER::LANES_VALUE;
114 static const uint32_t MASK = CONTROLLER::MASK_VALUE;
117 static_assert(
RGB == CONTROLLER::RGB_ORDER_VALUE,
"The delegated controller MUST NOT do reordering");
126 ensureBuffer(pixels.
size());
127 Rgbw rgbw = this->getRgbw();
128 uint8_t *data =
reinterpret_cast<uint8_t *
>(mRGBWPixels);
129 while (pixels.
has(1)) {
131 pixels.loadAndScaleRGBW(rgbw, data, data + 1, data + 2, data + 3);
145 mController.setCorrection(
CRGB(255, 255, 255));
146 mController.setTemperature(
CRGB(255, 255, 255));
149 mController.setEnabled(
true);
150 mController.showLeds(255);
151 mController.setEnabled(
false);
156 void init()
override {
158 mController.setEnabled(
false);
161 void ensureBuffer(int32_t num_leds) {
162 if (num_leds != mNumRGBLeds) {
163 mNumRGBLeds = num_leds;
168 uint32_t new_size = Rgbw::size_as_rgb(num_leds);
169 delete[] mRGBWPixels;
170 mRGBWPixels =
new CRGB[new_size];
172 mRGBWPixels[new_size - 1] =
CRGB(0, 0, 0);
173 mController.setLeds(mRGBWPixels, new_size);
177 CRGB *mRGBWPixels =
nullptr;
178 int32_t mNumRGBLeds = 0;
179 int32_t mNumRGBWLeds = 0;
180 CONTROLLER mController;
198template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(12) >
202 class LPD8806_ADJUST {
205 FASTLED_FORCE_INLINE
static uint8_t adjust(FASTLED_REGISTER uint8_t data) {
return ((data>>1) | 0x80) + ((data && (data<254)) & 0x01); }
206 FASTLED_FORCE_INLINE
static void postBlock(
int len,
void* context = NULL) {
207 SPI* pSPI =
static_cast<SPI*
>(context);
225 mSPI.template writePixels<0, LPD8806_ADJUST, RGB_ORDER>(pixels, &mSPI);
241template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(1)>
261 mSPI.template writePixels<0, DATA_NOP, RGB_ORDER>(pixels, NULL);
268template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(25)>
279template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(12)>
300 while(pixels.
has(1)) {
301 FASTLED_REGISTER uint16_t command;
312 endBoundary(pixels.
size());
331 uint8_t DATA_PIN, uint8_t CLOCK_PIN,
339 FiveBitGammaCorrectionMode GAMMA_CORRECTION_MODE = kFiveBitGammaCorrectionMode_Null,
340 uint32_t START_FRAME = 0x00000000,
341 uint32_t END_FRAME = 0xFF000000
347 void startBoundary() {
351 void endBoundary(
int nLeds) {
352 int nDWords = (nLeds/32);
353 const uint8_t b0 = uint8_t(END_FRAME >> 24 & 0x000000ff);
354 const uint8_t b1 = uint8_t(END_FRAME >> 16 & 0x000000ff);
355 const uint8_t b2 = uint8_t(END_FRAME >> 8 & 0x000000ff);
356 const uint8_t b3 = uint8_t(END_FRAME >> 0 & 0x000000ff);
365 FASTLED_FORCE_INLINE
void writeLed(uint8_t brightness, uint8_t b0, uint8_t b1, uint8_t b2) {
366#ifdef FASTLED_SPI_BYTE_ONLY
372 uint16_t b = 0xE000 | (brightness << 8) | (uint16_t)b0;
374 uint16_t w = b1 << 8;
380 FASTLED_FORCE_INLINE
void write2Bytes(uint8_t b1, uint8_t b2) {
381#ifdef FASTLED_SPI_BYTE_ONLY
399 switch (GAMMA_CORRECTION_MODE) {
400 case kFiveBitGammaCorrectionMode_Null: {
401 showPixelsDefault(pixels);
404 case kFiveBitGammaCorrectionMode_BitShift: {
405 showPixelsGammaBitShift(pixels);
413 static inline void getGlobalBrightnessAndScalingFactors(
415 uint8_t* out_s0, uint8_t* out_s1, uint8_t* out_s2, uint8_t* out_brightness) {
416#if FASTLED_HD_COLOR_MIXING
418 pixels.getHdScale(out_s0, out_s1, out_s2, &brightness);
420 static uint16_t map(uint16_t x, uint16_t in_min, uint16_t in_max, uint16_t out_min, uint16_t out_max) {
421 const uint16_t run = in_max - in_min;
422 const uint16_t rise = out_max - out_min;
423 const uint16_t delta = x - in_min;
424 return (delta * rise) / run + out_min;
427 *out_brightness = Math::map(brightness, 0, 255, 0, 31);
431 pixels.loadAndScaleRGB(&s0, &s1, &s2);
432#if FASTLED_USE_GLOBAL_BRIGHTNESS == 1
434 const uint16_t maxBrightness = 0x1F;
435 uint16_t brightness = ((((uint16_t)max(max(s0, s1), s2) + 1) * maxBrightness - 1) >> 8) + 1;
436 s0 = (maxBrightness * s0 + (brightness >> 1)) / brightness;
437 s1 = (maxBrightness * s1 + (brightness >> 1)) / brightness;
438 s2 = (maxBrightness * s2 + (brightness >> 1)) / brightness;
440 const uint8_t brightness = 0x1F;
445 *out_brightness =
static_cast<uint8_t
>(brightness);
452 uint8_t s0, s1, s2, global_brightness;
453 getGlobalBrightnessAndScalingFactors(pixels, &s0, &s1, &s2, &global_brightness);
455 while (pixels.
has(1)) {
457 pixels.loadAndScaleRGB(&c0, &c1, &c2);
458 writeLed(global_brightness, c0, c1, c2);
462 endBoundary(pixels.
size());
471 while (pixels.
has(1)) {
473 uint8_t brightness, c0, c1, c2;
474 pixels.loadAndScale_APA102_HD(&c0, &c1, &c2, &brightness);
475 writeLed(brightness, c0, c1, c2);
479 endBoundary(pixels.
size());
506 kFiveBitGammaCorrectionMode_BitShift,
507 uint32_t(0x00000000),
508 uint32_t(0x00000000)> {
530 kFiveBitGammaCorrectionMode_Null,
552 kFiveBitGammaCorrectionMode_BitShift,
571template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(10)>
578 FASTLED_FORCE_INLINE
void writeLed(uint8_t r, uint8_t g, uint8_t b) {
579 FASTLED_REGISTER uint8_t top = 0xC0 | ((~b & 0xC0) >> 2) | ((~g & 0xC0) >> 4) | ((~r & 0xC0) >> 6);
596 while(pixels.
has(1)) {
621template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(16)>
629 mSPI.template writeBit<0>(0);
633 mSPI.template writeBit<0>(0);
654 mSPI.template writePixels<FLAG_START_BIT, DATA_NOP, RGB_ORDER>(pixels, NULL);
668#ifdef FASTLED_HAS_CLOCKLESS
693#if !defined(CLOCKLESS_FREQUENCY)
694 #define CLOCKLESS_FREQUENCY F_CPU
699#if defined(__LGT8F__) || (CLOCKLESS_FREQUENCY == 8000000 || CLOCKLESS_FREQUENCY == 16000000 || CLOCKLESS_FREQUENCY == 24000000) || defined(FASTLED_DOXYGEN)
703#define FMUL (CLOCKLESS_FREQUENCY/8000000)
707template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
712template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
717template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
723template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
728template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
729class WS2815Controller :
public ClocklessController<DATA_PIN, 2 * FMUL, 9 * FMUL, 4 * FMUL, RGB_ORDER> {};
733template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
738template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
743template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
748template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
749class WS2813Controller :
public ClocklessController<DATA_PIN, 3 * FMUL, 4 * FMUL, 3 * FMUL, RGB_ORDER> {};
753template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
758template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
759class SK6822Controller :
public ClocklessController<DATA_PIN, 3 * FMUL, 8 * FMUL, 3 * FMUL, RGB_ORDER> {};
763template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
764class SM16703Controller :
public ClocklessController<DATA_PIN, 3 * FMUL, 4 * FMUL, 3 * FMUL, RGB_ORDER> {};
768template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
769class SK6812Controller :
public ClocklessController<DATA_PIN, 3 * FMUL, 3 * FMUL, 4 * FMUL, RGB_ORDER> {};
773template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
778template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
783template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
788template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
789class UCS2903Controller :
public ClocklessController<DATA_PIN, 2 * FMUL, 6 * FMUL, 2 * FMUL, RGB_ORDER> {};
793template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
798template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
803template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
804class TM1829Controller800Khz :
public ClocklessController<DATA_PIN, 2 * FMUL, 5 * FMUL, 3 * FMUL, RGB_ORDER, 0, true, 500> {};
808template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
813template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
818template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
819class PL9823Controller :
public ClocklessController<DATA_PIN, 3 * FMUL, 8 * FMUL, 3 * FMUL, RGB_ORDER> {};
822template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
823class UCS1912Controller :
public ClocklessController<DATA_PIN, 2 * FMUL, 8 * FMUL, 3 * FMUL, RGB_ORDER> {};
832#ifdef FASTLED_LED_OVERCLOCK
833#warning "FASTLED_LED_OVERCLOCK has been changed to FASTLED_OVERCLOCK. Please update your code."
834#define FASTLED_OVERCLOCK FASTLED_LED_OVERCLOCK
837#ifndef FASTLED_OVERCLOCK
838#define FASTLED_OVERCLOCK 1.0
840#ifndef FASTLED_OVERCLOCK_SUPPRESS_WARNING
841#warning "FASTLED_OVERCLOCK is now active, #define FASTLED_OVERCLOCK_SUPPRESS_WARNING to disable this warning"
850#ifndef FASTLED_OVERCLOCK_WS2812
851#define FASTLED_OVERCLOCK_WS2812 FASTLED_OVERCLOCK
854#ifndef FASTLED_OVERCLOCK_WS2811
855#define FASTLED_OVERCLOCK_WS2811 FASTLED_OVERCLOCK
858#ifndef FASTLED_OVERCLOCK_WS2813
859#define FASTLED_OVERCLOCK_WS2813 FASTLED_OVERCLOCK
862#ifndef FASTLED_OVERCLOCK_WS2815
863#define FASTLED_OVERCLOCK_WS2815 FASTLED_OVERCLOCK
866#ifndef FASTLED_OVERCLOCK_SK6822
867#define FASTLED_OVERCLOCK_SK6822 FASTLED_OVERCLOCK
870#ifndef FASTLED_OVERCLOCK_SK6812
871#define FASTLED_OVERCLOCK_SK6812 FASTLED_OVERCLOCK
876#if FASTLED_CLOCKLESS_USES_NANOSECONDS
880#define C_NS(_NS) (((_NS * ((CLOCKLESS_FREQUENCY / 1000000L)) + 999)) / 1000)
886#define C_NS_WS2812(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_WS2812)))
887#define C_NS_WS2811(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_WS2811)))
888#define C_NS_WS2813(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_WS2813)))
889#define C_NS_WS2815(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_WS2815)))
890#define C_NS_SK6822(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_SK6822)))
891#define C_NS_SK6812(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_SK6812)))
924template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
925class GE8822Controller800Khz :
public ClocklessController<DATA_PIN, C_NS(350), C_NS(660), C_NS(350), RGB_ORDER, 4> {};
928template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
929class GW6205Controller400Khz :
public ClocklessController<DATA_PIN, C_NS(800), C_NS(800), C_NS(800), RGB_ORDER, 4> {};
932template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
933class GW6205Controller800Khz :
public ClocklessController<DATA_PIN, C_NS(400), C_NS(400), C_NS(400), RGB_ORDER, 4> {};
936template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
937class UCS1903Controller400Khz :
public ClocklessController<DATA_PIN, C_NS(500), C_NS(1500), C_NS(500), RGB_ORDER> {};
940template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
941class UCS1903BController800Khz :
public ClocklessController<DATA_PIN, C_NS(400), C_NS(450), C_NS(450), RGB_ORDER> {};
944template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
945class UCS1904Controller800Khz :
public ClocklessController<DATA_PIN, C_NS(400), C_NS(400), C_NS(450), RGB_ORDER> {};
948template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
949class UCS2903Controller :
public ClocklessController<DATA_PIN, C_NS(250), C_NS(750), C_NS(250), RGB_ORDER> {};
952template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
953class TM1809Controller800Khz :
public ClocklessController<DATA_PIN, C_NS(350), C_NS(350), C_NS(450), RGB_ORDER> {};
956template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
957class WS2811Controller800Khz :
public ClocklessController<DATA_PIN, C_NS_WS2811(320), C_NS_WS2811(320), C_NS_WS2811(640), RGB_ORDER> {};
960template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
961class WS2813Controller :
public ClocklessController<DATA_PIN, C_NS_WS2813(320), C_NS_WS2813(320), C_NS_WS2813(640), RGB_ORDER> {};
963#ifndef FASTLED_WS2812_T1
964#define FASTLED_WS2812_T1 250
967#ifndef FASTLED_WS2812_T2
968#define FASTLED_WS2812_T2 625
971#ifndef FASTLED_WS2812_T3
972#define FASTLED_WS2812_T3 375
976#if defined(__IMXRT1062__) && !defined(FASTLED_NOT_USES_OBJECTFLED)
977#if defined(FASTLED_USES_OBJECTFLED)
978#warning "FASTLED_USES_OBJECTFLED is now implicit for Teensy 4.0/4.1 for WS2812 and is no longer needed."
980template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
982 public fl::ClocklessController_ObjectFLED_WS2812<
986 typedef fl::ClocklessController_ObjectFLED_WS2812<DATA_PIN, RGB_ORDER> Base;
989#elif defined(FASTLED_USES_ESP32S3_I2S)
990#include "platforms/esp/32/clockless_i2s_esp32s3.h"
991template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
993 public fl::ClocklessController_I2S_Esp32_WS2812<
999template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1002 C_NS_WS2812(FASTLED_WS2812_T1),
1003 C_NS_WS2812(FASTLED_WS2812_T2),
1004 C_NS_WS2812(FASTLED_WS2812_T3),
1010template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1011class WS2811Controller400Khz :
public ClocklessController<DATA_PIN, C_NS_WS2811(800), C_NS_WS2811(800), C_NS_WS2811(900), RGB_ORDER> {};
1013template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1014class WS2815Controller :
public ClocklessController<DATA_PIN, C_NS_WS2815(250), C_NS_WS2815(1090), C_NS_WS2815(550), RGB_ORDER> {};
1017template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1018class TM1803Controller400Khz :
public ClocklessController<DATA_PIN, C_NS(700), C_NS(1100), C_NS(700), RGB_ORDER> {};
1020template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1021class TM1829Controller800Khz :
public ClocklessController<DATA_PIN, C_NS(340), C_NS(340), C_NS(550), RGB_ORDER, 0, true, 500> {};
1023template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1024class TM1829Controller1600Khz :
public ClocklessController<DATA_PIN, C_NS(100), C_NS(300), C_NS(200), RGB_ORDER, 0, true, 500> {};
1026template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1027class LPD1886Controller1250Khz :
public ClocklessController<DATA_PIN, C_NS(200), C_NS(400), C_NS(200), RGB_ORDER, 4> {};
1029template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1033template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1034class SK6822Controller :
public ClocklessController<DATA_PIN, C_NS_SK6822(375), C_NS_SK6822(1000), C_NS_SK6822(375), RGB_ORDER> {};
1036template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1037class SK6812Controller :
public ClocklessController<DATA_PIN, C_NS_SK6812(300), C_NS_SK6812(300), C_NS_SK6812(600), RGB_ORDER> {};
1039template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1040class SM16703Controller :
public ClocklessController<DATA_PIN, C_NS(300), C_NS(600), C_NS(300), RGB_ORDER> {};
1042template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1043class PL9823Controller :
public ClocklessController<DATA_PIN, C_NS(350), C_NS(1010), C_NS(350), RGB_ORDER> {};
1046template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1047class UCS1912Controller :
public ClocklessController<DATA_PIN, C_NS(250), C_NS(1000), C_NS(350), RGB_ORDER> {};
1055template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1058 WS2812Controller800Khz<DATA_PIN, RGB>::LANES_VALUE,
1059 WS2812Controller800Khz<DATA_PIN, RGB>::MASK_VALUE> {
1063 static const int LANES = ControllerT::LANES_VALUE;
1064 static const uint32_t MASK = ControllerT::MASK_VALUE;
1068 mController.setLeds(
nullptr, 0);
1074 ensureBuffer(pixels.
size());
1077 size_t out_index = 0;
1078 while (pixels.
has(1)) {
1081 uint16_t s0, s1, s2;
1082 pixels.loadAndScale_WS2816_HD(&s0, &s1, &s2);
1083 uint8_t b0_hi = s0 >> 8;
1084 uint8_t b0_lo = s0 & 0xFF;
1085 uint8_t b1_hi = s1 >> 8;
1086 uint8_t b1_lo = s1 & 0xFF;
1087 uint8_t b2_hi = s2 >> 8;
1088 uint8_t b2_lo = s2 & 0xFF;
1090 mData[out_index] =
CRGB(b0_hi, b0_lo, b1_hi);
1091 mData[out_index + 1] =
CRGB(b1_lo, b2_hi, b2_lo);
1098 mController.setCorrection(
CRGB(255, 255, 255));
1099 mController.setTemperature(
CRGB(255, 255, 255));
1103 mController.setEnabled(
true);
1104 mController.showLeds(255);
1105 mController.setEnabled(
false);
1109 void init()
override {
1111 mController.setEnabled(
false);
1114 void ensureBuffer(
int size_8bit) {
1115 int size_16bit = 2 * size_8bit;
1116 if (mController.size() != size_16bit) {
1118 CRGB *new_leds =
new CRGB[size_16bit];
1120 mController.setLeds(new_leds, size_16bit);
APA102 high definition controller class.
virtual void init() override
Initialize the LED controller.
virtual void showPixels(PixelController< RGB_ORDER > &pixels) override
Send the LED data to the strip.
void select()
Select the SPI output (chip select)
static void writeWord(uint16_t w)
Write a word (two bytes) over SPI.
static void writeByte(uint8_t b)
Write a single byte over SPI.
void release()
Release the SPI chip select line.
static void writeBytesValueRaw(uint8_t value, int len)
Write multiple bytes of the given value over SPI, without selecting the interface.
static void waitFully()
Wait until the SPI subsystem is ready for more data to write.
void init()
Set the clock/data pins to output and make sure the chip select is released.
virtual void init()=0
Initialize the LED controller.
Class to ensure that a minimum amount of time has kicked since the last time run - and delay if not e...
void mark()
Reset the timestamp that marks the start of the wait period.
void wait()
Blocking delay until WAIT time since mark() has passed.
Template extension of the CLEDController class.
virtual void showPixels(PixelController< RGB_ORDER, LANES, MASK > &pixels)=0
Send the LED data to the strip.
DP1903 controller class @ 400 KHz.
DP1903 controller class @ 800 KHz.
GW6205 controller class @ 400 KHz.
UCS1904 controller class @ 800 KHz.
LPD1886 controller class.
LPD1886 controller class.
LPD6803 controller class (LPD1101).
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
virtual void init()
Initialize the LED controller.
LPD8806 controller class.
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
virtual void init()
Initialize the LED controller.
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
virtual void init()
Initialize the LED controller.
virtual void showPixels(PixelController< RGB_ORDER, LANES, MASK > &pixels)
Send the LED data to the strip.
SM16703 controller class.
SM16716 controller class.
virtual void init()
Initialize the LED controller.
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
UCS1903B controller class.
UCS1903 controller class @ 400 KHz.
UCS1904 controller class.
UCS2903 controller class.
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
virtual void init()
Initialize the controller.
WS2811 controller class @ 400 KHz.
WS2811 controller class @ 800 KHz.
WS2812 controller class @ 800 KHz.
WS2815 controller class @ 400 KHz.
virtual void showPixels(PixelController< RGB_ORDER, LANES, MASK > &pixels)
Send the LED data to the strip.
Defines the red, green, and blue (RGB) pixel struct.
#define DISABLE_DITHER
Disable dithering.
Defines color channel ordering enumerations.
EOrder
RGB color channel orderings, used when instantiating controllers to determine what order the controll...
@ RGB
Red, Green, Blue (0012)
@ GRB
Green, Red, Blue (0102)
#define DATA_RATE_MHZ(X)
Convert data rate from megahertz (MHz) to clock cycles per bit.
Declares functions for five-bit gamma correction.
#define FASTLED_NAMESPACE_END
End of the FastLED namespace.
#define FASTLED_NAMESPACE_BEGIN
Start of the FastLED namespace.
Non-templated low level pixel data writing class.
Includes defintions for RGB and HSV pixels.
Representation of an RGB pixel (Red, Green, Blue)
FASTLED_FORCE_INLINE uint8_t loadAndScale1(int lane, uint8_t scale)
non-template alias of loadAndScale<1>()
FASTLED_FORCE_INLINE uint8_t loadAndScale2(int lane, uint8_t scale)
non-template alias of loadAndScale<2>()
FASTLED_FORCE_INLINE uint8_t loadAndScale0(int lane, uint8_t scale)
non-template alias of loadAndScale<0>()
FASTLED_FORCE_INLINE int size()
Get the length of the LED strip.
FASTLED_FORCE_INLINE void advanceData()
Advance the data pointer forward, adjust position counter.
FASTLED_FORCE_INLINE bool has(int n)
Do we have n pixels left to process?
FASTLED_FORCE_INLINE void stepDithering()
Step the dithering forward.