driver for WS2812B LED, modified for better compatibility with LPC812 and LPC1549

Dependencies:   BurstSPI

Dependents:   RGB-balls cylon

Fork of wsDrive by Andy A

Revision:
4:c965e448d96b
Parent:
3:3c48065d20ff
Child:
6:270a9728ee29
diff -r 3c48065d20ff -r c965e448d96b wsDrive.cpp
--- a/wsDrive.cpp	Wed Nov 12 16:43:33 2014 +0000
+++ b/wsDrive.cpp	Sun Oct 09 16:49:21 2016 +0000
@@ -3,7 +3,9 @@
 wsDrive::wsDrive(PinName mosi, PinName miso, PinName clk) : BurstSPI(mosi,miso,clk)
 {
     frequency(2400000);
-    format(12);
+    format(12, 1);
+    //setFormat();
+
     pixArray = NULL;
     pixArray16 = NULL;
     pixelLen = 0;
@@ -25,11 +27,6 @@
 
 void wsDrive::sendData()
 {
-    frequency(2400000);
-    format(12);
-    setFormat();
-
-
     uint16_t pixIndex = 0;
     if (pixArray) {
         while (pixIndex < pixelLen) {