nRF5 SDK v16.0.0
Data Fields
nrf_cli_transport_api_t Struct Reference

Unified CLI transport interface. More...

#include <nrf_cli.h>

Data Fields

ret_code_t(* init )(nrf_cli_transport_t const *p_transport, void const *p_config, nrf_cli_transport_handler_t evt_handler, void *p_context)
 Function for initializing the CLI transport interface. More...
 
ret_code_t(* uninit )(nrf_cli_transport_t const *p_transport)
 Function for uninitializing the CLI transport interface. More...
 
ret_code_t(* enable )(nrf_cli_transport_t const *p_transport, bool blocking)
 Function for reconfiguring the transport to work in blocking mode. More...
 
ret_code_t(* write )(nrf_cli_transport_t const *p_transport, const void *p_data, size_t length, size_t *p_cnt)
 Function for writing data to the transport interface. More...
 
ret_code_t(* read )(nrf_cli_transport_t const *p_transport, void *p_data, size_t length, size_t *p_cnt)
 Function for reading data from the transport interface. More...
 

Detailed Description

Unified CLI transport interface.

Field Documentation

ret_code_t(* nrf_cli_transport_api_t::enable)(nrf_cli_transport_t const *p_transport, bool blocking)

Function for reconfiguring the transport to work in blocking mode.

Parameters
p_transportPointer to the transfer instance.
blockingIf true, the transport is enabled in blocking mode.
Returns
NRF_SUCCESS on successful enabling, error otherwise (also if not supported).
ret_code_t(* nrf_cli_transport_api_t::init)(nrf_cli_transport_t const *p_transport, void const *p_config, nrf_cli_transport_handler_t evt_handler, void *p_context)

Function for initializing the CLI transport interface.

Parameters
[in]p_transportPointer to the transfer instance.
[in]p_configPointer to instance configuration.
[in]evt_handlerEvent handler.
[in]p_contextPointer to the context passed to event handler.
Returns
Standard error code.
ret_code_t(* nrf_cli_transport_api_t::read)(nrf_cli_transport_t const *p_transport, void *p_data, size_t length, size_t *p_cnt)

Function for reading data from the transport interface.

Parameters
[in]p_transportPointer to the transfer instance.
[in]p_dataPointer to the destination buffer.
[in]lengthDestination buffer length.
[in]p_cntPointer to the received bytes counter.
Returns
Standard error code.
ret_code_t(* nrf_cli_transport_api_t::uninit)(nrf_cli_transport_t const *p_transport)

Function for uninitializing the CLI transport interface.

Parameters
[in]p_transportPointer to the transfer instance.
Returns
Standard error code.
ret_code_t(* nrf_cli_transport_api_t::write)(nrf_cli_transport_t const *p_transport, const void *p_data, size_t length, size_t *p_cnt)

Function for writing data to the transport interface.

Parameters
[in]p_transportPointer to the transfer instance.
[in]p_dataPointer to the source buffer.
[in]lengthSource buffer length.
[in]p_cntPointer to the sent bytes counter.
Returns
Standard error code.

The documentation for this struct was generated from the following file:

Documentation feedback | Developer Zone | Subscribe | Updated