17#ifndef ZEPHYR_INCLUDE_MODEM_BACKEND_UART_H_
18#define ZEPHYR_INCLUDE_MODEM_BACKEND_UART_H_
40#ifdef CONFIG_MODEM_BACKEND_UART_ASYNC_HWFC
42struct rx_queue_event {
48 struct modem_backend_uart_async_common
common;
49 struct k_mem_slab rx_slab;
50 struct k_msgq rx_queue;
51 struct rx_queue_event rx_event;
52 struct rx_queue_event rx_queue_buf[CONFIG_MODEM_BACKEND_UART_ASYNC_HWFC_BUFFER_COUNT];
80 struct modem_stats_buffer receive_buf_stats;
81 struct modem_stats_buffer transmit_buf_stats;
Header file for the Atomic operations API.
APIs and macros for the Zephyr device model.
Main header file for UART driver API.
long atomic_t
Atomic integer variable.
Definition atomic_types.h:34
struct modem_pipe * modem_backend_uart_init(struct modem_backend_uart *backend, const struct modem_backend_uart_config *config)
uint32_t modem_backend_uart_get_receive_dropped(const struct modem_backend_uart *backend)
Get the number of received bytes the backend dropped.
Simple, header-only ring buffer implementation.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Runtime device structure (in ROM) per driver instance.
Definition device.h:543
Container for GPIO pin information specified in devicetree.
Definition gpio.h:296
Kernel Spin Lock.
Definition spinlock.h:45
A structure used to submit work after a delay.
Definition kernel.h:4955
A structure used to submit work.
Definition kernel.h:4913
uint32_t transmit_buf_size
Definition uart.h:35
struct k_work rx_disabled_work
Definition uart.h:36
uint8_t * transmit_buf
Definition uart.h:34
atomic_t state
Definition uart.h:37
uint32_t receive_buf_size
Definition uart.h:62
struct modem_backend_uart_async_common common
Definition uart.h:60
uint8_t * receive_bufs[2]
Definition uart.h:61
struct k_spinlock receive_rb_lock
Definition uart.h:64
struct ring_buf receive_rb
Definition uart.h:63
uint32_t receive_buf_size
Definition uart.h:95
const struct gpio_dt_spec * dtr_gpio
Definition uart.h:92
uint32_t transmit_buf_size
Definition uart.h:97
const struct device * uart
Definition uart.h:91
uint8_t * transmit_buf
Definition uart.h:96
uint8_t * receive_buf
Definition uart.h:94
atomic_t receive_buf_len
Definition uart.h:28
uint32_t transmit_buf_put_limit
Definition uart.h:30
atomic_t transmit_buf_len
Definition uart.h:27
struct ring_buf transmit_rb
Definition uart.h:26
uint8_t receive_rdb_used
Definition uart.h:29
struct ring_buf receive_rdb[2]
Definition uart.h:25
const struct device * uart
Definition uart.h:70
struct k_work_delayable receive_ready_work
Definition uart.h:73
struct modem_backend_uart_async async
Definition uart.h:86
struct modem_backend_uart_isr isr
Definition uart.h:85
struct k_work transmit_idle_work
Definition uart.h:74
const struct gpio_dt_spec * dtr_gpio
Definition uart.h:71
uint32_t receive_dropped
Received bytes dropped because the receive buffer was full.
Definition uart.h:77
struct modem_pipe pipe
Definition uart.h:72
A structure to represent a ring buffer.
Definition ring_buffer.h:68