Zephyr API Documentation  3.5.0
A Scalable Open Source RTOS
3.5.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
shell_uart.h File Reference

Go to the source code of this file.

Data Structures

struct  shell_uart_ctrl_blk
 Shell UART transport instance control block (RW data). More...
 
struct  shell_uart
 Shell UART transport instance structure. More...
 

Macros

#define SHELL_UART_DEFINE(_name, _tx_ringbuf_size, _rx_ringbuf_size)
 Macro for creating shell UART transport instance.
 

Functions

const struct shellshell_backend_uart_get_ptr (void)
 This function provides pointer to shell uart backend instance.
 

Variables

const struct shell_transport_api shell_uart_transport_api
 

Macro Definition Documentation

◆ SHELL_UART_DEFINE

#define SHELL_UART_DEFINE (   _name,
  _tx_ringbuf_size,
  _rx_ringbuf_size 
)
Value:
static struct shell_uart_ctrl_blk _name##_ctrl_blk; \
Z_UART_SHELL_RX_TIMER_DECLARE(_name); \
Z_UART_SHELL_DTR_TIMER_DECLARE(_name); \
Z_UART_SHELL_TX_RINGBUF_DECLARE(_name, _tx_ringbuf_size); \
RING_BUF_DECLARE(_name##_rx_ringbuf, _rx_ringbuf_size); \
static const struct shell_uart _name##_shell_uart = { \
.ctrl_blk = &_name##_ctrl_blk, \
.timer = Z_UART_SHELL_RX_TIMER_PTR(_name), \
.dtr_timer = Z_UART_SHELL_DTR_TIMER_PTR(_name), \
.tx_ringbuf = Z_UART_SHELL_TX_RINGBUF_PTR(_name), \
.rx_ringbuf = &_name##_rx_ringbuf, \
}; \
struct shell_transport _name = { \
.ctx = (struct shell_uart *)&_name##_shell_uart \
}
const struct shell_transport_api shell_uart_transport_api
Definition: shell.h:690
const struct shell_transport_api * api
Definition: shell.h:691
Shell UART transport instance control block (RW data).
Definition: shell_uart.h:22
Shell UART transport instance structure.
Definition: shell_uart.h:55
struct shell_uart_ctrl_blk * ctrl_blk
Definition: shell_uart.h:56

Macro for creating shell UART transport instance.

Function Documentation

◆ shell_backend_uart_get_ptr()

const struct shell * shell_backend_uart_get_ptr ( void  )

This function provides pointer to shell uart backend instance.

Function returns pointer to the shell uart instance. This instance can be next used with shell_execute_cmd function in order to test commands behavior.

Returns
Pointer to the shell instance.

Variable Documentation

◆ shell_uart_transport_api

const struct shell_transport_api shell_uart_transport_api
extern