FastLED 3.6.0
Loading...
Searching...
No Matches
chipsets.h
Go to the documentation of this file.
1#ifndef __INC_CHIPSETS_H
2#define __INC_CHIPSETS_H
3
4#include "FastLED.h"
5#include "pixeltypes.h"
6
9
10FASTLED_NAMESPACE_BEGIN
11
16
17#if defined(ARDUINO) //&& defined(SoftwareSerial_h)
18
19
20#if defined(SoftwareSerial_h) || defined(__SoftwareSerial_h)
21#include <SoftwareSerial.h>
22
23#define HAS_PIXIE
24
28template<uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
29class PixieController : public CPixelLEDController<RGB_ORDER> {
30 SoftwareSerial Serial;
31 CMinWait<2000> mWait;
32
33public:
34 PixieController() : Serial(-1, DATA_PIN) {}
35
36protected:
38 virtual void init() {
39 Serial.begin(115200);
40 mWait.mark();
41 }
42
44 virtual void showPixels(PixelController<RGB_ORDER> & pixels) {
45 mWait.wait();
46 while(pixels.has(1)) {
47 uint8_t r = pixels.loadAndScale0();
48 Serial.write(r);
49 uint8_t g = pixels.loadAndScale1();
50 Serial.write(g);
51 uint8_t b = pixels.loadAndScale2();
52 Serial.write(b);
53 pixels.advanceData();
54 pixels.stepDithering();
55 }
56 mWait.mark();
57 }
58
59};
60
61// template<SoftwareSerial & STREAM, EOrder RGB_ORDER = RGB>
62// class PixieController : public PixieBaseController<STREAM, RGB_ORDER> {
63// public:
64// virtual void init() {
65// STREAM.begin(115200);
66// }
67// };
68#endif
69#endif
70
74
76//
77// LPD8806 controller class - takes data/clock/select pin values (N.B. should take an SPI definition?)
78//
80
86template <uint8_t DATA_PIN, uint8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, uint32_t SPI_SPEED = DATA_RATE_MHZ(12) >
87class LPD8806Controller : public CPixelLEDController<RGB_ORDER> {
89
90 class LPD8806_ADJUST {
91 public:
92 // LPD8806 spec wants the high bit of every rgb data byte sent out to be set.
93 __attribute__((always_inline)) inline static uint8_t adjust(FASTLED_REGISTER uint8_t data) { return ((data>>1) | 0x80) + ((data && (data<254)) & 0x01); }
94 __attribute__((always_inline)) inline static void postBlock(int len) {
95 SPI::writeBytesValueRaw(0, ((len*3+63)>>6));
96 }
97
98 };
99
100 SPI mSPI;
101
102public:
104 virtual void init() {
105 mSPI.init();
106 }
107
108protected:
109
111 virtual void showPixels(PixelController<RGB_ORDER> & pixels) {
112 mSPI.template writePixels<0, LPD8806_ADJUST, RGB_ORDER>(pixels);
113 }
114};
115
116
118//
119// WS2801 definition - takes data/clock/select pin values (N.B. should take an SPI definition?)
120//
122
128template <uint8_t DATA_PIN, uint8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, uint32_t SPI_SPEED = DATA_RATE_MHZ(1)>
129class WS2801Controller : public CPixelLEDController<RGB_ORDER> {
131 SPI mSPI;
132 CMinWait<1000> mWaitDelay;
133
134public:
136
138 virtual void init() {
139 mSPI.init();
140 mWaitDelay.mark();
141 }
142
143protected:
144
146 virtual void showPixels(PixelController<RGB_ORDER> & pixels) {
147 mWaitDelay.wait();
148 mSPI.template writePixels<0, DATA_NOP, RGB_ORDER>(pixels);
149 mWaitDelay.mark();
150 }
151};
152
155template <uint8_t DATA_PIN, uint8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, uint32_t SPI_SPEED = DATA_RATE_MHZ(25)>
156class WS2803Controller : public WS2801Controller<DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED> {};
157
166template <uint8_t DATA_PIN, uint8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, uint32_t SPI_SPEED = DATA_RATE_MHZ(12)>
167class LPD6803Controller : public CPixelLEDController<RGB_ORDER> {
169 SPI mSPI;
170
171 void startBoundary() { mSPI.writeByte(0); mSPI.writeByte(0); mSPI.writeByte(0); mSPI.writeByte(0); }
172 void endBoundary(int nLeds) { int nDWords = (nLeds/32); do { mSPI.writeByte(0xFF); mSPI.writeByte(0x00); mSPI.writeByte(0x00); mSPI.writeByte(0x00); } while(nDWords--); }
173
174public:
176
177 virtual void init() {
178 mSPI.init();
179 }
180
181protected:
183 virtual void showPixels(PixelController<RGB_ORDER> & pixels) {
184 mSPI.select();
185
186 startBoundary();
187 while(pixels.has(1)) {
188 FASTLED_REGISTER uint16_t command;
189 command = 0x8000;
190 command |= (pixels.loadAndScale0() & 0xF8) << 7; // red is the high 5 bits
191 command |= (pixels.loadAndScale1() & 0xF8) << 2; // green is the middle 5 bits
192 mSPI.writeByte((command >> 8) & 0xFF);
193 command |= pixels.loadAndScale2() >> 3 ; // blue is the low 5 bits
194 mSPI.writeByte(command & 0xFF);
195
196 pixels.stepDithering();
197 pixels.advanceData();
198 }
199 endBoundary(pixels.size());
200 mSPI.waitFully();
201 mSPI.release();
202 }
203
204};
205
207//
208// APA102 definition - takes data/clock/select pin values (N.B. should take an SPI definition?)
209//
211
217template <uint8_t DATA_PIN, uint8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, uint32_t SPI_SPEED = DATA_RATE_MHZ(12)>
218class APA102Controller : public CPixelLEDController<RGB_ORDER> {
220 SPI mSPI;
221
222 void startBoundary() { mSPI.writeWord(0); mSPI.writeWord(0); }
223 void endBoundary(int nLeds) { int nDWords = (nLeds/32); do { mSPI.writeByte(0xFF); mSPI.writeByte(0x00); mSPI.writeByte(0x00); mSPI.writeByte(0x00); } while(nDWords--); }
224
225 inline void writeLed(uint8_t brightness, uint8_t b0, uint8_t b1, uint8_t b2) __attribute__((always_inline)) {
226#ifdef FASTLED_SPI_BYTE_ONLY
227 mSPI.writeByte(0xE0 | brightness);
228 mSPI.writeByte(b0);
229 mSPI.writeByte(b1);
230 mSPI.writeByte(b2);
231#else
232 uint16_t b = 0xE000 | (brightness << 8) | (uint16_t)b0;
233 mSPI.writeWord(b);
234 uint16_t w = b1 << 8;
235 w |= b2;
236 mSPI.writeWord(w);
237#endif
238 }
239
240public:
242
243 virtual void init() {
244 mSPI.init();
245 }
246
247protected:
249 virtual void showPixels(PixelController<RGB_ORDER> & pixels) {
250 mSPI.select();
251
252 uint8_t s0 = pixels.getScale0(), s1 = pixels.getScale1(), s2 = pixels.getScale2();
253#if FASTLED_USE_GLOBAL_BRIGHTNESS == 1
254 const uint16_t maxBrightness = 0x1F;
255 uint16_t brightness = ((((uint16_t)max(max(s0, s1), s2) + 1) * maxBrightness - 1) >> 8) + 1;
256 s0 = (maxBrightness * s0 + (brightness >> 1)) / brightness;
257 s1 = (maxBrightness * s1 + (brightness >> 1)) / brightness;
258 s2 = (maxBrightness * s2 + (brightness >> 1)) / brightness;
259#else
260 const uint8_t brightness = 0x1F;
261#endif
262
263 startBoundary();
264 while (pixels.has(1)) {
265 writeLed(brightness, pixels.loadAndScale0(0, s0), pixels.loadAndScale1(0, s1), pixels.loadAndScale2(0, s2));
266 pixels.stepDithering();
267 pixels.advanceData();
268 }
269 endBoundary(pixels.size());
270
271 mSPI.waitFully();
272 mSPI.release();
273 }
274
275};
276
282template <uint8_t DATA_PIN, uint8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, uint32_t SPI_SPEED = DATA_RATE_MHZ(24)>
283class SK9822Controller : public CPixelLEDController<RGB_ORDER> {
285 SPI mSPI;
286
287 void startBoundary() { mSPI.writeWord(0); mSPI.writeWord(0); }
288 void endBoundary(int nLeds) { int nLongWords = (nLeds/32); do { mSPI.writeByte(0x00); mSPI.writeByte(0x00); mSPI.writeByte(0x00); mSPI.writeByte(0x00); } while(nLongWords--); }
289
290 inline void writeLed(uint8_t brightness, uint8_t b0, uint8_t b1, uint8_t b2) __attribute__((always_inline)) {
291#ifdef FASTLED_SPI_BYTE_ONLY
292 mSPI.writeByte(0xE0 | brightness);
293 mSPI.writeByte(b0);
294 mSPI.writeByte(b1);
295 mSPI.writeByte(b2);
296#else
297 uint16_t b = 0xE000 | (brightness << 8) | (uint16_t)b0;
298 mSPI.writeWord(b);
299 uint16_t w = b1 << 8;
300 w |= b2;
301 mSPI.writeWord(w);
302#endif
303 }
304
305public:
307
308 virtual void init() {
309 mSPI.init();
310 }
311
312protected:
314 virtual void showPixels(PixelController<RGB_ORDER> & pixels) {
315 mSPI.select();
316
317 uint8_t s0 = pixels.getScale0(), s1 = pixels.getScale1(), s2 = pixels.getScale2();
318#if FASTLED_USE_GLOBAL_BRIGHTNESS == 1
319 const uint16_t maxBrightness = 0x1F;
320 uint16_t brightness = ((((uint16_t)max(max(s0, s1), s2) + 1) * maxBrightness - 1) >> 8) + 1;
321 s0 = (maxBrightness * s0 + (brightness >> 1)) / brightness;
322 s1 = (maxBrightness * s1 + (brightness >> 1)) / brightness;
323 s2 = (maxBrightness * s2 + (brightness >> 1)) / brightness;
324#else
325 const uint8_t brightness = 0x1F;
326#endif
327
328 startBoundary();
329 while (pixels.has(1)) {
330 writeLed(brightness, pixels.loadAndScale0(0, s0), pixels.loadAndScale1(0, s1), pixels.loadAndScale2(0, s2));
331 pixels.stepDithering();
332 pixels.advanceData();
333 }
334
335 endBoundary(pixels.size());
336
337 mSPI.waitFully();
338 mSPI.release();
339 }
340
341};
342
343
344
346//
347// P9813 definition - takes data/clock/select pin values (N.B. should take an SPI definition?)
348//
350
356template <uint8_t DATA_PIN, uint8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, uint32_t SPI_SPEED = DATA_RATE_MHZ(10)>
357class P9813Controller : public CPixelLEDController<RGB_ORDER> {
359 SPI mSPI;
360
361 void writeBoundary() { mSPI.writeWord(0); mSPI.writeWord(0); }
362
363 inline void writeLed(uint8_t r, uint8_t g, uint8_t b) __attribute__((always_inline)) {
364 FASTLED_REGISTER uint8_t top = 0xC0 | ((~b & 0xC0) >> 2) | ((~g & 0xC0) >> 4) | ((~r & 0xC0) >> 6);
365 mSPI.writeByte(top); mSPI.writeByte(b); mSPI.writeByte(g); mSPI.writeByte(r);
366 }
367
368public:
369 P9813Controller() {}
370
371 virtual void init() {
372 mSPI.init();
373 }
374
375protected:
377 virtual void showPixels(PixelController<RGB_ORDER> & pixels) {
378 mSPI.select();
379
380 writeBoundary();
381 while(pixels.has(1)) {
382 writeLed(pixels.loadAndScale0(), pixels.loadAndScale1(), pixels.loadAndScale2());
383 pixels.advanceData();
384 pixels.stepDithering();
385 }
386 writeBoundary();
387 mSPI.waitFully();
388
389 mSPI.release();
390 }
391
392};
393
394
396//
397// SM16716 definition - takes data/clock/select pin values (N.B. should take an SPI definition?)
398//
400
406template <uint8_t DATA_PIN, uint8_t CLOCK_PIN, EOrder RGB_ORDER = RGB, uint32_t SPI_SPEED = DATA_RATE_MHZ(16)>
407class SM16716Controller : public CPixelLEDController<RGB_ORDER> {
409 SPI mSPI;
410
411 void writeHeader() {
412 // Write out 50 zeros to the spi line (6 blocks of 8 followed by two single bit writes)
413 mSPI.select();
414 mSPI.template writeBit<0>(0);
415 mSPI.writeByte(0);
416 mSPI.writeByte(0);
417 mSPI.writeByte(0);
418 mSPI.template writeBit<0>(0);
419 mSPI.writeByte(0);
420 mSPI.writeByte(0);
421 mSPI.writeByte(0);
422 mSPI.waitFully();
423 mSPI.release();
424 }
425
426public:
428
429 virtual void init() {
430 mSPI.init();
431 }
432
433protected:
435 virtual void showPixels(PixelController<RGB_ORDER> & pixels) {
436 // Make sure the FLAG_START_BIT flag is set to ensure that an extra 1 bit is sent at the start
437 // of each triplet of bytes for rgb data
438 // writeHeader();
439 mSPI.template writePixels<FLAG_START_BIT, DATA_NOP, RGB_ORDER>( pixels );
440 writeHeader();
441 }
442
443};
444
446
447
449//
450// Clockless template instantiations - see clockless.h for how the timing values are used
451//
452
453#ifdef FASTLED_HAS_CLOCKLESS
475
476// Allow clock that clockless controller is based on to have different
477// frequency than the CPU.
478#if !defined(CLOCKLESS_FREQUENCY)
479 #define CLOCKLESS_FREQUENCY F_CPU
480#endif
481
482// We want to force all avr's to use the Trinket controller when running at 8Mhz, because even the 328's at 8Mhz
483// need the more tightly defined timeframes.
484#if defined(__LGT8F__) || (CLOCKLESS_FREQUENCY == 8000000 || CLOCKLESS_FREQUENCY == 16000000 || CLOCKLESS_FREQUENCY == 24000000) || defined(FASTLED_DOXYGEN) // || CLOCKLESS_FREQUENCY == 48000000 || CLOCKLESS_FREQUENCY == 96000000) // 125ns/clock
485
488#define FMUL (CLOCKLESS_FREQUENCY/8000000)
489
492template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
493class GE8822Controller800Khz : public ClocklessController<DATA_PIN, 3 * FMUL, 5 * FMUL, 3 * FMUL, RGB_ORDER, 4> {};
494
497template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
498class LPD1886Controller1250Khz : public ClocklessController<DATA_PIN, 2 * FMUL, 3 * FMUL, 2 * FMUL, RGB_ORDER, 4> {};
499
502template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
503class LPD1886Controller1250Khz_8bit : public ClocklessController<DATA_PIN, 2 * FMUL, 3 * FMUL, 2 * FMUL, RGB_ORDER> {};
504
508template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
509class WS2812Controller800Khz : public ClocklessController<DATA_PIN, 2 * FMUL, 5 * FMUL, 3 * FMUL, RGB_ORDER> {};
510
513template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
514class WS2811Controller800Khz : public ClocklessController<DATA_PIN, 3 * FMUL, 4 * FMUL, 3 * FMUL, RGB_ORDER> {};
515
518template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
519class DP1903Controller800Khz : public ClocklessController<DATA_PIN, 2 * FMUL, 8 * FMUL, 2 * FMUL, RGB_ORDER> {};
520
523template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
524class DP1903Controller400Khz : public ClocklessController<DATA_PIN, 4 * FMUL, 16 * FMUL, 4 * FMUL, RGB_ORDER> {};
525
528template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB> //not tested
529class WS2813Controller : public ClocklessController<DATA_PIN, 3 * FMUL, 4 * FMUL, 3 * FMUL, RGB_ORDER> {};
530
533template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
534class WS2811Controller400Khz : public ClocklessController<DATA_PIN, 4 * FMUL, 10 * FMUL, 6 * FMUL, RGB_ORDER> {};
535
538template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
539class SK6822Controller : public ClocklessController<DATA_PIN, 3 * FMUL, 8 * FMUL, 3 * FMUL, RGB_ORDER> {};
540
543template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
544class SM16703Controller : public ClocklessController<DATA_PIN, 3 * FMUL, 4 * FMUL, 3 * FMUL, RGB_ORDER> {};
545
548template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
549class SK6812Controller : public ClocklessController<DATA_PIN, 3 * FMUL, 3 * FMUL, 4 * FMUL, RGB_ORDER> {};
550
553template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
554class UCS1903Controller400Khz : public ClocklessController<DATA_PIN, 4 * FMUL, 12 * FMUL, 4 * FMUL, RGB_ORDER> {};
555
558template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
559class UCS1903BController800Khz : public ClocklessController<DATA_PIN, 2 * FMUL, 4 * FMUL, 4 * FMUL, RGB_ORDER> {};
560
563template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
564class UCS1904Controller800Khz : public ClocklessController<DATA_PIN, 3 * FMUL, 3 * FMUL, 4 * FMUL, RGB_ORDER> {};
565
568template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
569class UCS2903Controller : public ClocklessController<DATA_PIN, 2 * FMUL, 6 * FMUL, 2 * FMUL, RGB_ORDER> {};
570
573template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
574class TM1809Controller800Khz : public ClocklessController<DATA_PIN, 2 * FMUL, 5 * FMUL, 3 * FMUL, RGB_ORDER> {};
575
578template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
579class TM1803Controller400Khz : public ClocklessController<DATA_PIN, 6 * FMUL, 9 * FMUL, 6 * FMUL, RGB_ORDER> {};
580
583template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
584class TM1829Controller800Khz : public ClocklessController<DATA_PIN, 2 * FMUL, 5 * FMUL, 3 * FMUL, RGB_ORDER, 0, true, 500> {};
585
588template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
589class GW6205Controller400Khz : public ClocklessController<DATA_PIN, 6 * FMUL, 7 * FMUL, 6 * FMUL, RGB_ORDER, 4> {};
590
593template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
594class GW6205Controller800Khz : public ClocklessController<DATA_PIN, 2 * FMUL, 4 * FMUL, 4 * FMUL, RGB_ORDER, 4> {};
595
598template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
599class PL9823Controller : public ClocklessController<DATA_PIN, 3 * FMUL, 8 * FMUL, 3 * FMUL, RGB_ORDER> {};
600
601#else
602
605#ifdef FASTLED_TEENSY4
606// just use raw nanosecond values for the teensy4
607#define C_NS(_NS) _NS
608#else
609#define C_NS(_NS) (((_NS * ((CLOCKLESS_FREQUENCY / 1000000L)) + 999)) / 1000)
610#endif
611
612// GE8822 - 350ns 660ns 350ns
613template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
614class GE8822Controller800Khz : public ClocklessController<DATA_PIN, C_NS(350), C_NS(660), C_NS(350), RGB_ORDER, 4> {};
615
616// GW6205@400khz - 800ns, 800ns, 800ns
617template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
618class GW6205Controller400Khz : public ClocklessController<DATA_PIN, C_NS(800), C_NS(800), C_NS(800), RGB_ORDER, 4> {};
619
620// GW6205@400khz - 400ns, 400ns, 400ns
621template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
622class GW6205Controller800Khz : public ClocklessController<DATA_PIN, C_NS(400), C_NS(400), C_NS(400), RGB_ORDER, 4> {};
623
624// UCS1903 - 500ns, 1500ns, 500ns
625template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
626class UCS1903Controller400Khz : public ClocklessController<DATA_PIN, C_NS(500), C_NS(1500), C_NS(500), RGB_ORDER> {};
627
628// UCS1903B - 400ns, 450ns, 450ns
629template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
630class UCS1903BController800Khz : public ClocklessController<DATA_PIN, C_NS(400), C_NS(450), C_NS(450), RGB_ORDER> {};
631
632// UCS1904 - 400ns, 400ns, 450ns
633template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
634class UCS1904Controller800Khz : public ClocklessController<DATA_PIN, C_NS(400), C_NS(400), C_NS(450), RGB_ORDER> {};
635
636// UCS2903 - 250ns, 750ns, 250ns
637template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
638class UCS2903Controller : public ClocklessController<DATA_PIN, C_NS(250), C_NS(750), C_NS(250), RGB_ORDER> {};
639
640// TM1809 - 350ns, 350ns, 550ns
641template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
642class TM1809Controller800Khz : public ClocklessController<DATA_PIN, C_NS(350), C_NS(350), C_NS(450), RGB_ORDER> {};
643
644// WS2811 - 320ns, 320ns, 640ns
645template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
646class WS2811Controller800Khz : public ClocklessController<DATA_PIN, C_NS(320), C_NS(320), C_NS(640), RGB_ORDER> {};
647
648// WS2813 - 320ns, 320ns, 640ns
649template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
650class WS2813Controller : public ClocklessController<DATA_PIN, C_NS(320), C_NS(320), C_NS(640), RGB_ORDER> {};
651
652// WS2812 - 250ns, 625ns, 375ns
653template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
654class WS2812Controller800Khz : public ClocklessController<DATA_PIN, C_NS(250), C_NS(625), C_NS(375), RGB_ORDER> {};
655
656// WS2811@400khz - 800ns, 800ns, 900ns
657template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
658class WS2811Controller400Khz : public ClocklessController<DATA_PIN, C_NS(800), C_NS(800), C_NS(900), RGB_ORDER> {};
659
660// 750NS, 750NS, 750NS
661template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
662class TM1803Controller400Khz : public ClocklessController<DATA_PIN, C_NS(700), C_NS(1100), C_NS(700), RGB_ORDER> {};
663
664template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
665class TM1829Controller800Khz : public ClocklessController<DATA_PIN, C_NS(340), C_NS(340), C_NS(550), RGB_ORDER, 0, true, 500> {};
666
667template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
668class TM1829Controller1600Khz : public ClocklessController<DATA_PIN, C_NS(100), C_NS(300), C_NS(200), RGB_ORDER, 0, true, 500> {};
669
670template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
671class LPD1886Controller1250Khz : public ClocklessController<DATA_PIN, C_NS(200), C_NS(400), C_NS(200), RGB_ORDER, 4> {};
672
673template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
674class LPD1886Controller1250Khz_8bit : public ClocklessController<DATA_PIN, C_NS(200), C_NS(400), C_NS(200), RGB_ORDER> {};
675
676
677template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
678class SK6822Controller : public ClocklessController<DATA_PIN, C_NS(375), C_NS(1000), C_NS(375), RGB_ORDER> {};
679
680template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
681class SK6812Controller : public ClocklessController<DATA_PIN, C_NS(300), C_NS(300), C_NS(600), RGB_ORDER> {};
682
683template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
684class SM16703Controller : public ClocklessController<DATA_PIN, C_NS(300), C_NS(600), C_NS(300), RGB_ORDER> {};
685
686template <uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
687class PL9823Controller : public ClocklessController<DATA_PIN, C_NS(350), C_NS(1010), C_NS(350), RGB_ORDER> {};
688#endif
690
691#endif
693
694FASTLED_NAMESPACE_END
695
696#endif
central include file for FastLED, defines the CFastLED class/object
APA102 controller class.
Definition chipsets.h:218
virtual void init()
Initialize the LED controller.
Definition chipsets.h:243
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
Definition chipsets.h:249
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.
Definition controller.h:616
virtual void showPixels(PixelController< RGB_ORDER, LANES, MASK > &pixels)=0
Send the LED data to the strip.
DP1903 controller class @ 400 KHz.
Definition chipsets.h:524
DP1903 controller class @ 800 KHz.
Definition chipsets.h:519
GE8822 controller class.
Definition chipsets.h:493
GW6205 controller class @ 400 KHz.
Definition chipsets.h:589
UCS1904 controller class @ 800 KHz.
Definition chipsets.h:594
LPD1886 controller class.
Definition chipsets.h:503
LPD1886 controller class.
Definition chipsets.h:498
LPD6803 controller class (LPD1101).
Definition chipsets.h:167
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
Definition chipsets.h:183
virtual void init()
Initialize the LED controller.
Definition chipsets.h:177
LPD8806 controller class.
Definition chipsets.h:87
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
Definition chipsets.h:111
virtual void init()
Initialize the LED controller.
Definition chipsets.h:104
P9813 controller class.
Definition chipsets.h:357
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
Definition chipsets.h:377
virtual void init()
Initialize the LED controller.
Definition chipsets.h:371
PL9823 controller class.
Definition chipsets.h:599
SK6812 controller class.
Definition chipsets.h:549
SK6822 controller class.
Definition chipsets.h:539
SK9822 controller class.
Definition chipsets.h:283
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
Definition chipsets.h:314
virtual void init()
Initialize the LED controller.
Definition chipsets.h:308
SM16703 controller class.
Definition chipsets.h:544
SM16716 controller class.
Definition chipsets.h:407
virtual void init()
Initialize the LED controller.
Definition chipsets.h:429
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
Definition chipsets.h:435
Hardware SPI output.
Definition fastspi.h:40
TM1803 controller class.
Definition chipsets.h:579
TM1809 controller class.
Definition chipsets.h:574
TM1829 controller class.
Definition chipsets.h:584
UCS1903B controller class.
Definition chipsets.h:559
UCS1903 controller class @ 400 KHz.
Definition chipsets.h:554
UCS1904 controller class.
Definition chipsets.h:564
UCS2903 controller class.
Definition chipsets.h:569
WS2801 controller class.
Definition chipsets.h:129
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
Definition chipsets.h:146
virtual void init()
Initialize the controller.
Definition chipsets.h:138
WS2803 controller class.
Definition chipsets.h:156
WS2811 controller class @ 400 KHz.
Definition chipsets.h:534
WS2811 controller class @ 800 KHz.
Definition chipsets.h:514
WS2812 controller class @ 800 KHz.
Definition chipsets.h:509
WS2813 controller class.
Definition chipsets.h:529
Definitions for pixel color data structs.
Pixel controller class.
Definition controller.h:259
uint8_t getScale1()
non-template alias of getscale<1>()
Definition controller.h:608
void stepDithering()
Step the dithering forward.
Definition controller.h:461
uint8_t loadAndScale0(int lane, uint8_t scale)
non-template alias of loadAndScale<0>()
Definition controller.h:589
void advanceData()
Advance the data pointer forward, adjust position counter.
Definition controller.h:457
int size()
Get the length of the LED strip.
Definition controller.h:446
uint8_t loadAndScale1(int lane, uint8_t scale)
non-template alias of loadAndScale<1>()
Definition controller.h:590
uint8_t getScale0()
non-template alias of getscale<0>()
Definition controller.h:607
uint8_t loadAndScale2(int lane, uint8_t scale)
non-template alias of loadAndScale<2>()
Definition controller.h:591
uint8_t getScale2()
non-template alias of getscale<2>()
Definition controller.h:609
bool has(int n)
Do we have n pixels left to process?
Definition controller.h:428