nRF Connect SDK API 0.1.0
|
#define NRF_RPC_CBKPROXY_HANDLER | ( | ... | ) | _CBKPROXY_HANDLER_CAT(_CBKPROXY_HANDLER_, _CBKPROXY_HANDLER_CNT(__VA_ARGS__)) (__VA_ARGS__) |
#include <include/nrf_rpc/nrf_rpc_cbkproxy.h>
Creates a handler for output callback proxy.
It is a variadic macro that takes following parameters:
... | - variadic number of parameters: |
handler_name - name of the handler function that can be passed to the nrf_rpc_cbkproxy_out_get() function.
callback_name - callback that will be called by this handler. Best approach is to declare it as 'static inline' to make sure that handler and callback will be combined into one function during the optimization. This callback has the same parameters as the original one (provided in ''handler_parameters'') with the following parameter appended to the end: ''uint32_t callback_slot''.
return_type - optional return type of the callback. It must be convertible to ''uint32_t'' without a loss of information. If it is ''void'' this macro parameter must be skipped.
handler_parameters - list of parameters with its types enclosed in parentheses, for example, ''(uint8_t *buf, size_t len)''. This macro parameter is optional and must be skipped if the callback does not take any parameters.
callback_arguments - list of arguments with the same names as in ''handler_parameters'' enclosed in parentheses, for example, ''(buf, len)''. This macro parameter is optional and must be skipped if the callback does not take any parameters.