27#ifndef AUTO_INIT_UTILS_H
28#define AUTO_INIT_UTILS_H
34#if IS_USED(MODULE_PREPROCESSOR_SUCCESSOR)
35#include "preprocessor_successor.h"
42#ifndef CONFIG_AUTO_INIT_ENABLE_DEBUG
46#define CONFIG_AUTO_INIT_ENABLE_DEBUG 0
64#if IS_ACTIVE(CONFIG_AUTO_INIT_ENABLE_DEBUG) || defined(DOXYGEN)
70#if IS_ACTIVE(CONFIG_AUTO_INIT_ENABLE_DEBUG) || defined(DOXYGEN)
77#define AUTO_INIT(function, priority) \
78 XFA_CONST(auto_init_module_t, auto_init_xfa, priority) \
79 auto_init_xfa_ ## function \
80 = { .init = (auto_init_fn_t)function, \
82 .name = XTSTR(function) }
84#define AUTO_INIT(function, priority) \
85 XFA_CONST(auto_init_module_t, auto_init_xfa, priority) \
86 auto_init_xfa_ ## function \
87 = { .init = (auto_init_fn_t)function }
94#define AUTO_INIT_PRIORITY_AFTER(priority) RIOT_PP_SUCCESSOR(priority)
void(* auto_init_fn_t)(void)
Auto-init function type.
uint16_t auto_init_prio_t
Data type to store the priority of a module.
Common macros and compiler attributes/pragmas configuration.
Type to represent a module to be auto-initialized.
auto_init_prio_t prio
Module priority.
const char * name
Module auto-init function name.
auto_init_fn_t init
Function to initialize the module.
Macro to return string representation of x.