XFusion API v1.3.0
载入中...
搜索中...
未找到
examples/system/init/main/xf_main.c

自动初始化示例。

1
17/* ==================== [Includes] ========================================== */
18
19#include "xf_init.h"
20#include "xf_utils.h"
21
22/* ==================== [Defines] =========================================== */
23
24/* ==================== [Typedefs] ========================================== */
25
26/* ==================== [Static Prototypes] ================================= */
27
28/* ==================== [Static Variables] ================================== */
29
30static const char *const TAG = "xf_main";
31
32/* ==================== [Macros] ============================================ */
33
34/* ==================== [Global Functions] ================================== */
35
36void xf_main(void)
37{
44}
45
46/* ==================== [Static Functions] ================================== */
47
48static int test_xf_init_component_board(void)
49{
50 XF_LOGI(TAG, "hello, I'm %s", __FUNCTION__);
51 return __COUNTER__;
52}
54
55static int test_xf_init_component_prev(void)
56{
57 XF_LOGI(TAG, "hello, I'm %s", __FUNCTION__);
58 return __COUNTER__;
59}
61
62static int test_xf_init_component_device(void)
63{
64 XF_LOGI(TAG, "hello, I'm %s", __FUNCTION__);
65 return __COUNTER__;
66}
68
70{
71 XF_LOGI(TAG, "hello, I'm %s", __FUNCTION__);
72 return __COUNTER__;
73}
75
76static int test_xf_init_component_env(void)
77{
78 XF_LOGI(TAG, "hello, I'm %s", __FUNCTION__);
79 return __COUNTER__;
80}
82
83static int test_xf_init_component_app(void)
84{
85 XF_LOGI(TAG, "hello, I'm %s", __FUNCTION__);
86 return __COUNTER__;
87}
89
void xf_main(void)
Definition xf_main.c:28
#define XF_INIT_EXPORT_PREV(function)
抽象层预初始化,初始化 HAL NAL 等抽象层.
Definition xf_init.h:131
#define XF_INIT_EXPORT_APP(function)
应用程序初始化. 如
Definition xf_init.h:188
#define XF_INIT_EXPORT_COMPONENT(function)
组件初始化. 应用层初始化一些外部组件使用
Definition xf_init.h:166
#define XF_INIT_EXPORT_ENV(function)
环境初始化. 应用层初始化环境(如文件系统)
Definition xf_init.h:177
#define XF_INIT_EXPORT_BOARD(function)
板级初始化.初始化和开发板相关内容,如 heap,sys 等功能。
Definition xf_init.h:118
#define XF_INIT_EXPORT_DEVICE(function)
设备初始化. 应用层初始化外设使用
Definition xf_init.h:155
#define TAG
Definition xf_main.c:24
static int test_xf_init_component_app(void)
Definition xf_main.c:83
static int test_xf_init_component_component(void)
Definition xf_main.c:69
static int test_xf_init_component_prev(void)
Definition xf_main.c:55
static int test_xf_init_component_env(void)
Definition xf_main.c:76
static int test_xf_init_component_device(void)
Definition xf_main.c:62
static int test_xf_init_component_board(void)
Definition xf_main.c:48
#define XF_LOGI(tag, format,...)