10#include "ws2812_version.h"
17enum class LedType { RGB, RGBW };
34 explicit WS2812Strip(gpio_num_t gpio = (gpio_num_t)CONFIG_WS2812_LED_RMT_TX_GPIO,
35 int channel = CONFIG_WS2812_LED_RMT_TX_CHANNEL, uint32_t num_leds =
NUM_LEDS,
36#
if CONFIG_WS2812_LED_TYPE_RGBW
37 LedType type = LedType::RGBW,
39 LedType type = LedType::RGB,
58 void SetPixel(uint32_t index, uint32_t rgbw);
61 uint32_t Length()
const;
73 void SetBrightness(uint8_t value);
83 void SetNumLeds(uint32_t num_leds);
90 void SetTimings(uint16_t t0h, uint16_t t1h, uint16_t t0l, uint16_t t1l);
98 static uint32_t ColorWheel(uint8_t pos);
105 static constexpr const char* GetDriverVersion() noexcept {
106 return HF_WS2812_RMT_VERSION_STRING;
110 static constexpr uint8_t GetDriverVersionMajor() noexcept {
111 return HF_WS2812_RMT_VERSION_MAJOR;
115 static constexpr uint8_t GetDriverVersionMinor() noexcept {
116 return HF_WS2812_RMT_VERSION_MINOR;
120 static constexpr uint8_t GetDriverVersionPatch() noexcept {
121 return HF_WS2812_RMT_VERSION_PATCH;
125 std::vector<uint32_t> pixels_;
126 std::vector<rmt_symbol_word_t> buffer_;
140inline const char* GetWS2812DriverVersion() noexcept {
141 return HF_WS2812_RMT_VERSION_STRING;
Definition rmt_wrapper.hpp:50
A modern C++17 header‑only wrapper around the ESP‑IDF v5.3 “new” RMT.
ESP-IDF RMT based driver for WS2812 / NeoPixel LED chains.
#define WS2812_T1L
Definition ws2812_control.h:37
#define WS2812_T0L
Definition ws2812_control.h:36
#define NUM_LEDS
Definition ws2812_control.h:20
#define WS2812_T0H
Definition ws2812_control.h:32
#define WS2812_DEFAULT_BRIGHTNESS
Definition ws2812_control.h:40
#define WS2812_T1H
Definition ws2812_control.h:34