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)
134134
135135uint32_t EspClass::getHeapSize (void )
136136{
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);
140138}
141139
142140uint32_t EspClass::getFreeHeap (void )
@@ -157,9 +155,7 @@ uint32_t EspClass::getMaxAllocHeap(void)
157155uint32_t EspClass::getPsramSize (void )
158156{
159157 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)
163159 }
164160 return 0 ;
165161}
You can’t perform that action at this time.
0 commit comments