Go to the documentation of this file.
143 uint32_t bytes_number);
147 uint32_t bytes_number);
151 uint32_t bytes_number);
enum uart_parity parity
Definition: uart.h:109
@ UART_STOP_2_BIT
Definition: uart.h:94
int32_t uart_write_nonblocking(struct uart_desc *desc, const uint8_t *data, uint32_t bytes_number)
Submit writting buffer to the UART driver.
Definition: uart.c:402
@ UART_STOP_1_BIT
Definition: uart.h:92
int32_t uart_remove(struct uart_desc *desc)
Free the resources allocated by uart_init()
Definition: uart.c:509
void * extra
Definition: uart.h:113
@ UART_PAR_MARK
Definition: uart.h:77
@ UART_CS_8
Definition: uart.h:64
uint32_t uart_get_errors(struct uart_desc *desc)
Free the resources allocated by uart_init()
Definition: uart.c:530
uint8_t device_id
Definition: uart.h:103
@ UART_PAR_NO
Definition: uart.h:75
void * extra
Definition: uart.h:131
enum uart_stop stop
Definition: uart.h:111
enum uart_size size
Definition: uart.h:107
int32_t uart_init(struct uart_desc **desc, struct uart_init_param *param)
Initialize the UART communication peripheral.
Definition: uart.c:441
uart_size
UART character size (number of data bits) options.
Definition: uart.h:56
@ UART_PAR_ODD
Definition: uart.h:81
uint32_t baud_rate
Definition: uart.h:124
void(* callback)(void *callback_ctx, uint32_t event, void *extra)
Definition: uart.h:126
@ UART_CS_6
Definition: uart.h:60
@ UART_CS_9
Definition: uart.h:66
@ UART_CS_7
Definition: uart.h:62
int32_t uart_read(struct uart_desc *desc, uint8_t *data, uint32_t bytes_number)
Read data from UART. Blocking function.
Definition: uart.c:271
Stucture holding the UART descriptor.
Definition: uart.h:120
@ UART_CS_5
Definition: uart.h:58
uart_stop
UART number of stop bits options.
Definition: uart.h:90
int32_t uart_read_nonblocking(struct uart_desc *desc, uint8_t *data, uint32_t bytes_number)
Submit reading buffer to the UART driver.
Definition: uart.c:365
Structure holding the parameters for UART initialization.
Definition: uart.h:101
uint32_t baud_rate
Definition: uart.h:105
uint8_t device_id
Definition: uart.h:122
int32_t uart_write(struct uart_desc *desc, const uint8_t *data, uint32_t bytes_number)
Write data to UART. Blocking function.
Definition: uart.c:318
@ UART_PAR_EVEN
Definition: uart.h:83
uart_parity
UART parity options.
Definition: uart.h:73
@ UART_PAR_SPACE
Definition: uart.h:79
void * callback_ctx
Definition: uart.h:129