[core] Split lt_api.c into separate units

This commit is contained in:
Kuba Szczodrzyński
2023-06-22 18:30:14 +02:00
parent b38a4d5d46
commit e38e53bac0
45 changed files with 947 additions and 865 deletions

View File

@@ -0,0 +1,26 @@
/* Copyright (c) Kuba Szczodrzyński 2022-04-29. */
#include "lt_mem.h"
#if LT_HAS_FREERTOS
#include <FreeRTOS.h>
#include <task.h>
#endif
#if LT_HAS_FREERTOS
__attribute__((weak)) uint32_t lt_heap_get_size() {
return configTOTAL_HEAP_SIZE;
}
__attribute__((weak)) uint32_t lt_heap_get_free() {
return xPortGetFreeHeapSize();
}
__attribute__((weak)) uint32_t lt_heap_get_min_free() {
return xPortGetMinimumEverFreeHeapSize();
}
#endif
__attribute__((weak)) uint32_t lt_heap_get_max_alloc() {
return 0;
}