mirror of
https://github.com/esphome/esphome.git
synced 2026-07-11 01:15:33 +00:00
Revert "[debug] Fix iram sensor to report IRAM-only free"
This reverts commit 3fa50a27a8.
This commit is contained in:
@@ -302,11 +302,7 @@ void DebugComponent::update_platform_() {
|
||||
this->psram_sensor_->publish_state(heap_caps_get_free_size(MALLOC_CAP_SPIRAM));
|
||||
}
|
||||
if (this->iram_sensor_ != nullptr) {
|
||||
// IRAM-only free: 32-bit-accessible heap minus 8-bit-accessible heap.
|
||||
// IRAM regions are registered as 32-bit-only; DRAM is both 8-bit and 32-bit.
|
||||
size_t free_32bit = heap_caps_get_free_size(MALLOC_CAP_32BIT);
|
||||
size_t free_8bit = heap_caps_get_free_size(MALLOC_CAP_8BIT);
|
||||
this->iram_sensor_->publish_state(free_32bit > free_8bit ? free_32bit - free_8bit : 0);
|
||||
this->iram_sensor_->publish_state(heap_caps_get_free_size(MALLOC_CAP_EXEC));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user