Unified shell transport interface.
More...
#include <zephyr/shell/shell.h>
|
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.
◆ enable
Function for enabling transport in given TX mode.
Function can be used to reconfigure TX to work in blocking mode.
- Parameters
-
transport | Pointer to the transfer instance. |
blocking_tx | If true, the transport TX is enabled in blocking mode. |
- Returns
- NRF_SUCCESS on successful enabling, error otherwise (also if not supported).
◆ init
Function for initializing the shell transport interface.
- Parameters
-
[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. |
- Returns
- Standard error code.
◆ read
Function for reading data from the transport interface.
- Parameters
-
[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. |
- Returns
- Standard error code.
◆ uninit
int(* shell_transport_api::uninit) (const struct shell_transport *transport) |
Function for uninitializing the shell transport interface.
- Parameters
-
[in] | transport | Pointer to the transfer instance. |
- Returns
- Standard error code.
◆ update
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
- Parameters
-
[in] | transport | Pointer to the transfer instance. |
◆ write
Function for writing data to the transport interface.
- Parameters
-
[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. |
- Returns
- Standard error code.
The documentation for this struct was generated from the following file: