nrf_cli_transport_api_t

nRF5 SDK v15.0.0

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_transport Pointer to the transfer instance.
blocking If 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_transport Pointer to the transfer instance.
[in] p_config Pointer to instance configuration.
[in] evt_handler Event handler.
[in] p_context Pointer 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_transport Pointer to the transfer instance.
[in] p_data Pointer to the destination buffer.
[in] length Destination buffer length.
[in] p_cnt Pointer 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_transport Pointer 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_transport Pointer to the transfer instance.
[in] p_data Pointer to the source buffer.
[in] length Source buffer length.
[in] p_cnt Pointer to the sent bytes counter.
Returns
Standard error code.
  • components/libraries/cli/nrf_cli.h