nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches

◆ NRF_SDH_STATE_EVT_OBSERVER

#define NRF_SDH_STATE_EVT_OBSERVER ( _observer,
_handler,
_ctx,
_prio )

#include <nrf_sdh.h>

Value:
static TYPE_SECTION_ITERABLE(struct nrf_sdh_state_evt_observer, _observer, \
nrf_sdh_state_evt_observers, PRIO_LEVEL_ORD(_prio)) = { \
.handler = _handler, \
.context = _ctx, \
}
#define PRIO_LEVEL_ORD(level)
Utility macro to convert a priority token to its numerical value.
Definition nrf_sdh.h:65
#define PRIO_LEVEL_IS_VALID(level)
Utility macro to check for observer priority validity.
Definition nrf_sdh.h:53
SoftDevice Handler state observer.
Definition nrf_sdh.h:118

Register a SoftDevice state observer.

A SoftDevice state observer receives events when the SoftDevice state has changed or is about to change. An observer may return non-zero when receiving NRF_SDH_STATE_EVT_ENABLE_PREPARE or NRF_SDH_STATE_EVT_DISABLE_PREPARE to halt the state change.

Note that state events may be sent from various contexts, depending on the context of the initiator of the SoftDevice state change.

Parameters
_observerName of the observer.
_handlerState request handler.
_ctxA context passed to the state request handler.
_prioPriority of the observer's event handler. Allowed input: HIGHEST, HIGH, USER, USER_LOW, LOWEST.