heap: Refactor heap regions/capabilities out of FreeRTOS

Remove tagged heap API, rename caps_xxx to heap_caps_xxx

Also includes additional heap_caps_xxx inspection functions.
This commit is contained in:
Angus Gratton
2017-05-03 18:03:28 +10:00
committed by Angus Gratton
parent 5ee49fd311
commit 71c70cb15c
37 changed files with 1166 additions and 995 deletions

View File

@@ -33,6 +33,7 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/xtensa_api.h"
#include "esp_heap_caps.h"
static const char* TAG = "system_api";
@@ -330,9 +331,19 @@ void IRAM_ATTR esp_restart_noos()
void system_restart(void) __attribute__((alias("esp_restart")));
uint32_t esp_get_free_heap_size(void)
void system_restore(void)
{
return xPortGetFreeHeapSize();
esp_wifi_restore();
}
uint32_t esp_get_free_heap_size( void )
{
return heap_caps_get_free_size( MALLOC_CAP_8BIT );
}
uint32_t esp_get_minimum_free_heap_size( void )
{
return heap_caps_get_minimum_free_size( MALLOC_CAP_8BIT );
}
uint32_t system_get_free_heap_size(void) __attribute__((alias("esp_get_free_heap_size")));