nrfxlib API 0.1.0
Loading...
Searching...
No Matches

Common utility macros used internally in nRF RPC. More...

Macros

#define NRF_RPC_CONCAT(_x, _y)    __NRF_RPC_CONCAT(_x, _y)
 Macro for concatenating two tokens in macro expansion.
 
#define NRF_RPC_STRINGIFY(_x)    __NRF_RPC_STRINGIFY(_x)
 Macro for converting macro argument into a string constans.
 
#define NRF_RPC_CONTAINER_OF(_ptr, _type, _field_name)    ((_type *)(((uint8_t *)_ptr) - offsetof(_type, _field_name)))
 Retrieve pointer to parent structure.
 
#define NRF_RPC_STATIC_ASSERT(_expr, _msg)    __NRF_RPC_STATIC_ASSERT(_expr, _msg)
 Compile-time assert.
 
#define NRF_RPC_ASSERT(_expr)    __NRF_RPC_ASSERT(_expr)
 Runtime assert.
 
#define NRF_RPC_AUTO_ARR(_name, _array_key)
 Creates new automatically registered array.
 
#define NRF_RPC_AUTO_ARR_ITEM(_type, _name, _array_key, _item_key)
 Adds new variable to the array.
 
#define NRF_RPC_AUTO_ARR_FOR(_it, _var, _array_ptr, _type)
 Iterate over array items.
 
#define NRF_RPC_AUTO_ARR_GET(_array_ptr, _index, _type)    (((_type *)((const uint8_t *const *)(_array_ptr) + 1))[_index])
 Get item from the array.
 

Detailed Description

Common utility macros used internally in nRF RPC.