nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ MODULE_IDX

#define MODULE_IDX (   mname)

#include <include/caf/events/module_state_event.h>

Value:
({ \
MODULE_ID_PTR_VAR_EXTERN_DEC(mname); \
&MODULE_ID_PTR_VAR(mname) - __start_module_id_list; \
})
#define MODULE_ID_PTR_VAR(mname)
Definition: module_state_event.h:28

Get index of module.

For example, the MODULE_IDX(buttons) can be used to get module index of module named buttons.

Parameters
[in]mnameName of the module.
Returns
Index of the module.