Skip to content

Commit b021970

Browse files
rakonsnordicjm
authored andcommitted
app_event_manager: Add access to event id
This commit adds macro to access event id structure. JIRA: NCSDK-20640 Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
1 parent eb95c3b commit b021970

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

doc/nrf/releases/release-notes-changelog.rst

+4
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,10 @@ Other libraries
536536

537537
* The library now supports using the GPIO expander for the buttons, switches, and LEDs on the nRF9160 DK.
538538

539+
* :ref:`app_event_manager` library:
540+
541+
* Added :c:macro:`APP_EVENT_ID` macro.
542+
539543
Common Application Framework (CAF)
540544
----------------------------------
541545

include/app_event_manager.h

+10
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@ static inline bool app_event_get_type_flag(const struct event_type *et,
7373
return (et->flags & BIT(flag)) != 0;
7474
}
7575

76+
/**
77+
* @brief Get the event ID
78+
*
79+
* Macro that creates event id pointer from the event name.
80+
*
81+
* @param ename The name of the event
82+
* @return Event id pointer to struct event_type type
83+
*/
84+
#define APP_EVENT_ID(ename) _EVENT_ID(ename)
85+
7686
/** @brief Create an event listener object.
7787
*
7888
* @param lname Module name.

0 commit comments

Comments
 (0)