nrfxlib API 0.1.0
|
#define NRF_RPC_CBOR_ALLOC | ( | _group, | |
_ctx, | |||
_len | |||
) |
#include <nrf_rpc/include/nrf_rpc_cbor.h>
Allocates memory for a packet.
Macro may allocate some variables on stack, so it should be used at top level of a function.
Memory is automatically deallocated when it is passed to any of the send functions. If not NRF_RPC_CBOR_DISCARD() can be used.
[in] | _group | nRF RPC group. |
[out] | _ctx | Variable of type nrf_rpc_cbor_ctx or nrf_rpc_cbor_rsp_ctx that will hold newly allocated resources to encode and send a packet. |
[in] | _len | Requested length of the packet. |