12 #include <hardware/pio.h> 13 #include <hardware/structs/pio.h> 14 #include <pico/stdio.h> 17 namespace rp2040_pio_led_strip {
47 using init_fn = void (*)(PIO pio, uint sm, uint offset, uint pin,
float freq);
51 void setup()
override;
59 : traits.set_supported_color_modes({light::ColorMode::RGB});
68 void set_pio(
int pio_num) { pio_num ? this->
pio_ = pio1 : this->pio_ = pio0; }
74 for (
int i = 0; i < this->
size(); i++) {
void clear_effect_data() override
void set_max_refresh_rate(float interval_us)
void set_rgb_order(RGBOrder rgb_order)
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
void set_init_function(init_fn init)
light::LightTraits get_traits() override
void write_state(light::LightState *state) override
RGB color output and a separate white output.
void dump_config() override
const char * rgb_order_to_string(RGBOrder order)
void set_pio(int pio_num)
const pio_program_t * program_
void set_pin(uint8_t pin)
light::ESPColorView get_view_internal(int32_t index) const override
float get_setup_priority() const override
void set_num_leds(uint32_t num_leds)
size_t get_buffer_size_() const
void set_is_rgbw(bool is_rgbw)
White output only (use only if the light also has another color mode such as RGB).
void set_program(const pio_program_t *program)
This class is used to represent the capabilities of a light.
int32_t size() const override
void(*)(PIO pio, uint sm, uint offset, uint pin, float freq) init_fn
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...