File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -134,9 +134,7 @@ void EspClass::restart(void)
134
134
135
135
uint32_t EspClass::getHeapSize (void )
136
136
{
137
- multi_heap_info_t info;
138
- heap_caps_get_info (&info, MALLOC_CAP_INTERNAL);
139
- return info.total_free_bytes + info.total_allocated_bytes ;
137
+ return heap_caps_get_total_size (MALLOC_CAP_INTERNAL);
140
138
}
141
139
142
140
uint32_t EspClass::getFreeHeap (void )
@@ -157,9 +155,7 @@ uint32_t EspClass::getMaxAllocHeap(void)
157
155
uint32_t EspClass::getPsramSize (void )
158
156
{
159
157
if (psramFound ()){
160
- multi_heap_info_t info;
161
- heap_caps_get_info (&info, MALLOC_CAP_SPIRAM);
162
- return info.total_free_bytes + info.total_allocated_bytes ;
158
+ return heap_caps_get_total_size (MALLOC_CAP_SPIRAM)
163
159
}
164
160
return 0 ;
165
161
}
You can’t perform that action at this time.
0 commit comments