12#include "driver/gpio.h"
13#include "driver/rmt_tx.h"
14#include "driver/rmt_types.h"
26#define NUM_LEDS CONFIG_WS2812_NUM_LEDS
28#if CONFIG_WS2812_LED_TYPE_RGB
29#define WS2812_BITS_PER_LED 24
30#elif CONFIG_WS2812_LED_TYPE_RGBW
31#define WS2812_BITS_PER_LED 32
35#define WS2812_LED_BUFFER_ITEMS (NUM_LEDS * WS2812_BITS_PER_LED)
38#define WS2812_T0H CONFIG_WS2812_T0H
40#define WS2812_T1H CONFIG_WS2812_T1H
42#define WS2812_T0L CONFIG_WS2812_T0L
43#define WS2812_T1L CONFIG_WS2812_T1L
46#define WS2812_DEFAULT_BRIGHTNESS CONFIG_WS2812_DEFAULT_BRIGHTNESS
Desired colors for a chain of LEDs.
Definition ws2812_control.h:63
uint32_t leds[NUM_LEDS]
Definition ws2812_control.h:65
#define NUM_LEDS
Definition ws2812_control.h:26
esp_err_t ws2812_write_leds(struct led_state new_state)
Send LED colour data.
Definition ws2812_control.c:87
void ws2812_set_brightness(uint8_t brightness)
Set global brightness for subsequent transmissions.
Definition ws2812_control.c:110
esp_err_t ws2812_control_init(gpio_num_t gpio_num, int channel)
Initialise the RMT peripheral for WS2812 output.
Definition ws2812_control.c:43
RMT resources the driver requests per strip (shared by the C and C++ APIs).