From 6c5f549fbc6b6d83166514bfd6ee18417ad72fb5 Mon Sep 17 00:00:00 2001 From: Dmitry Alexeev Date: Sat, 14 Sep 2024 14:06:47 +0300 Subject: [PATCH] CB24FW-191: Add event handling flags CB24FW-191: Add event handling flags Signed-off-by: Dmitry Alexeev --- include/app_event_manager.h | 7 +++++++ subsys/app_event_manager/app_event_manager_priv.h | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/include/app_event_manager.h b/include/app_event_manager.h index 58b675c492..4da8c97d4d 100644 --- a/include/app_event_manager.h +++ b/include/app_event_manager.h @@ -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. diff --git a/subsys/app_event_manager/app_event_manager_priv.h b/subsys/app_event_manager/app_event_manager_priv.h index 31485ed0e6..c29861a85e 100644 --- a/subsys/app_event_manager/app_event_manager_priv.h +++ b/subsys/app_event_manager/app_event_manager_priv.h @@ -132,6 +132,7 @@ extern "C" { ""); \ if (event != NULL) { \ event->header.type_id = _EVENT_ID(ename); \ + event->header.eh_flags = 0; \ } \ return event; \ } @@ -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; };