FastLED 3.9.15
Loading...
Searching...
No Matches
ws2812.h File Reference

Detailed Description

WS2812/WS2812B/WS2813/NeoPixel encoder.

Free function encoder for WS2812 family chipsets. Supports both RGB (3 bytes/LED) and RGBW (4 bytes/LED) modes.

Protocol:

  • RGB mode: 3 bytes per LED (R, G, B)
  • RGBW mode: 4 bytes per LED (R, G, B, W)
  • No frame overhead (timing-based protocol)
  • Uses PWM timing on a single data line (not SPI)
Note
This is a simple byte-streaming protocol - actual timing is handled by the chipset driver (RMT, SPI emulation, bitbang, etc.)

Definition in file ws2812.h.

+ Include dependency graph for ws2812.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  fl
 Base definition for an LED controller.
 

Functions

template<typename InputIterator, typename OutputIterator>
void fl::encodeWS2812 (InputIterator first, InputIterator last, OutputIterator out, const Rgbw &rgbw) FL_NOEXCEPT
 Encode pixel data in WS2812 format (automatic RGB/RGBW selection)
 
template<typename InputIterator, typename OutputIterator>
void fl::encodeWS2812_RGB (InputIterator first, InputIterator last, OutputIterator out) FL_NOEXCEPT
 Encode 3-byte pixel data in WS2812 format.
 
template<typename InputIterator, typename OutputIterator>
void fl::encodeWS2812_RGBW (InputIterator first, InputIterator last, OutputIterator out) FL_NOEXCEPT
 Encode 4-byte pixel data in WS2812 format.
 
template<typename InputIterator, typename OutputIterator>
void fl::encodeWS2812_RGBWW (InputIterator first, InputIterator last, OutputIterator out) FL_NOEXCEPT
 Encode 5-byte pixel data in WS2812 format (issue #2558, RGBWW).