|
ESPHome 2026.11.0b6
|
Base class for color accessors backed by a buffer whose layout is described by ChannelColors. More...
#include <esp_color_view.h>
Public Member Functions | |
| BufferColorAccessor ()=default | |
| BufferColorAccessor (uint8_t *color_data, uint8_t *effect_data, ChannelColors channel_colors) | |
| Color | get_raw (int32_t index) const override |
| uint8_t | get_channel_raw (int32_t index, uint8_t channel) const override |
| uint8_t | get_effect_data (int32_t index) const override |
| void | set_raw (int32_t index, Color raw_color) override |
| void | set_channel_raw (int32_t index, uint8_t channel, uint8_t raw_value) override |
| void | set_effect_data (int32_t index, uint8_t value) override |
| bool | allocate (RAMAllocator< uint8_t > &allocator, size_t num_leds, size_t extra_bytes=0) |
Allocate the color and effect data for num_leds LEDs as one zeroed block, followed by extra_bytes more for the caller, which start at effect_data + num_leds. | |
| 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. | |
Public Member Functions inherited from esphome::light::ESPColorAccessor | |
| virtual Color | get (int32_t index) const =0 |
| virtual uint8_t | get_channel (int32_t index, uint8_t channel) const =0 |
| virtual void | set (int32_t index, Color color)=0 |
| virtual void | set_channel (int32_t index, uint8_t channel, uint8_t value)=0 |
| virtual const ESPColorCorrection * | get_color_correction_internal (int32_t index) const |
Data Fields | |
| uint8_t * | color_data {nullptr} |
| uint8_t * | effect_data {nullptr} |
| ChannelColors | channel_colors {} |
Base class for color accessors backed by a buffer whose layout is described by ChannelColors.
Definition at line 61 of file esp_color_view.h.
|
default |
|
inline |
Definition at line 64 of file esp_color_view.h.
|
inline |
Allocate the color and effect data for num_leds LEDs as one zeroed block, followed by extra_bytes more for the caller, which start at effect_data + num_leds.
Returns false if it failed.
Definition at line 83 of file esp_color_view.h.
|
inline |
Zero the effect data of the first num_leds LEDs; does nothing before the effect data is allocated.
Definition at line 96 of file esp_color_view.h.
|
inlineoverridevirtual |
Implements esphome::light::ESPColorAccessor.
Definition at line 68 of file esp_color_view.h.
|
inlineoverridevirtual |
Implements esphome::light::ESPColorAccessor.
Definition at line 71 of file esp_color_view.h.
|
inlineoverridevirtual |
Implements esphome::light::ESPColorAccessor.
Definition at line 67 of file esp_color_view.h.
|
inlineoverridevirtual |
Implements esphome::light::ESPColorAccessor.
Definition at line 76 of file esp_color_view.h.
|
inlineoverridevirtual |
Implements esphome::light::ESPColorAccessor.
Definition at line 79 of file esp_color_view.h.
|
inlineoverridevirtual |
Implements esphome::light::ESPColorAccessor.
Definition at line 73 of file esp_color_view.h.
| ChannelColors esphome::light::BufferColorAccessor::channel_colors {} |
Definition at line 104 of file esp_color_view.h.
| uint8_t* esphome::light::BufferColorAccessor::color_data {nullptr} |
Definition at line 102 of file esp_color_view.h.
| uint8_t* esphome::light::BufferColorAccessor::effect_data {nullptr} |
Definition at line 103 of file esp_color_view.h.