Utilities to influence the order of auto-initialized modules

Detailed Description


file  auto_init_utils.h
 Auto-initialization utilities.

Data Structures

struct  auto_init_module_t
 Type to represent a module to be auto-initialized. More...


 Print a debug message before a module is initialized.
#define AUTO_INIT(function, priority)
 Add a module to the auto-initialization array. More...
#define AUTO_INIT_PRIORITY_AFTER(priority)   RIOT_PP_SUCCESSOR(priority)
 Construct a priority value equal to priority + 1, to be used with AUTO_INIT.


typedef void(* auto_init_fn_t) (void)
 Auto-init function type.
typedef uint16_t auto_init_prio_t
 Data type to store the priority of a module.

Macro Definition Documentation


#define AUTO_INIT (   function,
XFA_CONST(auto_init_xfa, priority) \
auto_init_module_t auto_init_xfa_ ## function \
= { .init = (auto_init_fn_t)function, \
.prio = priority, \
.name = XTSTR(function) }
void(* auto_init_fn_t)(void)
Auto-init function type.
#define XFA_CONST(xfa_name, prio)
Define variable in read-only cross-file array.
Definition: xfa.h:156
#define XTSTR(x)
A macro to return the string representation of x.
Definition: xtstr.h:37

Add a module to the auto-initialization array.

functionFunction to be called on initialization auto_init_fn_t
priorityPriority level auto_init_prio_t

Definition at line 77 of file auto_init_utils.h.