1#ifndef __INC_CHIPSETS_H
2#define __INC_CHIPSETS_H
14#ifndef FASTLED_CLOCKLESS_USES_NANOSECONDS
15 #if defined(FASTLED_TEENSY4)
16 #define FASTLED_CLOCKLESS_USES_NANOSECONDS 1
21 #define FASTLED_CLOCKLESS_USES_NANOSECONDS 1
23 #define FASTLED_CLOCKLESS_USES_NANOSECONDS 0
26 #define FASTLED_CLOCKLESS_USES_NANOSECONDS 0
32#include "platforms/arm/k20/clockless_objectfled.h"
48#if defined(SoftwareSerial_h) || defined(__SoftwareSerial_h)
49#include <SoftwareSerial.h>
58template<u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
60 SoftwareSerial Serial;
64 PixieController() : Serial(-1,
DATA_PIN) {}
74 virtual void showPixels(PixelController<RGB_ORDER> & pixels) {
76 while(pixels.
has(1)) {
113 CONTROLLER::MASK_VALUE> {
126 ControllerBaseT::show(data, nLeds,
brightness);
132 static const int LANES = CONTROLLER::LANES_VALUE;
133 static const uint32_t
MASK = CONTROLLER::MASK_VALUE;
136 static_assert(
RGB == CONTROLLER::RGB_ORDER_VALUE,
"The delegated controller MUST NOT do reordering");
155 uint8_t *data =
reinterpret_cast<uint8_t *
>(
mRGBWPixels);
156 while (pixels.
has(1)) {
199 for (uint32_t i = 0; i < new_size; i++) {
228template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(12) >
237 SPI* pSPI =
static_cast<SPI*
>(context);
255 mSPI.template writePixels<0, LPD8806_ADJUST, RGB_ORDER>(pixels, &
mSPI);
271template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(1)>
291 mSPI.template writePixels<0, DATA_NOP, RGB_ORDER>(pixels, NULL);
298template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(25)>
309template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(12)>
315 void endBoundary(
int nLeds) {
int nDWords = (nLeds/32);
do {
mSPI.writeByte(0xFF);
mSPI.writeByte(0x00);
mSPI.writeByte(0x00);
mSPI.writeByte(0x00); }
while(nDWords--); }
330 while(pixels.
has(1)) {
335 mSPI.writeByte((command >> 8) & 0xFF);
337 mSPI.writeByte(command & 0xFF);
370 uint32_t START_FRAME = 0x00000000,
371 uint32_t END_FRAME = 0xFF000000
378 mSPI.writeWord(START_FRAME >> 16);
379 mSPI.writeWord(START_FRAME & 0xFFFF);
382 int nDWords = (nLeds/32);
383 const uint8_t b0 = uint8_t(END_FRAME >> 24 & 0x000000ff);
384 const uint8_t b1 = uint8_t(END_FRAME >> 16 & 0x000000ff);
385 const uint8_t b2 = uint8_t(END_FRAME >> 8 & 0x000000ff);
386 const uint8_t b3 = uint8_t(END_FRAME >> 0 & 0x000000ff);
396#ifdef FASTLED_SPI_BYTE_ONLY
402 uint16_t b = 0xE000 | (
brightness << 8) | (uint16_t)b0;
404 uint16_t w = b1 << 8;
411#ifdef FASTLED_SPI_BYTE_ONLY
415 mSPI.writeWord(uint16_t(b1) << 8 | b2);
429 switch (GAMMA_CORRECTION_MODE) {
445 uint8_t* out_s0, uint8_t* out_s1, uint8_t* out_s2, uint8_t* out_brightness) {
446#if FASTLED_HD_COLOR_MIXING
448 pixels.getHdScale(out_s0, out_s1, out_s2, &
brightness);
450 static uint16_t map(uint16_t
x, uint16_t in_min, uint16_t in_max, uint16_t out_min, uint16_t out_max) {
451 const uint16_t run = in_max - in_min;
452 const uint16_t rise = out_max - out_min;
453 const uint16_t delta =
x - in_min;
454 return (delta * rise) / run + out_min;
458 uint16_t bri = Math::map(
brightness, 0, 255, 0, 31);
463 *out_brightness =
static_cast<uint8_t
>(bri);
468#if FASTLED_USE_GLOBAL_BRIGHTNESS == 1
470 const uint16_t maxBrightness = 0x1F;
471 uint16_t
brightness = ((((uint16_t)max(max(s0, s1), s2) + 1) * maxBrightness - 1) >> 8) + 1;
481 *out_brightness =
static_cast<uint8_t
>(
brightness);
488 uint8_t s0, s1, s2, global_brightness;
491 while (pixels.
has(1)) {
494 writeLed(global_brightness, c0, c1, c2);
507 while (pixels.
has(1)) {
542 fl::kFiveBitGammaCorrectionMode_BitShift,
543 uint32_t(0x00000000),
544 uint32_t(0x00000000)> {
566 fl::kFiveBitGammaCorrectionMode_Null,
588 fl::kFiveBitGammaCorrectionMode_BitShift,
607 fl::kFiveBitGammaCorrectionMode_Null,
638template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(10)>
646 FASTLED_REGISTER uint8_t top = 0xC0 | ((~b & 0xC0) >> 2) | ((~g & 0xC0) >> 4) | ((~r & 0xC0) >> 6);
647 mSPI.writeByte(top);
mSPI.writeByte(b);
mSPI.writeByte(g);
mSPI.writeByte(r);
663 while(pixels.
has(1)) {
688template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(16)>
696 mSPI.template writeBit<0>(0);
700 mSPI.template writeBit<0>(0);
721 mSPI.template writePixels<FLAG_START_BIT, DATA_NOP, RGB_ORDER>(pixels, NULL);
735#ifdef FASTLED_HAS_CLOCKLESS
760#if !defined(CLOCKLESS_FREQUENCY)
761 #define CLOCKLESS_FREQUENCY F_CPU
766#if defined(__LGT8F__) || (CLOCKLESS_FREQUENCY == 8000000 || CLOCKLESS_FREQUENCY == 16000000 || CLOCKLESS_FREQUENCY == 24000000) || defined(FASTLED_DOXYGEN)
770#define FMUL (CLOCKLESS_FREQUENCY/8000000)
774template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
779template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
784template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
790template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
795template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
796class WS2815Controller :
public ClocklessController<DATA_PIN, 2 * FMUL, 9 * FMUL, 4 * FMUL, RGB_ORDER> {};
800template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
805template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
810template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
815template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
816class WS2813Controller :
public ClocklessController<DATA_PIN, 3 * FMUL, 4 * FMUL, 3 * FMUL, RGB_ORDER> {};
820template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
825template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
826class SK6822Controller :
public ClocklessController<DATA_PIN, 3 * FMUL, 8 * FMUL, 3 * FMUL, RGB_ORDER> {};
830template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
831class SM16703Controller :
public ClocklessController<DATA_PIN, 3 * FMUL, 4 * FMUL, 3 * FMUL, RGB_ORDER> {};
835template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
836class SK6812Controller :
public ClocklessController<DATA_PIN, 3 * FMUL, 3 * FMUL, 4 * FMUL, RGB_ORDER> {};
840template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
845template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
850template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
855template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
856class UCS2903Controller :
public ClocklessController<DATA_PIN, 2 * FMUL, 6 * FMUL, 2 * FMUL, RGB_ORDER> {};
860template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
865template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
870template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
871class TM1829Controller800Khz :
public ClocklessController<DATA_PIN, 2 * FMUL, 5 * FMUL, 3 * FMUL, RGB_ORDER, 0, true, 500> {};
875template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
880template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
885template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
886class PL9823Controller :
public ClocklessController<DATA_PIN, 3 * FMUL, 8 * FMUL, 3 * FMUL, RGB_ORDER> {};
889template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
890class UCS1912Controller :
public ClocklessController<DATA_PIN, 2 * FMUL, 8 * FMUL, 3 * FMUL, RGB_ORDER> {};
899#ifdef FASTLED_LED_OVERCLOCK
900#warning "FASTLED_LED_OVERCLOCK has been changed to FASTLED_OVERCLOCK. Please update your code."
901#define FASTLED_OVERCLOCK FASTLED_LED_OVERCLOCK
904#ifndef FASTLED_OVERCLOCK
905#define FASTLED_OVERCLOCK 1.0
907#ifndef FASTLED_OVERCLOCK_SUPPRESS_WARNING
908#warning "FASTLED_OVERCLOCK is now active, #define FASTLED_OVERCLOCK_SUPPRESS_WARNING to disable this warning"
917#ifndef FASTLED_OVERCLOCK_WS2812
918#define FASTLED_OVERCLOCK_WS2812 FASTLED_OVERCLOCK
921#ifndef FASTLED_OVERCLOCK_WS2811
922#define FASTLED_OVERCLOCK_WS2811 FASTLED_OVERCLOCK
925#ifndef FASTLED_OVERCLOCK_WS2813
926#define FASTLED_OVERCLOCK_WS2813 FASTLED_OVERCLOCK
929#ifndef FASTLED_OVERCLOCK_WS2815
930#define FASTLED_OVERCLOCK_WS2815 FASTLED_OVERCLOCK
933#ifndef FASTLED_OVERCLOCK_SK6822
934#define FASTLED_OVERCLOCK_SK6822 FASTLED_OVERCLOCK
937#ifndef FASTLED_OVERCLOCK_SK6812
938#define FASTLED_OVERCLOCK_SK6812 FASTLED_OVERCLOCK
943#if FASTLED_CLOCKLESS_USES_NANOSECONDS
947#define C_NS(_NS) (((_NS * ((CLOCKLESS_FREQUENCY / 1000000L)) + 999)) / 1000)
953#define C_NS_WS2812(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_WS2812)))
954#define C_NS_WS2811(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_WS2811)))
955#define C_NS_WS2813(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_WS2813)))
956#define C_NS_WS2815(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_WS2815)))
957#define C_NS_SK6822(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_SK6822)))
958#define C_NS_SK6812(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_SK6812)))
991template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
992class GE8822Controller800Khz :
public ClocklessController<DATA_PIN, C_NS(350), C_NS(660), C_NS(350), RGB_ORDER, 4> {};
995template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
996class GW6205Controller400Khz :
public ClocklessController<DATA_PIN, C_NS(800), C_NS(800), C_NS(800), RGB_ORDER, 4> {};
999template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1000class GW6205Controller800Khz :
public ClocklessController<DATA_PIN, C_NS(400), C_NS(400), C_NS(400), RGB_ORDER, 4> {};
1003template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1004class UCS1903Controller400Khz :
public ClocklessController<DATA_PIN, C_NS(500), C_NS(1500), C_NS(500), RGB_ORDER> {};
1007template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1008class UCS1903BController800Khz :
public ClocklessController<DATA_PIN, C_NS(400), C_NS(450), C_NS(450), RGB_ORDER> {};
1011template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1012class UCS1904Controller800Khz :
public ClocklessController<DATA_PIN, C_NS(400), C_NS(400), C_NS(450), RGB_ORDER> {};
1015template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1016class UCS2903Controller :
public ClocklessController<DATA_PIN, C_NS(250), C_NS(750), C_NS(250), RGB_ORDER> {};
1019template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1020class TM1809Controller800Khz :
public ClocklessController<DATA_PIN, C_NS(350), C_NS(350), C_NS(450), RGB_ORDER> {};
1023template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1024class WS2811Controller800Khz :
public ClocklessController<DATA_PIN, C_NS_WS2811(320), C_NS_WS2811(320), C_NS_WS2811(640), RGB_ORDER> {};
1027template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1028class WS2813Controller :
public ClocklessController<DATA_PIN, C_NS_WS2813(320), C_NS_WS2813(320), C_NS_WS2813(640), RGB_ORDER> {};
1030#ifndef FASTLED_WS2812_T1
1031#define FASTLED_WS2812_T1 250
1034#ifndef FASTLED_WS2812_T2
1035#define FASTLED_WS2812_T2 625
1038#ifndef FASTLED_WS2812_T3
1039#define FASTLED_WS2812_T3 375
1043#if defined(__IMXRT1062__) && !defined(FASTLED_NOT_USES_OBJECTFLED)
1044#if defined(FASTLED_USES_OBJECTFLED)
1045#warning "FASTLED_USES_OBJECTFLED is now implicit for Teensy 4.0/4.1 for WS2812 and is no longer needed."
1047template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1049 public fl::ClocklessController_ObjectFLED_WS2812<
1053 typedef fl::ClocklessController_ObjectFLED_WS2812<DATA_PIN, RGB_ORDER> Base;
1056#elif defined(FASTLED_USES_ESP32S3_I2S)
1057#include "platforms/esp/32/clockless_i2s_esp32s3.h"
1058template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1060 public fl::ClocklessController_I2S_Esp32_WS2812<
1066template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1069 C_NS_WS2812(FASTLED_WS2812_T1),
1070 C_NS_WS2812(FASTLED_WS2812_T2),
1071 C_NS_WS2812(FASTLED_WS2812_T3),
1077template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1078class WS2811Controller400Khz :
public ClocklessController<DATA_PIN, C_NS_WS2811(800), C_NS_WS2811(800), C_NS_WS2811(900), RGB_ORDER> {};
1080template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1081class WS2815Controller :
public ClocklessController<DATA_PIN, C_NS_WS2815(250), C_NS_WS2815(1090), C_NS_WS2815(550), RGB_ORDER> {};
1084template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1085class TM1803Controller400Khz :
public ClocklessController<DATA_PIN, C_NS(700), C_NS(1100), C_NS(700), RGB_ORDER> {};
1087template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1088class TM1829Controller800Khz :
public ClocklessController<DATA_PIN, C_NS(340), C_NS(340), C_NS(550), RGB_ORDER, 0, true, 500> {};
1090template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1091class TM1829Controller1600Khz :
public ClocklessController<DATA_PIN, C_NS(100), C_NS(300), C_NS(200), RGB_ORDER, 0, true, 500> {};
1093template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1094class LPD1886Controller1250Khz :
public ClocklessController<DATA_PIN, C_NS(200), C_NS(400), C_NS(200), RGB_ORDER, 4> {};
1096template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1100template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1101class SK6822Controller :
public ClocklessController<DATA_PIN, C_NS_SK6822(375), C_NS_SK6822(1000), C_NS_SK6822(375), RGB_ORDER> {};
1103template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1104class SK6812Controller :
public ClocklessController<DATA_PIN, C_NS_SK6812(300), C_NS_SK6812(300), C_NS_SK6812(600), RGB_ORDER> {};
1106template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1107class SM16703Controller :
public ClocklessController<DATA_PIN, C_NS(300), C_NS(600), C_NS(300), RGB_ORDER> {};
1109template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1110class PL9823Controller :
public ClocklessController<DATA_PIN, C_NS(350), C_NS(1010), C_NS(350), RGB_ORDER> {};
1113template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1114class UCS1912Controller :
public ClocklessController<DATA_PIN, C_NS(250), C_NS(1000), C_NS(350), RGB_ORDER> {};
1122template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1125 WS2812Controller800Khz<DATA_PIN, RGB>::LANES_VALUE,
1126 WS2812Controller800Khz<DATA_PIN, RGB>::MASK_VALUE> {
1141 ControllerBaseT::show(data, nLeds,
brightness);
1146 static const int LANES = ControllerT::LANES_VALUE;
1147 static const uint32_t
MASK = ControllerT::MASK_VALUE;
1173 size_t out_index = 0;
1174 while (pixels.
has(1)) {
1177 uint16_t s0, s1, s2;
1179 uint8_t b0_hi = s0 >> 8;
1180 uint8_t b0_lo = s0 & 0xFF;
1181 uint8_t b1_hi = s1 >> 8;
1182 uint8_t b1_lo = s1 & 0xFF;
1183 uint8_t b2_hi = s2 >> 8;
1184 uint8_t b2_lo = s2 & 0xFF;
1186 mData[out_index] =
CRGB(b0_hi, b0_lo, b1_hi);
1187 mData[out_index + 1] =
CRGB(b1_lo, b2_hi, b2_lo);
1200#ifdef BOUNCE_SUBCLASS
1215 int size_16bit = 2 * size_8bit;
1218 CRGB *new_leds =
new CRGB[size_16bit];
UISlider brightness("Brightness", 255, 0, 255, 1)
#define FASTLED_OVERCLOCK
void showPixelsGammaBitShift(PixelController< RGB_ORDER > &pixels)
virtual void init() override
Initialize the LED controller.
FASTLED_FORCE_INLINE void write2Bytes(uint8_t b1, uint8_t b2)
static void getGlobalBrightnessAndScalingFactors(PixelController< RGB_ORDER > &pixels, uint8_t *out_s0, uint8_t *out_s1, uint8_t *out_s2, uint8_t *out_brightness)
SPIOutput< DATA_PIN, CLOCK_PIN, SPI_SPEED > SPI
FASTLED_FORCE_INLINE void writeLed(uint8_t brightness, uint8_t b0, uint8_t b1, uint8_t b2)
virtual void showPixels(PixelController< RGB_ORDER > &pixels) override
Send the LED data to the strip.
void showPixelsDefault(PixelController< RGB_ORDER > &pixels)
void endBoundary(int nLeds)
APA102ControllerHD()=default
APA102ControllerHD(const APA102ControllerHD &)=delete
static void writeBytesValueRaw(uint8_t value, int len)
Write multiple bytes of the given value over SPI, without selecting the interface.
virtual int size()
How many LEDs does this controller manage?
CLEDController & setRgbw(const Rgbw &arg=RgbwDefault::value())
virtual void init()=0
Initialize the LED controller.
void mark()
Reset the timestamp that marks the start of the wait period.
void wait()
Blocking delay until WAIT time since mark() has passed.
Class to ensure that a minimum amount of time has kicked since the last time run - and delay if not e...
virtual void showPixels(PixelController< RGB_ORDER, LANES, MASK > &pixels)=0
Send the LED data to the strip.
Template extension of the CLEDController class.
DP1903 controller class @ 400 KHz.
DP1903 controller class @ 800 KHz.
GW6205 controller class @ 400 KHz.
UCS1904 controller class @ 800 KHz.
HD107 is just the APA102 with a default 40Mhz clock rate.
HD107HD is just the APA102HD with a default 40Mhz clock rate.
LPD1886 controller class.
LPD1886 controller class.
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
virtual void init()
Initialize the LED controller.
void endBoundary(int nLeds)
SPIOutput< DATA_PIN, CLOCK_PIN, SPI_SPEED > SPI
static FASTLED_FORCE_INLINE uint8_t adjust(FASTLED_REGISTER uint8_t data)
static FASTLED_FORCE_INLINE void postBlock(int len, void *context=NULL)
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
SPIOutput< DATA_PIN, CLOCK_PIN, SPI_SPEED > SPI
virtual void init()
Initialize the LED controller.
FASTLED_FORCE_INLINE void writeLed(uint8_t r, uint8_t g, uint8_t b)
SPIOutput< DATA_PIN, CLOCK_PIN, SPI_SPEED > SPI
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
virtual void init()
Initialize the LED controller.
void callEndShowLeds(void *data)
void * callBeginShowLeds(int size)
void callShow(CRGB *data, int nLeds, uint8_t brightness)
virtual void * beginShowLeds(int size) override
void init() override
Initialize the LED controller.
virtual void endShowLeds(void *data) override
~RGBWEmulatedController()
virtual void showPixels(PixelController< RGB_ORDER, LANES, MASK > &pixels) override
Send the LED data to the strip.
void ensureBuffer(int32_t num_leds)
RGBWEmulatedController(const Rgbw &rgbw=RgbwDefault())
static const uint32_t MASK
CONTROLLER ControllerBaseT
SM16703 controller class.
virtual void init()
Initialize the LED controller.
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
SPIOutput< DATA_PIN, CLOCK_PIN, SPI_SPEED > SPI
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.
SPIOutput< DATA_PIN, CLOCK_PIN, SPI_SPEED > SPI
virtual void init()
Initialize the controller.
CMinWait< 1000 > mWaitDelay
WS2811 controller class @ 400 KHz.
WS2811 controller class @ 800 KHz.
WS2812 controller class @ 800 KHz.
WS2815 controller class @ 400 KHz.
void * callBeginShowLeds(int size)
void callEndShowLeds(void *data)
void callShow(CRGB *data, int nLeds, uint8_t brightness)
static const uint32_t MASK
void ensureBuffer(int size_8bit)
virtual void * beginShowLeds(int size) override
virtual void showPixels(PixelController< RGB_ORDER, LANES, MASK > &pixels) override
Send the LED data to the strip.
void init() override
Initialize the LED controller.
WS2812Controller800Khz< DATA_PIN, RGB > ControllerBaseT
virtual void endShowLeds(void *data) override
Defines the red, green, and blue (RGB) pixel struct.
#define DISABLE_DITHER
Disable dithering.
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)
Defines color channel ordering enumerations.
#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_FORCE_INLINE
#define FASTLED_REGISTER
Helper macro to replace the deprecated 'register' keyword if we're using modern C++ where it's been r...
#define FASTLED_NAMESPACE_END
Implements the FastLED namespace macros.
FiveBitGammaCorrectionMode
@ kFiveBitGammaCorrectionMode_Null
@ kFiveBitGammaCorrectionMode_BitShift
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 void loadAndScale_WS2816_HD(uint16_t *s0_out, uint16_t *s1_out, uint16_t *s2_out)
FASTLED_FORCE_INLINE void loadAndScale_APA102_HD(uint8_t *b0_out, uint8_t *b1_out, uint8_t *b2_out, uint8_t *brightness_out)
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 void loadAndScaleRGB(uint8_t *b0_out, uint8_t *b1_out, uint8_t *b2_out)
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 loadAndScaleRGBW(Rgbw rgbw, uint8_t *b0_out, uint8_t *b1_out, uint8_t *b2_out, uint8_t *b3_out)
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.
static uint32_t size_as_rgb(uint32_t num_of_rgbw_pixels)