Library for the WS2812 LED Driver. Uses bit banging and nops for precise timing. Number of nops executed are configurable at run time.
Diff: WS2812.h
- Revision:
- 2:6e647820f587
- Parent:
- 1:aadbf08c62a2
diff -r aadbf08c62a2 -r 6e647820f587 WS2812.h --- a/WS2812.h Thu Feb 12 20:20:10 2015 +0000 +++ b/WS2812.h Thu Feb 12 20:24:15 2015 +0000 @@ -62,7 +62,8 @@ void setDelays(int zeroHigh, int zeroLow, int oneHigh, int oneLow); /** - * Sets the timing parameters for the bit-banged signal + * Writes the given buffer to the LED strip with the given offsets. + * NOTE: This function is timing critical, therefore interrupts are disabled during the transmission section. * * @param buf Pointer to the PixelArray buffer * @param r_offset The offset where each each pixel pulls its red component. Wraps to beginning if end is reached. @@ -74,7 +75,8 @@ /** - * Write the given buffer to the LED strip + * Writes the given buffer to the LED strip + * NOTE: This function is timing critical, therefore interrupts are disabled during the transmission section. * * @param buf Pointer to the PixelArray buffer *