104#define WS281X_BYTES_PER_DEVICE (3U)
127#if defined(WS281X_HAVE_INIT) || defined(DOXYGEN)
176#if defined(WS281X_HAVE_PREPARE_TRANSMISSION) || defined(DOXYGEN)
190#if defined(WS281X_HAVE_END_TRANSMISSION) || defined(DOXYGEN)
Headers for the color handling module.
Low-level GPIO peripheral driver interface definitions.
static void ws281x_set(ws281x_t *dev, uint16_t index, color_rgb_t color)
Sets the color of an LED in the chain in the internal buffer.
static void ws281x_write(ws281x_t *dev)
Writes the internal buffer to the LED chain.
#define WS281X_BYTES_PER_DEVICE
The number of bytes to allocate in the data buffer per LED.
void ws281x_end_transmission(ws281x_t *dev)
Ends the transmission to the WS2812/SK6812 LED chain.
int ws281x_init(ws281x_t *dev, const ws281x_params_t *params)
Initialize an WS281x RGB LED chain.
void ws281x_prepare_transmission(ws281x_t *dev)
Sets up everything needed to write data to the WS281X LED chain.
void ws281x_write_buffer(ws281x_t *dev, const void *buf, size_t size)
Writes the color data of the user supplied buffer.
void ws281x_set_buffer(void *dest, uint16_t index, color_rgb_t color)
Sets the color of an LED in the given data buffer.
static void xtimer_usleep(uint32_t microseconds)
Pause the execution of a thread for some microseconds.
Data-structure describing a RGB color.
Struct to hold initialization parameters for a WS281x RGB LED.
gpio_t pin
GPIO connected to the data pin of the first LED.
uint8_t * buf
A statically allocated data buffer storing the state of the LEDs.
uint16_t numof
Number of chained RGB LEDs.
Device descriptor of a WS281x RGB LED chain.
ws281x_params_t params
Parameters of the LED chain.
Backend configuration for WS2812/SK6812 RGB LEDs.
Constants for WS2812/SK6812 RGB LEDs.
#define WS281X_T_END_US
Time in microseconds to pull the data line low to signal end of data.
xtimer interface definitions