152#define XF_TEMPLATE_HELP_STR "xf_template v0.1"
153#define XF_TEMPLATE_HELP_STR_SPLICING "test" XF_TEMPLATE_HELP_STR "abc123"
154#define XF_TEMPLATE_DEFINE (1)
244 uint32_t a_parameter_with_a_very_long_name,
245 uint32_t another_parameter_with_a_very_long_name,
246 uint32_t a_parameter_with_a_very_long_name_too,
247 uint32_t a_parameter_with_a_very_long_name_that_is_really_long
259static const char *
const TAG =
"xf_main";
291#define XF_TEMPLATE_MACROS_ADD(_a, _b) ((_a) + (_b))
299#define XF_TEMPLATE_MACROS_NO_RETURN(_a, _b) \
301 s_data = (_a) + (_b); \
310#define XF_TEMPLATE_MACROS_HAS_RETURN(_x) \
312 typeof(_x) __ret = (_x); \
313 __ret = __ret + (_x); \
327# define XF_TEMPL_PRINTF(_fmt, ...) xf_log_printf(_fmt, ##__VA_ARGS__)
329# define XF_TEMPL_PRINTF(_fmt, ...)
333# define UNUSED(_x) ((void)(_x))
426 if ((NULL == p_struct) || (NULL == p_out) || (p_struct->
num >= 100)) {
428 goto _xf_template_func_err;
440 ret += p_struct->
p_str[i];
450_xf_template_func_err:
455 uint32_t a_parameter_with_a_very_long_name,
456 uint32_t another_parameter_with_a_very_long_name,
457 uint32_t a_parameter_with_a_very_long_name_too,
458 uint32_t a_parameter_with_a_very_long_name_that_is_really_long
461 UNUSED(a_parameter_with_a_very_long_name);
462 UNUSED(another_parameter_with_a_very_long_name);
463 UNUSED(a_parameter_with_a_very_long_name_too);
464 UNUSED(a_parameter_with_a_very_long_name_that_is_really_long);
struct _xf_templ_struct_t::@0::@1 bits
union _xf_templ_struct_t::@0 data
void xf_component_func(void)
extern "C" 的位置通常在 include 后面。
#define XF_LOGI(tag, format,...)
xf_templ_err_t xf_template_init(void)
一个初始化函数。
static xf_templ_struct_t s_struct
void xf_main(void)
全局函数定义: [Global Functions].
#define XF_TEMPLATE_MACROS_ADD(_a, _b)
带参宏: [Macros].
struct _xf_templ_struct_t xf_templ_struct_t
结构体示例。
void a_function_of_very_many_parameters(uint32_t a_parameter_with_a_very_long_name, uint32_t another_parameter_with_a_very_long_name, uint32_t a_parameter_with_a_very_long_name_too, uint32_t a_parameter_with_a_very_long_name_that_is_really_long)
一个演示函数参数换行的示例。
static const char *const TAG
静态变量: [Static Variables].
#define XF_TEMPL_PRINTF(_fmt,...)
关于条件编译。
int g_xf_templ_global_data1_in_head
全局变量: [Global Variables].
static xf_templ_int_t s_data
enum _xf_templ_enum_t xf_templ_enum_t
类型定义: [Typedefs].
int g_xf_templ_global_data2_no_in_head
_xf_templ_enum_t
类型定义: [Typedefs].
#define XF_TEMPLATE_HELP_STR
关于格式化程序。
static void * p_a_pointer
static xf_templ_int_t _xf_template_func(xf_templ_struct_t *p_struct, int32_t *p_out)
静态函数原型: [Static Prototypes].