Loading...
Searching...
No Matches

Constants for WS2812/SK6812 RGB LEDs. More...

Detailed Description

Constants for WS2812/SK6812 RGB LEDs.

Author
Marian Buschsieweke maria.nosp@m.n.bu.nosp@m.schsi.nosp@m.ewek.nosp@m.e@ovg.nosp@m.u.de

Definition in file ws281x_constants.h.

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WS281X_T_END_US   (80U)
 Time in microseconds to pull the data line low to signal end of data.
 

Timing parameters for WS2812/SK6812 RGB LEDs

#define WS281X_T_DATA_NS   (1250U)
 Data transmission time in nanoseconds.
 
#define WS281X_T_DATA_ONE_NS   (650U)
 The high-times in nanoseconds.
 
#define WS281X_T_DATA_ZERO_NS   (325U)
 

Data encoding parameters for WS2812/SK6812 RGB LEDs

#define WS281X_OFFSET_R   (1U)
 Offset for the red color component.
 
#define WS281X_OFFSET_G   (0U)
 Offset for the green color component.
 
#define WS281X_OFFSET_B   (2U)
 Offset for the blue color component.
 

Macro Definition Documentation

◆ WS281X_OFFSET_B

#define WS281X_OFFSET_B   (2U)

Offset for the blue color component.

Definition at line 71 of file ws281x_constants.h.

◆ WS281X_OFFSET_G

#define WS281X_OFFSET_G   (0U)

Offset for the green color component.

Definition at line 67 of file ws281x_constants.h.

◆ WS281X_OFFSET_R

#define WS281X_OFFSET_R   (1U)

Offset for the red color component.

Definition at line 63 of file ws281x_constants.h.

◆ WS281X_T_DATA_NS

#define WS281X_T_DATA_NS   (1250U)

Data transmission time in nanoseconds.

For the SK6812, WS2812 and WS2812b this is 1.25 µs. This is the total time required to transmit one bit.

Definition at line 37 of file ws281x_constants.h.

◆ WS281X_T_DATA_ONE_NS

#define WS281X_T_DATA_ONE_NS   (650U)

The high-times in nanoseconds.

Definition at line 43 of file ws281x_constants.h.

◆ WS281X_T_DATA_ZERO_NS

#define WS281X_T_DATA_ZERO_NS   (325U)

Definition at line 44 of file ws281x_constants.h.

◆ WS281X_T_END_US

#define WS281X_T_END_US   (80U)

Time in microseconds to pull the data line low to signal end of data.

For the WS2812 it is ≥ 50µs, for the SK6812 it is ≥ 80µs. We choose 80µs to be compatible with both.

Definition at line 53 of file ws281x_constants.h.