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

◆ NRF_RPC_CONTAINER_OF

#define NRF_RPC_CONTAINER_OF ( _ptr,
_type,
_field_name )

#include <nrf_rpc/include/nrf_rpc_common.h>

Value:
((_type *)(((uint8_t *)_ptr) - offsetof(_type, _field_name)))

Retrieve pointer to parent structure.

Parameters
[in]_ptrPointer to data.
[in]_typeParent structure data type.
[in]_field_nameData field name in parent structure.
Returns
Pointer to parent structure.