Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
#include <zephyr/drivers/uart.h>
#include <zephyr/logging/log.h>
#include <zephyr/spinlock.h>
#include <zephyr/sys/util.h>
#include <zephyr/drivers/serial/uart_async_rx.h>
Go to the source code of this file.
#define | UART_ASYNC_TO_IRQ_API_INIT() |
Interrupt driven API initializer. | |
#define | UART_ASYNC_TO_IRQ_API_CONFIG_INITIALIZER(_api, _trampoline, _baudrate, _tx_buf, _tx_len, _rx_buf, _rx_len, _rx_cnt, _log) |
Configuration structure initializer. | |
typedef void(* | uart_async_to_irq_trampoline) (const struct device *dev) |
void | uart_async_to_irq_trampoline_cb (const struct device *dev) |
Callback to be called from trampoline context. | |
int | uart_async_to_irq_init (struct uart_async_to_irq_data *data, const struct uart_async_to_irq_config *config) |
Initialize the adaptation layer. | |
int | uart_async_to_irq_rx_enable (const struct device *dev) |
int | uart_async_to_irq_rx_disable (const struct device *dev) |
#define UART_ASYNC_TO_IRQ_API_CONFIG_INITIALIZER | ( | _api, | |
_trampoline, | |||
_baudrate, | |||
_tx_buf, | |||
_tx_len, | |||
_rx_buf, | |||
_rx_len, | |||
_rx_cnt, | |||
_log | |||
) |
Configuration structure initializer.
_api | Structure with UART asynchronous API. |
_trampoline | Function that trampolines to the interrupt context. |
_baudrate | UART baudrate. |
_tx_buf | TX buffer. |
_tx_len | TX buffer length. |
_rx_buf | RX buffer. |
_rx_len | RX buffer length. |
_rx_cnt | Number of chunks into which RX buffer is divided. |
_log | Logging instance, if not provided (empty) then default is used. |
#define UART_ASYNC_TO_IRQ_API_INIT | ( | ) |
Interrupt driven API initializer.
It should be used in the initialization of the UART API structure in the driver to provide interrupt driven API functions.
typedef void(* uart_async_to_irq_trampoline) (const struct device *dev) |
int uart_async_to_irq_init | ( | struct uart_async_to_irq_data * | data, |
const struct uart_async_to_irq_config * | config | ||
) |
Initialize the adaptation layer.
data | Data associated with the given adaptation layer instance. |
config | Configuration structure. Must be persistent. |
0 | On successful initialization. |
int uart_async_to_irq_rx_disable | ( | const struct device * | dev | ) |
int uart_async_to_irq_rx_enable | ( | const struct device * | dev | ) |
void uart_async_to_irq_trampoline_cb | ( | const struct device * | dev | ) |
Callback to be called from trampoline context.
dev | UART device. |