Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 2.2 KB

callbacks.rst

File metadata and controls

55 lines (35 loc) · 2.2 KB

Callbacks

Every module needs 5 functions that must be defined by developer. If using module_easy, they are automatically declared by MODULE macro. Moreover, a module_pre_start function is declared too, but it is not needed by libmodule interface, ie: it can be left undefined. Your compiler may warn you about that though.

static void module_pre_start(void);
static void init(void);
static bool check(void);
static bool evaluate(void);
static void receive(const msg_t *const msg, const void *userdata);
static void destroy(void);