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

Revision:
3:d09a1ee509cc
Parent:
1:aadbf08c62a2
--- 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();
             }
         }
     }