7#include "driver/gpio.h"
8#include "driver/rmt_tx.h"
9#include "driver/rmt_types.h"
20#define NUM_LEDS CONFIG_WS2812_NUM_LEDS
22#if CONFIG_WS2812_LED_TYPE_RGB
23#define WS2812_BITS_PER_LED 24
24#elif CONFIG_WS2812_LED_TYPE_RGBW
25#define WS2812_BITS_PER_LED 32
29#define WS2812_LED_BUFFER_ITEMS (NUM_LEDS * WS2812_BITS_PER_LED)
32#define WS2812_T0H CONFIG_WS2812_T0H
34#define WS2812_T1H CONFIG_WS2812_T1H
36#define WS2812_T0L CONFIG_WS2812_T0L
37#define WS2812_T1L CONFIG_WS2812_T1L
40#define WS2812_DEFAULT_BRIGHTNESS CONFIG_WS2812_DEFAULT_BRIGHTNESS
Desired colors for a chain of LEDs.
Definition ws2812_control.h:56
uint32_t leds[NUM_LEDS]
Definition ws2812_control.h:58
#define NUM_LEDS
Definition ws2812_control.h:20
esp_err_t ws2812_write_leds(struct led_state new_state)
Send LED colour data.
Definition ws2812_control.c:91
void ws2812_set_brightness(uint8_t brightness)
Set global brightness for subsequent transmissions.
Definition ws2812_control.c:104
esp_err_t ws2812_control_init(gpio_num_t gpio_num, int channel)
Initialise the RMT peripheral for WS2812 output.
Definition ws2812_control.c:59