mirror of https://github.com/arendst/Tasmota.git
Merge pull request #13294 from s-hadinger/fix_ram_display
Changed Memory display on ESP32 to not include IRAM (i.e. less by 40-50KB)
This commit is contained in:
commit
0d435d2ccf
|
@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
### Breaking Changed
|
### Breaking Changed
|
||||||
- ESP32 LVGL updated to v8.0.2
|
- ESP32 LVGL updated to v8.0.2
|
||||||
|
- Changed Memory display on ESP32 to not include IRAM (i.e. less by 40-50KB)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Removed command ``EnergyReset`` as it is replaced by new commands
|
- Removed command ``EnergyReset`` as it is replaced by new commands
|
||||||
|
|
|
@ -387,12 +387,13 @@ uint32_t ESP_getSketchSize(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t ESP_getFreeHeap(void) {
|
uint32_t ESP_getFreeHeap(void) {
|
||||||
return ESP.getFreeHeap();
|
// ESP_getFreeHeap() returns also IRAM which we don't use
|
||||||
|
return heap_caps_get_free_size(MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t ESP_getMaxAllocHeap(void) {
|
uint32_t ESP_getMaxAllocHeap(void) {
|
||||||
// largest block of heap that can be allocated at once
|
// arduino returns IRAM but we want only DRAM
|
||||||
uint32_t free_block_size = ESP.getMaxAllocHeap();
|
uint32_t free_block_size = heap_caps_get_largest_free_block(MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
||||||
if (free_block_size > 100) { free_block_size -= 100; }
|
if (free_block_size > 100) { free_block_size -= 100; }
|
||||||
return free_block_size;
|
return free_block_size;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue