XFusion API v1.3.0
载入中...
搜索中...
未找到
port_xf_heap.c
浏览该文件的文档.
1
12/* ==================== [Includes] ========================================== */
13
14#include "xf_heap/src/xf_heap.h"
15
16#if defined(CONFIG_XF_HEAP_PORT_ENABLE)
17
18#include "xf_init.h"
19
20/* ==================== [Defines] =========================================== */
21
22/* ==================== [Typedefs] ========================================== */
23
24/* ==================== [Static Prototypes] ================================= */
25
26static char s_heap_arr[XF_HEAP_STATIC_SIZE] = {0};
27static xf_heap_region_t s_heap_regions[] = {
28 {(uint8_t *)s_heap_arr, XF_HEAP_STATIC_SIZE},
29 {NULL, 0}
30};
31
32/* ==================== [Static Variables] ================================== */
33
34/* ==================== [Macros] ============================================ */
35
36/* ==================== [Global Functions] ================================== */
37
38/* ==================== [Static Functions] ================================== */
39
40static int port_xf_heap_init(void)
41{
42 xf_heap_init(s_heap_regions);
43 return 0;
44}
45
46XF_INIT_EXPORT_BOARD(port_xf_heap_init);
47
48#endif
#define XF_INIT_EXPORT_BOARD(function)
板级初始化.初始化和开发板相关内容,如 heap,sys 等功能。
Definition xf_init.h:118
堆内存块结构体。
Definition xf_heap.h:67
堆内存接口。
int xf_heap_init(const xf_heap_region_t *const regions)
内存初始化。
Definition xf_heap.c:76
#define XF_HEAP_STATIC_SIZE