12#ifndef __XF_INIT_IMPL_BY_SECTION_H__
13#define __XF_INIT_IMPL_BY_SECTION_H__
17#include "../xf_init_config_internal.h"
19#if (XF_INIT_IMPL_METHOD == XF_INIT_IMPL_BY_SECTION) || defined(__DOXYGEN__)
37# error "section 需要启用 GNU 特性"
81#define XF_INIT_EXPORT_SECTION(function, level) \
82 __used __section(".xf_auto_init." level) \
83 const xf_init_section_desc_t __xf_init_##function = { \
85 .func_name = XSTR(function), \
95#define XF_INIT_EXPORT_SECTION_SETUP(function) XF_INIT_EXPORT_SECTION(function, "1")
104#define XF_INIT_EXPORT_SECTION_BOARD(function) XF_INIT_EXPORT_SECTION(function, "2")
113#define XF_INIT_EXPORT_SECTION_PREV(function) XF_INIT_EXPORT_SECTION(function, "3")
122#define XF_INIT_EXPORT_SECTION_CLEANUP(function) XF_INIT_EXPORT_SECTION(function, "4")
131#define XF_INIT_EXPORT_SECTION_DEVICE(function) XF_INIT_EXPORT_SECTION(function, "5")
140#define XF_INIT_EXPORT_SECTION_COMPONENT(function) XF_INIT_EXPORT_SECTION(function, "6")
149#define XF_INIT_EXPORT_SECTION_ENV(function) XF_INIT_EXPORT_SECTION(function, "7")
158#define XF_INIT_EXPORT_SECTION_APP(function) XF_INIT_EXPORT_SECTION(function, "8")
int(* xf_init_fn_t)(void)
初始化函数类型.
void xf_init_from_section(void)
section 注册的函数将会被统一在这个函数里面调用。
struct _xf_init_section_desc_t xf_init_section_desc_t
初始化函数详情结构体.