nrfxlib API 2.8.99
Loading...
Searching...
No Matches

◆ NRF_RPC_EVT_DECODER

#define NRF_RPC_EVT_DECODER ( _group,
_name,
_evt,
_handler,
_data )

#include <nrf_rpc/include/nrf_rpc.h>

Value:
NRF_RPC_STATIC_ASSERT(_evt <= 0xFE, "Event out of range"); \
NRF_RPC_AUTO_ARR_ITEM(const struct _nrf_rpc_decoder, \
NRF_RPC_CONCAT(_name, _evt_dec), \
"evt_" NRF_RPC_STRINGIFY(_group), \
NRF_RPC_STRINGIFY(_name)) = { \
.id = _evt, \
.handler = _handler, \
.handler_data = _data, \
}
#define NRF_RPC_CONCAT(_x, _y)
Macro for concatenating two tokens in macro expansion.
Definition nrf_rpc_common.h:40
#define NRF_RPC_STRINGIFY(_x)
Macro for converting macro argument into a string constans.
Definition nrf_rpc_common.h:58
#define NRF_RPC_STATIC_ASSERT(_expr, _msg)
Compile-time assert.
Definition nrf_rpc_common.h:87

Register an event decoder.

Parameters
_groupGroup that the decoder will belong to, created with a NRF_RPC_GROUP_DEFINE().
_nameName of the decoder.
_evtEvent id. Can be from 0 to 254.
_handlerHandler function of type nrf_rpc_handler_t.
_dataOpaque pointer for the _handler.