Go to the documentation of this file.
39 #ifndef _NO_OS_UART_H_
40 #define _NO_OS_UART_H_
145 uint32_t bytes_number);
149 uint32_t bytes_number);
153 uint32_t bytes_number);
158 uint32_t bytes_number);
170 #endif // _NO_OS_UART_H_
enum no_os_uart_parity parity
Definition: no_os_uart.h:115
int32_t no_os_uart_write(struct no_os_uart_desc *desc, const uint8_t *data, uint32_t bytes_number)
Write data to UART. Blocking function.
Definition: no_os_uart.c:210
void * extra
Definition: no_os_uart.h:119
@ NO_OS_UART_STOP_1_BIT
Definition: no_os_uart.h:94
enum no_os_uart_size size
Definition: no_os_uart.h:113
int32_t no_os_uart_read(struct no_os_uart_desc *desc, uint8_t *data, uint32_t bytes_number)
Read data from UART. Blocking function.
Definition: no_os_uart.c:154
uint32_t baud_rate
Definition: no_os_uart.h:134
@ NO_OS_UART_CS_5
Definition: no_os_uart.h:60
no_os_uart_size
UART character size (number of data bits) options.
Definition: no_os_uart.h:58
uint32_t irq_id
Definition: no_os_uart.h:107
uint8_t device_id
Definition: no_os_uart.h:128
no_os_uart_parity
UART parity options.
Definition: no_os_uart.h:75
int32_t no_os_uart_remove(struct no_os_uart_desc *desc)
Free the resources allocated by no_os_uart_init().
Definition: no_os_uart.c:446
uint32_t no_os_uart_get_errors(struct no_os_uart_desc *desc)
Free the resources allocated by no_os_uart_init().
Definition: no_os_uart.c:475
Stucture holding the UART descriptor.
Definition: no_os_uart.h:126
bool asynchronous_rx
Definition: no_os_uart.h:109
void * extra
Definition: no_os_uart.h:136
@ NO_OS_UART_STOP_2_BIT
Definition: no_os_uart.h:96
struct lf256fifo * rx_fifo
Definition: no_os_uart.h:132
@ NO_OS_UART_PAR_SPACE
Definition: no_os_uart.h:81
uint32_t baud_rate
Definition: no_os_uart.h:111
enum no_os_uart_stop stop
Definition: no_os_uart.h:117
@ NO_OS_UART_CS_9
Definition: no_os_uart.h:68
@ NO_OS_UART_PAR_EVEN
Definition: no_os_uart.h:85
SPSC lock-free fifo of fixed size (256), specialized for UART.
int32_t no_os_uart_read_nonblocking(struct no_os_uart_desc *desc, uint8_t *data, uint32_t bytes_number)
Submit reading buffer to the UART driver.
Definition: no_os_uart.c:257
uint32_t irq_id
Definition: no_os_uart.h:130
@ NO_OS_UART_CS_7
Definition: no_os_uart.h:64
@ NO_OS_UART_CS_6
Definition: no_os_uart.h:62
int32_t no_os_uart_init(struct no_os_uart_desc **desc, struct no_os_uart_init_param *param)
Initialize the UART communication peripheral.
Definition: no_os_uart.c:334
Structure holding the parameters for UART initialization.
Definition: no_os_uart.h:103
@ NO_OS_UART_PAR_NO
Definition: no_os_uart.h:77
no_os_uart_stop
UART number of stop bits options.
Definition: no_os_uart.h:92
uint8_t device_id
Definition: no_os_uart.h:105
@ NO_OS_UART_PAR_MARK
Definition: no_os_uart.h:79
@ NO_OS_UART_PAR_ODD
Definition: no_os_uart.h:83
int32_t no_os_uart_write_nonblocking(struct no_os_uart_desc *desc, const uint8_t *data, uint32_t bytes_number)
Submit writting buffer to the UART driver.
Definition: no_os_uart.c:294
@ NO_OS_UART_CS_8
Definition: no_os_uart.h:66