Skip to content

Commit

Permalink
CB24FW-191: Add event handling flags
Browse files Browse the repository at this point in the history
CB24FW-191: Add event handling flags

Signed-off-by: Dmitry Alexeev <[email protected]>
  • Loading branch information
dmitryalexeevemcraft committed Sep 16, 2024
1 parent 592cac7 commit 6c5f549
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/app_event_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ enum app_event_type_flags {
APP_EVENT_TYPE_FLAGS_USER_DEFINED_START = APP_EVENT_TYPE_FLAGS_COUNT,
};

/**
* @brief List of bits in event handling flags.
*/
enum app_event_handling_flags {
APP_EVENT_HANDLING_DO_NOT_FORWARD,
};

/** @brief Get event type flag's value.
*
* @param flag Selected event type flag.
Expand Down
4 changes: 4 additions & 0 deletions subsys/app_event_manager/app_event_manager_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ extern "C" {
""); \
if (event != NULL) { \
event->header.type_id = _EVENT_ID(ename); \
event->header.eh_flags = 0; \
} \
return event; \
}
Expand Down Expand Up @@ -228,6 +229,9 @@ struct app_event_header {
/** Linked list node used to chain events. */
sys_snode_t node;

/** Array of flags specific for event handling.*/
uint8_t eh_flags;

/** Pointer to the event type object. */
const struct event_type *type_id;
};
Expand Down

0 comments on commit 6c5f549

Please sign in to comment.