nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ nrf_rpc_cbkproxy_out_get()

void * nrf_rpc_cbkproxy_out_get ( int index,
void * handler )

#include <include/nrf_rpc/nrf_rpc_cbkproxy.h>

Get output callback proxy.

This function creates an output callback proxy. Calling proxy will call handler with untouched parameters on stack and registers. Because of that type of handler must be the same as callback proxy. This function is type independent, so function pointer are void* and caller is responsible for correct type casting. Handler is called with one additional information (obtained by cbkproxy_out_start_handler) which is a slot number. It can be used to recognize with callback proxy was called in single handler.

Parameters
indexSlot index.
handlerPointer to handler function. The function has to be created by the NRF_RPC_CBKPROXY_HANDLER macro.
Returns
Pointer to function that calls provided handler using provided slot index. The pointer has to be casted to the same type as handler. NULL when index is too high or the function was called again with the same index, but different handler.