1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-30 00:52:20 +01:00

Clean up RAMAllocators in light related code (#9142)

This commit is contained in:
Jesse Hills
2025-06-21 19:32:24 +12:00
committed by GitHub
parent 169db9cc0a
commit 4ef0264ed3
4 changed files with 8 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ namespace spi_led_strip {
SpiLedStrip::SpiLedStrip(uint16_t num_leds) {
this->num_leds_ = num_leds;
ExternalRAMAllocator<uint8_t> allocator(ExternalRAMAllocator<uint8_t>::ALLOW_FAILURE);
RAMAllocator<uint8_t> allocator;
this->buffer_size_ = num_leds * 4 + 8;
this->buf_ = allocator.allocate(this->buffer_size_);
if (this->buf_ == nullptr) {