Library for the WS2812 LED Driver. Uses bit banging and nops for precise timing. Number of nops executed are configurable at run time.

Dependents:   MIP

Files at this revision

API Documentation at this revision

Comitter:
anna_dot
Date:
Wed May 19 18:54:40 2021 +0000
Parent:
2:6e647820f587
Commit message:
Error solved for frdm-kl25z

Changed in this revision

WS2812.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/WS2812.cpp	Thu Feb 12 20:24:15 2015 +0000
+++ b/WS2812.cpp	Wed May 19 18:54:40 2021 +0000
@@ -92,20 +92,20 @@
         if (__transmitBuf[i]){
             __gpo = 1;
             for (; j < __oneHigh; j++) {
-                __nop();
+                __NOP();
             }
             __gpo = 0;
             for (; j < __oneLow; j++) {
-                __nop();
+                __NOP();
             }
         } else {
             __gpo = 1;
             for (; j < __zeroHigh; j++) {
-                __nop();
+                __NOP();
             }
             __gpo = 0;
             for (; j < __zeroLow; j++) {
-                __nop();
+                __NOP();
             }
         }
     }