11 if (this->
buf_ ==
nullptr) {
12 ESP_LOGE(TAG,
"Failed to allocate buffer of size %u", this->
buffer_size_);
18 ESP_LOGE(TAG,
"Failed to allocate effect data of size %u", num_leds);
22 memset(this->
buf_, 0, 4);
42 esph_log_config(TAG,
" Data rate: %uMHz", (
unsigned) (this->
data_rate_ / 1000000));
44 esph_log_config(TAG,
" Data rate: %ukHz", (
unsigned) (this->
data_rate_ / 1000));
50#if ESPHOME_LOG_LEVEL >= ESPHOME_LOG_LEVEL_VERBOSE
55 esph_log_v(TAG,
"write_state: buf = %s", strbuf);
63 size_t pos = index * 4 + 5;
64 return {this->
buf_ + pos + 2, this->
buf_ + pos + 1, this->
buf_ + pos + 0,
nullptr,
void mark_failed()
Mark this component as failed.
An STL allocator that uses SPI or internal RAM.
ESPColorCorrection correction_
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 spi_setup() override
void write_array(const uint8_t *data, size_t length)
light::LightTraits get_traits() override
void dump_config() override
void write_state(light::LightState *state) override
light::ESPColorView get_view_internal(int32_t index) const override
SpiLedStrip(uint16_t num_leds)
char * format_hex_pretty_to(char *buffer, size_t buffer_size, const uint8_t *data, size_t length, char separator)
Format byte array as uppercase hex to buffer (base implementation).