Add separate method to get free PSRAM and report only internal in getFreeHeap
This commit is contained in:
parent
14d6f6e7e6
commit
65511b23d3
@ -114,7 +114,12 @@ void EspClass::restart(void)
|
|||||||
|
|
||||||
uint32_t EspClass::getFreeHeap(void)
|
uint32_t EspClass::getFreeHeap(void)
|
||||||
{
|
{
|
||||||
return esp_get_free_heap_size();
|
return heap_caps_get_free_size(MALLOC_CAP_INTERNAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t EspClass::getFreePsram(void)
|
||||||
|
{
|
||||||
|
return heap_caps_get_free_size(MALLOC_CAP_SPIRAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t EspClass::getChipRevision(void)
|
uint8_t EspClass::getChipRevision(void)
|
||||||
|
@ -57,6 +57,7 @@ public:
|
|||||||
~EspClass() {}
|
~EspClass() {}
|
||||||
void restart();
|
void restart();
|
||||||
uint32_t getFreeHeap();
|
uint32_t getFreeHeap();
|
||||||
|
uint32_t getFreePsram();
|
||||||
uint8_t getChipRevision();
|
uint8_t getChipRevision();
|
||||||
uint8_t getCpuFreqMHz(){ return CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ; }
|
uint8_t getCpuFreqMHz(){ return CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ; }
|
||||||
uint32_t getCycleCount();
|
uint32_t getCycleCount();
|
||||||
|
Loading…
Reference in New Issue
Block a user