Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Public APIs for UART drivers. More...
Go to the source code of this file.
Data Structures | |
struct | uart_event_tx |
UART TX event data. More... | |
struct | uart_event_rx |
UART RX event data. More... | |
struct | uart_event_rx_buf |
UART RX buffer released event data. More... | |
struct | uart_event_rx_stop |
UART RX stopped data. More... | |
struct | uart_event |
Structure containing information about current event. More... | |
union | uart_event::uart_event_data |
Event data. More... | |
struct | uart_config |
UART controller configuration structure. More... | |
struct | uart_device_config |
UART device configuration. More... | |
struct | uart_driver_api |
Driver API structure. More... | |
Typedefs | |
typedef void(* | uart_callback_t) (const struct device *dev, struct uart_event *evt, void *user_data) |
Define the application callback function signature for uart_callback_set() function. More... | |
typedef void(* | uart_irq_callback_user_data_t) (const struct device *dev, void *user_data) |
Define the application callback function signature for uart_irq_callback_user_data_set() function. More... | |
typedef void(* | uart_irq_config_func_t) (const struct device *dev) |
For configuring IRQ on each individual UART device. More... | |
Functions | |
static int | uart_callback_set (const struct device *dev, uart_callback_t callback, void *user_data) |
Set event handler function. More... | |
int | uart_tx (const struct device *dev, const uint8_t *buf, size_t len, int32_t timeout) |
Send given number of bytes from buffer through UART. More... | |
int | uart_tx_abort (const struct device *dev) |
Abort current TX transmission. More... | |
int | uart_rx_enable (const struct device *dev, uint8_t *buf, size_t len, int32_t timeout) |
Start receiving data through UART. More... | |
static int | uart_rx_buf_rsp (const struct device *dev, uint8_t *buf, size_t len) |
Provide receive buffer in response to uart_event_type::UART_RX_BUF_REQUEST event. More... | |
int | uart_rx_disable (const struct device *dev) |
Disable RX. More... | |
int | uart_err_check (const struct device *dev) |
Check whether an error was detected. More... | |
int | uart_poll_in (const struct device *dev, unsigned char *p_char) |
Poll the device for input. More... | |
void | uart_poll_out (const struct device *dev, unsigned char out_char) |
Output a character in polled mode. More... | |
int | uart_configure (const struct device *dev, const struct uart_config *cfg) |
Set UART configuration. More... | |
int | uart_config_get (const struct device *dev, struct uart_config *cfg) |
Get UART configuration. More... | |
static int | uart_fifo_fill (const struct device *dev, const uint8_t *tx_data, int size) |
Fill FIFO with data. More... | |
static int | uart_fifo_read (const struct device *dev, uint8_t *rx_data, const int size) |
Read data from FIFO. More... | |
void | uart_irq_tx_enable (const struct device *dev) |
Enable TX interrupt in IER. More... | |
void | uart_irq_tx_disable (const struct device *dev) |
Disable TX interrupt in IER. More... | |
static int | uart_irq_tx_ready (const struct device *dev) |
Check if UART TX buffer can accept a new char. More... | |
void | uart_irq_rx_enable (const struct device *dev) |
Enable RX interrupt. More... | |
void | uart_irq_rx_disable (const struct device *dev) |
Disable RX interrupt. More... | |
static int | uart_irq_tx_complete (const struct device *dev) |
Check if UART TX block finished transmission. More... | |
static int | uart_irq_rx_ready (const struct device *dev) |
Check if UART RX buffer has a received char. More... | |
void | uart_irq_err_enable (const struct device *dev) |
Enable error interrupt. More... | |
void | uart_irq_err_disable (const struct device *dev) |
Disable error interrupt. More... | |
int | uart_irq_is_pending (const struct device *dev) |
Check if any IRQs is pending. More... | |
int | uart_irq_update (const struct device *dev) |
Start processing interrupts in ISR. More... | |
static void | uart_irq_callback_user_data_set (const struct device *dev, uart_irq_callback_user_data_t cb, void *user_data) |
Set the IRQ callback function pointer. More... | |
static void | uart_irq_callback_set (const struct device *dev, uart_irq_callback_user_data_t cb) |
Set the IRQ callback function pointer (legacy). More... | |
int | uart_line_ctrl_set (const struct device *dev, uint32_t ctrl, uint32_t val) |
Manipulate line control for UART. More... | |
int | uart_line_ctrl_get (const struct device *dev, uint32_t ctrl, uint32_t *val) |
Retrieve line control for UART. More... | |
int | uart_drv_cmd (const struct device *dev, uint32_t cmd, uint32_t p) |
Send extra command to driver. More... | |
Public APIs for UART drivers.