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
uart.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Trackunit Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#include <zephyr/kernel.h>
8#include <zephyr/types.h>
9#include <zephyr/device.h>
10#include <zephyr/drivers/uart.h>
12#include <zephyr/sys/atomic.h>
13
14#include <zephyr/modem/pipe.h>
15
16#ifndef ZEPHYR_MODEM_BACKEND_UART_
17#define ZEPHYR_MODEM_BACKEND_UART_
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
29};
30
39};
40
42 const struct device *uart;
43 struct modem_pipe pipe;
45
46 union {
49 };
50};
51
53 const struct device *uart;
58};
59
60struct modem_pipe *modem_backend_uart_init(struct modem_backend_uart *backend,
61 const struct modem_backend_uart_config *config);
62
63#ifdef __cplusplus
64}
65#endif
66
67#endif /* ZEPHYR_MODEM_BACKEND_UART_ */
long atomic_t
Definition: atomic.h:22
Public APIs for UART drivers.
Public kernel APIs.
struct modem_pipe * modem_backend_uart_init(struct modem_backend_uart *backend, const struct modem_backend_uart_config *config)
__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:381
A structure used to submit work.
Definition: kernel.h:3865
Definition: uart.h:31
uint32_t transmit_buf_size
Definition: uart.h:36
uint32_t receive_buf_size
Definition: uart.h:33
uint8_t * receive_bufs[2]
Definition: uart.h:32
struct k_work rx_disabled_work
Definition: uart.h:37
atomic_t state
Definition: uart.h:38
uint8_t * transmit_buf
Definition: uart.h:35
struct ring_buf receive_rdb[2]
Definition: uart.h:34
Definition: uart.h:52
uint32_t receive_buf_size
Definition: uart.h:55
uint32_t transmit_buf_size
Definition: uart.h:57
const struct device * uart
Definition: uart.h:53
uint8_t * transmit_buf
Definition: uart.h:56
uint8_t * receive_buf
Definition: uart.h:54
Definition: uart.h:23
uint32_t transmit_buf_put_limit
Definition: uart.h:28
atomic_t transmit_buf_len
Definition: uart.h:26
struct ring_buf transmit_rb
Definition: uart.h:25
uint8_t receive_rdb_used
Definition: uart.h:27
struct ring_buf receive_rdb[2]
Definition: uart.h:24
Definition: uart.h:41
const struct device * uart
Definition: uart.h:42
struct k_work receive_ready_work
Definition: uart.h:44
struct modem_pipe pipe
Definition: uart.h:43
A structure to represent a ring buffer.
Definition: ring_buffer.h:41