3#ifndef __INC_CHIPSETS_H
4#define __INC_CHIPSETS_H
16#ifndef FASTLED_CLOCKLESS_USES_NANOSECONDS
17 #if defined(FASTLED_TEENSY4)
18 #define FASTLED_CLOCKLESS_USES_NANOSECONDS 1
23 #define FASTLED_CLOCKLESS_USES_NANOSECONDS 1
25 #define FASTLED_CLOCKLESS_USES_NANOSECONDS 0
28 #define FASTLED_CLOCKLESS_USES_NANOSECONDS 0
34#include "platforms/arm/k20/clockless_objectfled.h"
50#if defined(SoftwareSerial_h) || defined(__SoftwareSerial_h)
51#include <SoftwareSerial.h>
60template<u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
62 SoftwareSerial Serial;
66 PixieController() : Serial(-1,
DATA_PIN) {}
78 while(pixels.
has(1)) {
115 CONTROLLER::MASK_VALUE> {
128 ControllerBaseT::show(data, nLeds,
brightness);
134 static const int LANES = CONTROLLER::LANES_VALUE;
135 static const uint32_t
MASK = CONTROLLER::MASK_VALUE;
138 static_assert(
RGB == CONTROLLER::RGB_ORDER_VALUE,
"The delegated controller MUST NOT do reordering");
157 uint8_t *data =
reinterpret_cast<uint8_t *
>(
mRGBWPixels);
158 while (pixels.
has(1)) {
201 for (uint32_t i = 0; i < new_size; i++) {
230template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(12) >
239 SPI* pSPI =
static_cast<SPI*
>(context);
257 mSPI.template writePixels<0, LPD8806_ADJUST, RGB_ORDER>(pixels, &
mSPI);
273template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(1)>
293 mSPI.template writePixels<0, DATA_NOP, RGB_ORDER>(pixels, NULL);
300template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(25)>
311template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(12)>
317 void endBoundary(
int nLeds) {
int nDWords = (nLeds/32);
do {
mSPI.writeByte(0xFF);
mSPI.writeByte(0x00);
mSPI.writeByte(0x00);
mSPI.writeByte(0x00); }
while(nDWords--); }
332 while(pixels.
has(1)) {
337 mSPI.writeByte((command >> 8) & 0xFF);
339 mSPI.writeByte(command & 0xFF);
372 uint32_t START_FRAME = 0x00000000,
373 uint32_t END_FRAME = 0xFF000000
380 mSPI.writeWord(START_FRAME >> 16);
381 mSPI.writeWord(START_FRAME & 0xFFFF);
384 int nDWords = (nLeds/32);
385 const uint8_t b0 = uint8_t(END_FRAME >> 24 & 0x000000ff);
386 const uint8_t b1 = uint8_t(END_FRAME >> 16 & 0x000000ff);
387 const uint8_t b2 = uint8_t(END_FRAME >> 8 & 0x000000ff);
388 const uint8_t b3 = uint8_t(END_FRAME >> 0 & 0x000000ff);
398#ifdef FASTLED_SPI_BYTE_ONLY
404 uint16_t b = 0xE000 | (
brightness << 8) | (uint16_t)b0;
406 uint16_t w = b1 << 8;
413#ifdef FASTLED_SPI_BYTE_ONLY
417 mSPI.writeWord(uint16_t(b1) << 8 | b2);
431 switch (GAMMA_CORRECTION_MODE) {
447 uint8_t* out_s0, uint8_t* out_s1, uint8_t* out_s2, uint8_t* out_brightness) {
448#if FASTLED_HD_COLOR_MIXING
450 pixels.getHdScale(out_s0, out_s1, out_s2, &
brightness);
452 static uint16_t map(uint16_t
x, uint16_t in_min, uint16_t in_max, uint16_t out_min, uint16_t out_max) {
453 const uint16_t run = in_max - in_min;
454 const uint16_t rise = out_max - out_min;
455 const uint16_t delta =
x - in_min;
456 return (delta * rise) / run + out_min;
460 uint16_t bri = Math::map(
brightness, 0, 255, 0, 31);
465 *out_brightness =
static_cast<uint8_t
>(bri);
470#if FASTLED_USE_GLOBAL_BRIGHTNESS == 1
472 const uint16_t maxBrightness = 0x1F;
473 uint16_t
brightness = ((((uint16_t)max(max(s0, s1), s2) + 1) * maxBrightness - 1) >> 8) + 1;
483 *out_brightness =
static_cast<uint8_t
>(
brightness);
490 uint8_t s0, s1, s2, global_brightness;
493 while (pixels.
has(1)) {
496 writeLed(global_brightness, c0, c1, c2);
509 while (pixels.
has(1)) {
544 fl::kFiveBitGammaCorrectionMode_BitShift,
545 uint32_t(0x00000000),
546 uint32_t(0x00000000)> {
568 fl::kFiveBitGammaCorrectionMode_Null,
590 fl::kFiveBitGammaCorrectionMode_BitShift,
609 fl::kFiveBitGammaCorrectionMode_Null,
640template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(10)>
648 FASTLED_REGISTER uint8_t top = 0xC0 | ((~b & 0xC0) >> 2) | ((~g & 0xC0) >> 4) | ((~r & 0xC0) >> 6);
649 mSPI.writeByte(top);
mSPI.writeByte(b);
mSPI.writeByte(g);
mSPI.writeByte(r);
665 while(pixels.
has(1)) {
690template <u
int8_t DATA_PIN, u
int8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, u
int32_t SPI_SPEED = DATA_RATE_MHZ(16)>
698 mSPI.template writeBit<0>(0);
702 mSPI.template writeBit<0>(0);
723 mSPI.template writePixels<FLAG_START_BIT, DATA_NOP, RGB_ORDER>(pixels, NULL);
737#ifdef FASTLED_HAS_CLOCKLESS
762#if !defined(CLOCKLESS_FREQUENCY)
763 #define CLOCKLESS_FREQUENCY F_CPU
768#if defined(__LGT8F__) || (CLOCKLESS_FREQUENCY == 8000000 || CLOCKLESS_FREQUENCY == 16000000 || CLOCKLESS_FREQUENCY == 24000000) || defined(FASTLED_DOXYGEN)
772#define FMUL (CLOCKLESS_FREQUENCY/8000000)
776template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
781template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
786template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
792template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
797template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
798class WS2815Controller :
public ClocklessController<DATA_PIN, 2 * FMUL, 9 * FMUL, 4 * FMUL, RGB_ORDER> {};
802template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
807template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
812template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
817template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
818class WS2813Controller :
public ClocklessController<DATA_PIN, 3 * FMUL, 4 * FMUL, 3 * FMUL, RGB_ORDER> {};
822template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
827template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
828class SK6822Controller :
public ClocklessController<DATA_PIN, 3 * FMUL, 8 * FMUL, 3 * FMUL, RGB_ORDER> {};
832template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
833class SM16703Controller :
public ClocklessController<DATA_PIN, 3 * FMUL, 4 * FMUL, 3 * FMUL, RGB_ORDER> {};
837template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
838class SK6812Controller :
public ClocklessController<DATA_PIN, 3 * FMUL, 3 * FMUL, 4 * FMUL, RGB_ORDER> {};
842template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
847template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
852template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
857template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
858class UCS2903Controller :
public ClocklessController<DATA_PIN, 2 * FMUL, 6 * FMUL, 2 * FMUL, RGB_ORDER> {};
862template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
867template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
872template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
873class TM1829Controller800Khz :
public ClocklessController<DATA_PIN, 2 * FMUL, 5 * FMUL, 3 * FMUL, RGB_ORDER, 0, true, 500> {};
877template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
882template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
887template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
888class PL9823Controller :
public ClocklessController<DATA_PIN, 3 * FMUL, 8 * FMUL, 3 * FMUL, RGB_ORDER> {};
891template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
892class UCS1912Controller :
public ClocklessController<DATA_PIN, 2 * FMUL, 8 * FMUL, 3 * FMUL, RGB_ORDER> {};
901#ifdef FASTLED_LED_OVERCLOCK
902#warning "FASTLED_LED_OVERCLOCK has been changed to FASTLED_OVERCLOCK. Please update your code."
903#define FASTLED_OVERCLOCK FASTLED_LED_OVERCLOCK
906#ifndef FASTLED_OVERCLOCK
907#define FASTLED_OVERCLOCK 1.0
909#ifndef FASTLED_OVERCLOCK_SUPPRESS_WARNING
910#warning "FASTLED_OVERCLOCK is now active, #define FASTLED_OVERCLOCK_SUPPRESS_WARNING to disable this warning"
919#ifndef FASTLED_OVERCLOCK_WS2812
920#define FASTLED_OVERCLOCK_WS2812 FASTLED_OVERCLOCK
923#ifndef FASTLED_OVERCLOCK_WS2811
924#define FASTLED_OVERCLOCK_WS2811 FASTLED_OVERCLOCK
927#ifndef FASTLED_OVERCLOCK_WS2813
928#define FASTLED_OVERCLOCK_WS2813 FASTLED_OVERCLOCK
931#ifndef FASTLED_OVERCLOCK_WS2815
932#define FASTLED_OVERCLOCK_WS2815 FASTLED_OVERCLOCK
935#ifndef FASTLED_OVERCLOCK_SK6822
936#define FASTLED_OVERCLOCK_SK6822 FASTLED_OVERCLOCK
939#ifndef FASTLED_OVERCLOCK_SK6812
940#define FASTLED_OVERCLOCK_SK6812 FASTLED_OVERCLOCK
945#if FASTLED_CLOCKLESS_USES_NANOSECONDS
949#define C_NS(_NS) (((_NS * ((CLOCKLESS_FREQUENCY / 1000000L)) + 999)) / 1000)
955#define C_NS_WS2812(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_WS2812)))
956#define C_NS_WS2811(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_WS2811)))
957#define C_NS_WS2813(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_WS2813)))
958#define C_NS_WS2815(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_WS2815)))
959#define C_NS_SK6822(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_SK6822)))
960#define C_NS_SK6812(_NS) (C_NS(int(_NS / FASTLED_OVERCLOCK_SK6812)))
993template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
994class GE8822Controller800Khz :
public ClocklessController<DATA_PIN, C_NS(350), C_NS(660), C_NS(350), RGB_ORDER, 4> {};
997template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
998class GW6205Controller400Khz :
public ClocklessController<DATA_PIN, C_NS(800), C_NS(800), C_NS(800), RGB_ORDER, 4> {};
1001template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1002class GW6205Controller800Khz :
public ClocklessController<DATA_PIN, C_NS(400), C_NS(400), C_NS(400), RGB_ORDER, 4> {};
1005template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1006class UCS1903Controller400Khz :
public ClocklessController<DATA_PIN, C_NS(500), C_NS(1500), C_NS(500), RGB_ORDER> {};
1009template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1010class UCS1903BController800Khz :
public ClocklessController<DATA_PIN, C_NS(400), C_NS(450), C_NS(450), RGB_ORDER> {};
1013template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1014class UCS1904Controller800Khz :
public ClocklessController<DATA_PIN, C_NS(400), C_NS(400), C_NS(450), RGB_ORDER> {};
1017template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1018class UCS2903Controller :
public ClocklessController<DATA_PIN, C_NS(250), C_NS(750), C_NS(250), RGB_ORDER> {};
1021template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1022class TM1809Controller800Khz :
public ClocklessController<DATA_PIN, C_NS(350), C_NS(350), C_NS(450), RGB_ORDER> {};
1025template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1026class WS2811Controller800Khz :
public ClocklessController<DATA_PIN, C_NS_WS2811(320), C_NS_WS2811(320), C_NS_WS2811(640), RGB_ORDER> {};
1029template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1030class WS2813Controller :
public ClocklessController<DATA_PIN, C_NS_WS2813(320), C_NS_WS2813(320), C_NS_WS2813(640), RGB_ORDER> {};
1032#ifndef FASTLED_WS2812_T1
1033#define FASTLED_WS2812_T1 250
1036#ifndef FASTLED_WS2812_T2
1037#define FASTLED_WS2812_T2 625
1040#ifndef FASTLED_WS2812_T3
1041#define FASTLED_WS2812_T3 375
1045#if defined(__IMXRT1062__) && !defined(FASTLED_NOT_USES_OBJECTFLED)
1046#if defined(FASTLED_USES_OBJECTFLED)
1047#warning "FASTLED_USES_OBJECTFLED is now implicit for Teensy 4.0/4.1 for WS2812 and is no longer needed."
1049template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1051 public fl::ClocklessController_ObjectFLED_WS2812<
1055 typedef fl::ClocklessController_ObjectFLED_WS2812<DATA_PIN, RGB_ORDER> Base;
1058#elif defined(FASTLED_USES_ESP32S3_I2S)
1059#include "platforms/esp/32/clockless_i2s_esp32s3.h"
1060template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1062 public fl::ClocklessController_I2S_Esp32_WS2812<
1068template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1071 C_NS_WS2812(FASTLED_WS2812_T1),
1072 C_NS_WS2812(FASTLED_WS2812_T2),
1073 C_NS_WS2812(FASTLED_WS2812_T3),
1079template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1080class WS2811Controller400Khz :
public ClocklessController<DATA_PIN, C_NS_WS2811(800), C_NS_WS2811(800), C_NS_WS2811(900), RGB_ORDER> {};
1082template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1083class WS2815Controller :
public ClocklessController<DATA_PIN, C_NS_WS2815(250), C_NS_WS2815(1090), C_NS_WS2815(550), RGB_ORDER> {};
1086template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1087class TM1803Controller400Khz :
public ClocklessController<DATA_PIN, C_NS(700), C_NS(1100), C_NS(700), RGB_ORDER> {};
1089template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1090class TM1829Controller800Khz :
public ClocklessController<DATA_PIN, C_NS(340), C_NS(340), C_NS(550), RGB_ORDER, 0, true, 500> {};
1092template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1093class TM1829Controller1600Khz :
public ClocklessController<DATA_PIN, C_NS(100), C_NS(300), C_NS(200), RGB_ORDER, 0, true, 500> {};
1095template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1096class LPD1886Controller1250Khz :
public ClocklessController<DATA_PIN, C_NS(200), C_NS(400), C_NS(200), RGB_ORDER, 4> {};
1098template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1102template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1103class SK6822Controller :
public ClocklessController<DATA_PIN, C_NS_SK6822(375), C_NS_SK6822(1000), C_NS_SK6822(375), RGB_ORDER> {};
1105template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1106class SK6812Controller :
public ClocklessController<DATA_PIN, C_NS_SK6812(300), C_NS_SK6812(300), C_NS_SK6812(600), RGB_ORDER> {};
1108template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1109class SM16703Controller :
public ClocklessController<DATA_PIN, C_NS(300), C_NS(600), C_NS(300), RGB_ORDER> {};
1111template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1112class PL9823Controller :
public ClocklessController<DATA_PIN, C_NS(350), C_NS(1010), C_NS(350), RGB_ORDER> {};
1115template <u
int8_t DATA_PIN, EOrder RGB_ORDER = RGB>
1116class UCS1912Controller :
public ClocklessController<DATA_PIN, C_NS(250), C_NS(1000), C_NS(350), RGB_ORDER> {};
1124template <u
int8_t DATA_PIN, EOrder RGB_ORDER = GRB>
1127 WS2812Controller800Khz<DATA_PIN, RGB>::LANES_VALUE,
1128 WS2812Controller800Khz<DATA_PIN, RGB>::MASK_VALUE> {
1143 ControllerBaseT::show(data, nLeds,
brightness);
1148 static const int LANES = ControllerT::LANES_VALUE;
1149 static const uint32_t
MASK = ControllerT::MASK_VALUE;
1175 size_t out_index = 0;
1176 while (pixels.
has(1)) {
1179 uint16_t s0, s1, s2;
1181 uint8_t b0_hi = s0 >> 8;
1182 uint8_t b0_lo = s0 & 0xFF;
1183 uint8_t b1_hi = s1 >> 8;
1184 uint8_t b1_lo = s1 & 0xFF;
1185 uint8_t b2_hi = s2 >> 8;
1186 uint8_t b2_lo = s2 & 0xFF;
1188 mData[out_index] =
CRGB(b0_hi, b0_lo, b1_hi);
1189 mData[out_index + 1] =
CRGB(b1_lo, b2_hi, b2_lo);
1202#ifdef BOUNCE_SUBCLASS
1217 int size_16bit = 2 * size_8bit;
1220 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_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.
#define FASTLED_REGISTER
Helper macro to replace the deprecated 'register' keyword if we're using modern C++ where it's been r...
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)