diff options
author | alex-Arc <alex@arc-light.dk> | 2016-07-19 11:11:38 +0300 |
---|---|---|
committer | alex-Arc <alex@arc-light.dk> | 2016-07-19 11:11:38 +0300 |
commit | 6fd07beed9e899a8e7b7a73aa37bc41fd7ac84b7 (patch) | |
tree | 05e5284db6efc5c4693557062c8cdaf59ac286b2 | |
parent | 8267d4daea282b19d50c50125bcfcce8a68c8bab (diff) |
Add ws2813
both as normal and OCTOWS
-rw-r--r-- | FastLED.h | 1 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | platforms/arm/k20/octows2811_controller.h | 8 |
3 files changed, 5 insertions, 6 deletions
@@ -351,6 +351,7 @@ public: switch(CHIPSET) { case OCTOWS2811: { static COctoWS2811Controller<RGB_ORDER> controller; return addLeds(&controller, data, nLedsOrOffset, nLedsIfOffset); } case OCTOWS2811_400: { static COctoWS2811Controller<RGB_ORDER,true> controller; return addLeds(&controller, data, nLedsOrOffset, nLedsIfOffset); } + case OCTOWS2813: { static COctoWS2811Controller<RGB_ORDER,true> controller; return addLeds(&controller, data, nLedsOrOffset, nLedsIfOffset); } } } @@ -42,7 +42,7 @@ How quickly can you get up and running with the library? Here's a simple blink Here's a list of all the LED chipsets are supported. More details on the led chipsets are included *TODO: Link to wiki page* * Adafruit's DotStars - AKA the APA102 -* Adafruit's Neopixel - aka the WS2812B (also WS2811/WS2812, also supported in lo-speed mode) - a 3 wire addressable led chipset +* Adafruit's Neopixel - aka the WS2812B (also WS2811/WS2812/WS2813, also supported in lo-speed mode) - a 3 wire addressable led chipset * TM1809/4 - 3 wire chipset, cheaply available on aliexpress.com * TM1803 - 3 wire chipset, sold by radio shack * UCS1903 - another 3 wire led chipset, cheap diff --git a/platforms/arm/k20/octows2811_controller.h b/platforms/arm/k20/octows2811_controller.h index ce959228..63f6d8f6 100644 --- a/platforms/arm/k20/octows2811_controller.h +++ b/platforms/arm/k20/octows2811_controller.h @@ -7,7 +7,7 @@ FASTLED_NAMESPACE_BEGIN -template<EOrder RGB_ORDER = GRB, boolean SLOW=false> +template<EOrder RGB_ORDER = GRB, uint8_t CHIP = WS2811_800kHz> class COctoWS2811Controller : public CPixelLEDController<RGB_ORDER, 8, 0xFF> { OctoWS2811 *pocto; uint8_t *drawbuffer,*framebuffer; @@ -19,9 +19,7 @@ class COctoWS2811Controller : public CPixelLEDController<RGB_ORDER, 8, 0xFF> { // byte ordering is handled in show by the pixel controller int config = WS2811_RGB; - if(SLOW) { - config |= WS2811_400kHz; - } + config |= CHIP; pocto = new OctoWS2811(nLeds, framebuffer, drawbuffer, config); @@ -39,7 +37,7 @@ public: uint32_t raw[2]; } Lines; - virtual void showPixels(PixelController<RGB_ORDER, 8, 0xFF> & pixels) { + virtual void showPixels(PixelController<RGB_ORDER, 8, 0xFF> & pixels) { _init(pixels.size()); uint8_t *pData = drawbuffer; |