Go to the documentation of this file.
39 #ifndef _NO_OS_UART_H_
40 #define _NO_OS_UART_H_
54 #define UART_MAX_NUMBER 10
185 uint32_t bytes_number);
189 uint32_t bytes_number);
193 uint32_t bytes_number);
198 uint32_t bytes_number);
213 #endif // _NO_OS_UART_H_
const struct no_os_uart_platform_ops * platform_ops
Definition: no_os_uart.h:151
enum no_os_uart_parity parity
Definition: no_os_uart.h:128
int32_t no_os_uart_write(struct no_os_uart_desc *desc, const uint8_t *data, uint32_t bytes_number)
Write to UART.
Definition: no_os_uart.c:150
void * extra
Definition: no_os_uart.h:133
void no_os_uart_stdio(struct no_os_uart_desc *desc)
Definition: no_os_uart.c:222
@ NO_OS_UART_STOP_1_BIT
Definition: no_os_uart.h:100
void * mutex
Definition: no_os_uart.h:142
enum no_os_uart_size size
Definition: no_os_uart.h:126
int32_t no_os_uart_read(struct no_os_uart_desc *desc, uint8_t *data, uint32_t bytes_number)
Read data from UART.
Definition: no_os_uart.c:124
uint32_t baud_rate
Definition: no_os_uart.h:150
@ NO_OS_UART_CS_5
Definition: no_os_uart.h:66
no_os_uart_size
UART character size (number of data bits) options.
Definition: no_os_uart.h:64
uint32_t irq_id
Definition: no_os_uart.h:120
uint8_t device_id
Definition: no_os_uart.h:144
no_os_uart_parity
UART parity options.
Definition: no_os_uart.h:81
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:87
uint32_t no_os_uart_get_errors(struct no_os_uart_desc *desc)
Check if errors occurred on UART.
Definition: no_os_uart.c:106
Stucture holding the UART descriptor.
Definition: no_os_uart.h:140
bool asynchronous_rx
Definition: no_os_uart.h:122
void * extra
Definition: no_os_uart.h:153
@ NO_OS_UART_STOP_2_BIT
Definition: no_os_uart.h:102
struct lf256fifo * rx_fifo
Definition: no_os_uart.h:148
@ NO_OS_UART_PAR_SPACE
Definition: no_os_uart.h:87
uint32_t baud_rate
Definition: no_os_uart.h:124
enum no_os_uart_stop stop
Definition: no_os_uart.h:130
@ NO_OS_UART_CS_9
Definition: no_os_uart.h:74
@ NO_OS_UART_PAR_EVEN
Definition: no_os_uart.h:91
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)
Read data from UART non-blocking.
Definition: no_os_uart.c:176
uint32_t irq_id
Definition: no_os_uart.h:146
@ NO_OS_UART_CS_7
Definition: no_os_uart.h:70
const struct no_os_uart_platform_ops * platform_ops
Definition: no_os_uart.h:131
@ NO_OS_UART_CS_6
Definition: no_os_uart.h:68
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:58
Structure holding the parameters for UART initialization.
Definition: no_os_uart.h:116
@ NO_OS_UART_PAR_NO
Definition: no_os_uart.h:83
no_os_uart_stop
UART number of stop bits options.
Definition: no_os_uart.h:98
uint8_t device_id
Definition: no_os_uart.h:118
@ NO_OS_UART_PAR_MARK
Definition: no_os_uart.h:85
@ NO_OS_UART_PAR_ODD
Definition: no_os_uart.h:89
int32_t no_os_uart_write_nonblocking(struct no_os_uart_desc *desc, const uint8_t *data, uint32_t bytes_number)
Write to UART non-blocking.
Definition: no_os_uart.c:202
@ NO_OS_UART_CS_8
Definition: no_os_uart.h:72