Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CB24FW-191: Add event handling flags #10

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading