Zephyr API 3.6.99
|
Unified shell transport interface. More...
#include <shell.h>
Data Fields | |
int(* | init )(const struct shell_transport *transport, const void *config, shell_transport_handler_t evt_handler, void *context) |
Function for initializing the shell transport interface. | |
int(* | uninit )(const struct shell_transport *transport) |
Function for uninitializing the shell transport interface. | |
int(* | enable )(const struct shell_transport *transport, bool blocking_tx) |
Function for enabling transport in given TX mode. | |
int(* | write )(const struct shell_transport *transport, const void *data, size_t length, size_t *cnt) |
Function for writing data to the transport interface. | |
int(* | read )(const struct shell_transport *transport, void *data, size_t length, size_t *cnt) |
Function for reading data from the transport interface. | |
void(* | update )(const struct shell_transport *transport) |
Function called in shell thread loop. | |
Unified shell transport interface.
int(* shell_transport_api::enable) (const struct shell_transport *transport, bool blocking_tx) |
Function for enabling transport in given TX mode.
Function can be used to reconfigure TX to work in blocking mode.
transport | Pointer to the transfer instance. |
blocking_tx | If true, the transport TX is enabled in blocking mode. |
int(* shell_transport_api::init) (const struct shell_transport *transport, const void *config, shell_transport_handler_t evt_handler, void *context) |
Function for initializing the shell transport interface.
[in] | transport | Pointer to the transfer instance. |
[in] | config | Pointer to instance configuration. |
[in] | evt_handler | Event handler. |
[in] | context | Pointer to the context passed to event handler. |
int(* shell_transport_api::read) (const struct shell_transport *transport, void *data, size_t length, size_t *cnt) |
Function for reading data from the transport interface.
[in] | transport | Pointer to the transfer instance. |
[in] | data | Pointer to the destination buffer. |
[in] | length | Destination buffer length. |
[out] | cnt | Pointer to the received bytes counter. |
int(* shell_transport_api::uninit) (const struct shell_transport *transport) |
Function for uninitializing the shell transport interface.
[in] | transport | Pointer to the transfer instance. |
void(* shell_transport_api::update) (const struct shell_transport *transport) |
Function called in shell thread loop.
Can be used for backend operations that require longer execution time
[in] | transport | Pointer to the transfer instance. |
int(* shell_transport_api::write) (const struct shell_transport *transport, const void *data, size_t length, size_t *cnt) |
Function for writing data to the transport interface.
[in] | transport | Pointer to the transfer instance. |
[in] | data | Pointer to the source buffer. |
[in] | length | Source buffer length. |
[out] | cnt | Pointer to the sent bytes counter. |