12#ifndef ZEPHYR_DRIVERS_SERIAL_UART_ASYNC_RX_H_
13#define ZEPHYR_DRIVERS_SERIAL_UART_ASYNC_RX_H_
92#define UART_ASYNC_RX_BUF_OVERHEAD offsetof(struct uart_async_rx_buf, buffer)
long atomic_t
Definition atomic_types.h:15
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Definition uart_async_rx.h:22
uint8_t completed
Definition uart_async_rx.h:29
uint8_t wr_idx
Definition uart_async_rx.h:26
uint8_t buffer[]
Definition uart_async_rx.h:32
UART asynchronous RX helper configuration structure.
Definition uart_async_rx.h:62
uint8_t * buffer
Definition uart_async_rx.h:64
uint8_t buf_cnt
Definition uart_async_rx.h:70
size_t length
Definition uart_async_rx.h:67
UART asynchronous RX helper structure.
Definition uart_async_rx.h:36
atomic_t pending_bytes
Definition uart_async_rx.h:41
atomic_t free_buf_cnt
Definition uart_async_rx.h:44
uint8_t buf_len
Definition uart_async_rx.h:47
uint8_t rd_buf_idx
Definition uart_async_rx.h:53
const struct uart_async_rx_config * config
Definition uart_async_rx.h:38
uint8_t drv_buf_idx
Definition uart_async_rx.h:50
uint8_t rd_idx
Definition uart_async_rx.h:58
static fdata_t data[2]
Definition test_fifo_contexts.c:15
static ZTEST_BMEM char buffer[8]
Definition test_mbox_api.c:433
bool uart_async_rx_data_consume(struct uart_async_rx *async_rx, size_t length)
Consume claimed data.
uint8_t * uart_async_rx_buf_req(struct uart_async_rx *async_rx)
Get next RX buffer.
void uart_async_rx_on_buf_rel(struct uart_async_rx *async_rx, uint8_t *buf)
Indicate that buffer is no longer used by the UART driver.
size_t uart_async_rx_data_claim(struct uart_async_rx *async_rx, uint8_t **data, size_t length)
Claim received data for processing.
int uart_async_rx_init(struct uart_async_rx *async_rx, const struct uart_async_rx_config *config)
Initialize the helper instance.
static uint8_t uart_async_rx_get_buf_len(struct uart_async_rx *async_rx)
Get RX buffer length.
Definition uart_async_rx.h:79
void uart_async_rx_on_rdy(struct uart_async_rx *async_rx, uint8_t *buffer, size_t length)
Indicate received data.
void uart_async_rx_reset(struct uart_async_rx *async_rx)
Reset state of the helper instance.