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

◆ NRF_RPC_CONTAINER_OF

#define NRF_RPC_CONTAINER_OF (   _ptr,
  _type,
  _field_name 
)     ((_type *)(((uint8_t *)_ptr) - offsetof(_type, _field_name)))

#include <nrf_rpc/include/nrf_rpc_common.h>

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.