ESP32 Native version of Blinky, featureful controller code for WS2811/WS2812/NeoPixels
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #pragma once
-
- #include <freertos/queue.h>
-
- #include <driver/rmt_tx.h>
-
- #include "leds.hpp"
-
-
- struct ws2811_rmt_encoder : rmt_encoder_t {
- rmt_encoder_t *bytes_encoder;
- rmt_encoder_t *reset_encoder;
- bool bytes_encoded;
- };
-
- class RMT_LEDs : public LEDStrip {
- public:
- RMT_LEDs(int gpio, int length = 0);
- ~RMT_LEDs();
- void show();
- void length_changing(int len) { configure(len); }
-
- private:
- int gpio;
- rmt_channel_handle_t channel;
- ws2811_rmt_encoder encoder;
- QueueHandle_t queue;
-
- void configure(int length);
- };
|