ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
led_strip.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef USE_BK72XX
4
11
13
15 public:
16 void setup() override;
17 void write_state(light::LightState *state) override;
18 float get_setup_priority() const override;
19
20 int32_t size() const override { return this->num_leds_; }
22
23 void set_pin(uint8_t pin) { this->pin_ = pin; }
24 void set_num_leds(uint16_t num_leds) { this->num_leds_ = num_leds; }
26 this->internal_accessor_.channel_colors = channel_colors;
27 }
28
30 void set_max_refresh_rate(uint32_t interval_us) { this->max_refresh_rate_ = interval_us; }
31
32 void set_led_params(uint8_t bit0, uint8_t bit1, uint32_t spi_frequency);
33
35
36 void dump_config() override;
37
38 protected:
40
42 uint8_t *dma_buf_{nullptr};
43
44 uint8_t pin_;
45 uint16_t num_leds_;
46
48 uint8_t bit0_{0xE0};
49 uint8_t bit1_{0xFC};
50
53};
54
55} // namespace esphome::beken_spi_led_strip
56
57#endif // USE_BK72XX
light::CorrectedBufferColorAccessor internal_accessor_
Definition led_strip.h:41
void set_led_params(uint8_t bit0, uint8_t bit1, uint32_t spi_frequency)
void set_channel_colors(light::ChannelColors channel_colors)
Definition led_strip.h:25
void write_state(light::LightState *state) override
void set_max_refresh_rate(uint32_t interval_us)
Set a maximum refresh rate in µs as some lights do not like being updated too often.
Definition led_strip.h:30
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.
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...
Definition light_state.h:68
This class is used to represent the capabilities of a light.
Definition light_traits.h:9
bool state
Definition fan.h:2
static void uint32_t
Which byte of an addressable LED's data carries each colour.
LightTraits traits() const
Colour modes of a strip with this channel order.