13#include <hardware/dma.h>
14#include <hardware/pio.h>
15#include <hardware/structs/pio.h>
16#include <pico/stdio.h>
31using init_fn = void (*)(PIO pio, uint sm, uint offset, uint pin,
float freq);
35 void setup()
override;
49 void set_pio(
int pio_num) { pio_num ? this->
pio_ = pio1 : this->pio_ = pio0; }
81 inline static int num_instance[2];
82 inline static std::map<Chipset, bool> conf_count;
83 inline static std::map<Chipset, int> chipset_offsets;
84 inline static bool dma_chan_active[NUM_DMA_CHANNELS];
85 inline static struct semaphore dma_write_complete_sem[NUM_DMA_CHANNELS];
ESPColorCorrection correction_
void clear_effect_data(size_t num_leds)
Zero the effect data of the first num_leds LEDs; does nothing before the effect data is allocated.
ChannelColors channel_colors
Color accessor backed by a buffer whose contents have color correction applied.
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
This class is used to represent the capabilities of a light.
void clear_effect_data() override
void set_chipset(Chipset chipset)
void dump_config() override
void set_init_function(init_fn init)
const pio_program_t * program_
void set_num_leds(uint32_t num_leds)
void set_max_refresh_rate(float interval_us)
void set_channel_colors(light::ChannelColors channel_colors)
void write_state(light::LightState *state) override
light::CorrectedBufferColorAccessor internal_accessor_
int32_t size() const override
float get_setup_priority() const override
dma_channel_config dma_config_
size_t get_buffer_size_() const
light::LightTraits get_traits() override
static void dma_write_complete_handler()
void set_pin(uint8_t pin)
void set_program(const pio_program_t *program)
void set_pio(int pio_num)
void(*)(PIO pio, uint sm, uint offset, uint pin, float freq) init_fn
Which byte of an addressable LED's data carries each colour.
size_t bytes_per_led() const
LightTraits traits() const
Colour modes of a strip with this channel order.