8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14d6f6e commit 65511b2Copy full SHA for 65511b2
cores/esp32/Esp.cpp
@@ -114,7 +114,12 @@ void EspClass::restart(void)
114
115
uint32_t EspClass::getFreeHeap(void)
116
{
117
- return esp_get_free_heap_size();
+ return heap_caps_get_free_size(MALLOC_CAP_INTERNAL);
118
+}
119
+
120
+uint32_t EspClass::getFreePsram(void)
121
+{
122
+ return heap_caps_get_free_size(MALLOC_CAP_SPIRAM);
123
}
124
125
uint8_t EspClass::getChipRevision(void)
cores/esp32/Esp.h
@@ -57,6 +57,7 @@ class EspClass
57
~EspClass() {}
58
void restart();
59
uint32_t getFreeHeap();
60
+ uint32_t getFreePsram();
61
uint8_t getChipRevision();
62
uint8_t getCpuFreqMHz(){ return CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ; }
63
uint32_t getCycleCount();
0 commit comments