nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ APP_EVENT_HOOK_ON_SUBMIT_REGISTER_LAST

#define APP_EVENT_HOOK_ON_SUBMIT_REGISTER_LAST (   hook_fn)

#include <include/app_event_manager.h>

Value:
const struct {} __event_hook_on_submit_last_sub_redefined = {}; \
_APP_EVENT_HOOK_ON_SUBMIT_REGISTER(hook_fn, _APP_EM_MARKER_FINAL_ELEMENT)

Register event hook on submission. The hook would be called last.

The event hook called when the event is submitted. The hook function should have a form void hook(const struct app_event_header *aeh). The macro makes sure that the hook provided here is called last. Only one hook can be registered with this macro.

Note
The registered hook may be called from many contexts. To ensure that order of events in the queue matches the order of the registered callbacks calls, the callbacks are called under the same spinlock as adding events to the queue.
Parameters
hook_fnHook function.