tweaked library for debug but have to commit to publish...

Dependents:   ChrisRGB-Ring

Fork of WS2812 by Chris Styles

Files at this revision

API Documentation at this revision

Comitter:
michaeljkoster
Date:
Wed Aug 20 16:36:09 2014 +0000
Parent:
5:a07522fe36d4
Commit message:
outputs clock on K64F pin, tweak output word constants for debug

Changed in this revision

WS2812.cpp Show annotated file Show diff for this revision Revisions of this file
WS2812.h Show annotated file Show diff for this revision Revisions of this file
--- a/WS2812.cpp	Mon Aug 18 13:25:57 2014 +0000
+++ b/WS2812.cpp	Wed Aug 20 16:36:09 2014 +0000
@@ -1,6 +1,7 @@
 #include "WS2812.h"
 
-WS2812::WS2812(PinName d, int size) : __spi(d, NC, NC)
+//WS2812::WS2812(PinName d, int size) : __spi(d, NC, NC)
+WS2812::WS2812(PinName d, int size) : __spi(d, NC, PTD1) // output the clock for scope test
 {
     __size = size;
     __spi.format(SPIBPF,0);
--- a/WS2812.h	Mon Aug 18 13:25:57 2014 +0000
+++ b/WS2812.h	Wed Aug 20 16:36:09 2014 +0000
@@ -21,9 +21,14 @@
 
 #include "mbed.h"
 
-#define WS1 0x38
-#define WS0 0x30
-#define SPICLK 5000000
+//#define WS1 0x38 orig
+//#define WS1 0x3E works
+#define WS1 0xC1
+//#define WS0 0x30 orig
+//#define WS0 0x20 works
+#define WS0 0xDF
+
+#define SPICLK 5000000 // orig was 5000000
 #define SPIBPF 6