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:
0:b3665f91bedc
Child:
1:741864ea11d4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wsDrive.h	Wed Nov 05 16:47:48 2014 +0000
@@ -0,0 +1,31 @@
+#ifndef __wsDrive_h__
+#define __wsDrive_h__
+
+#include "BurstSPI.h"
+
+
+typedef struct pixelInfo {
+    unsigned char G;
+    unsigned char R;
+    unsigned char B;
+} pixelInfo;
+
+
+class wsDrive : private BurstSPI
+{
+public:
+    wsDrive(PinName mosi, PinName miso, PinName clk);
+    void setData(pixelInfo *dataStart, uint16_t dataLen);
+    void sendData();
+    
+private:
+
+    void sendByte(unsigned char value);
+    void sendPixel(pixelInfo *pixToSend);
+    
+    pixelInfo *pixArray;
+    uint16_t pixelLen;
+
+};
+
+#endif
\ No newline at end of file