nRF Connect SDK API 0.1.0
|
CAF Module State Event. More...
Data Structures | |
struct | module_flags |
Structure that provides a flag for every module available in application. More... | |
struct | module_state_event |
Module state event. More... | |
Macros | |
#define | MODULE_ID_LIST_SECTION_PREFIX module_id_list |
#define | MODULE_ID_PTR_VAR(mname) _CONCAT(__module_, mname) |
#define | MODULE_ID_LIST_SECTION_NAME STRINGIFY(MODULE_ID_LIST_SECTION_PREFIX) |
#define | MODULE_ID_PTR_VAR_EXTERN_DEC(mname) extern const void * const MODULE_ID_PTR_VAR(mname) |
#define | MODULE_IDX(mname) |
Get index of module. | |
#define | MODULE_ID(mname) |
Get module ID. | |
#define | MODULE_NAME STRINGIFY(MODULE) |
Enumerations | |
enum | module_state { MODULE_STATE_READY , MODULE_STATE_OFF , MODULE_STATE_STANDBY , MODULE_STATE_ERROR , MODULE_STATE_COUNT , APP_EM_ENFORCE_ENUM_SIZE =(MODULE_STATE) } |
Functions | |
static size_t | module_count (void) |
Get number of modules. | |
static const void * | module_id_get (size_t idx) |
Get ID of module with given index. | |
static size_t | module_idx_get (const void *module_id) |
Get IDX of module with given id. | |
static const char * | module_name_get (const void *id) |
Get name of the module with given id. | |
static bool | module_check_id_valid (size_t module_idx) |
Check if given module index is valid. | |
static bool | module_flags_check_zero (const struct module_flags *mf) |
Check if there is 0 in all the flags. | |
static bool | module_flags_test_bit (const struct module_flags *mf, size_t module_idx) |
Test single module bit. | |
static void | module_flags_clear_bit (struct module_flags *mf, size_t module_idx) |
Clear single module bit. | |
static void | module_flags_set_bit (struct module_flags *mf, size_t module_idx) |
Set single module bit. | |
static void | module_flags_set_bit_to (struct module_flags *mf, size_t module_idx, bool val) |
Set single module bit to specified value. | |
static bool | check_state (const struct module_state_event *event, const void *module_id, enum module_state state) |
Check if the selected module reported the selected state. | |
static void | module_set_state (enum module_state state) |
Submit module state event to inform that state of the module changed. | |
CAF Module State Event.