Pin and port name type definitions.
hal_pin_name_t pin_name_t
Definition drv_name.h:74
uart_parity_t
Definition drv_uart.h:80
@ UART_PARITY_DEFAULT
Definition drv_uart.h:85
@ UART_PARITY_NONE
Definition drv_uart.h:81
@ UART_PARITY_EVEN
Definition drv_uart.h:82
@ UART_PARITY_ODD
Definition drv_uart.h:83
uart_stop_bits_t
Definition drv_uart.h:92
@ UART_STOP_BITS_ONE_AND_A_HALF
Definition drv_uart.h:95
@ UART_STOP_BITS_HALF
Definition drv_uart.h:93
@ UART_STOP_BITS_ONE
Definition drv_uart.h:94
@ UART_STOP_BITS_DEFAULT
Definition drv_uart.h:98
@ UART_STOP_BITS_TWO
Definition drv_uart.h:96
uart_data_bits_t
Definition drv_uart.h:68
@ UART_DATA_BITS_7
Definition drv_uart.h:69
@ UART_DATA_BITS_9
Definition drv_uart.h:71
@ UART_DATA_BITS_8
Definition drv_uart.h:70
@ UART_DATA_BITS_DEFAULT
Definition drv_uart.h:73
uart_err_t
Definition drv_uart.h:59
@ UART_SUCCESS
Definition drv_uart.h:60
@ UART_ERROR
Definition drv_uart.h:61
void uart_configure_default(uart_config_t *config)
Configure UART Driver configuration structure.
err_t uart_close(uart_t *obj)
Close UART Driver object.
err_t uart_read(uart_t *obj, uint8_t *buffer, size_t size)
Read data from UART.
err_t uart_set_parity(uart_t *obj, uart_parity_t parity)
Set the UART parity.
err_t uart_print(uart_t *obj, char *text)
Print the string to UART.
err_t uart_write(uart_t *obj, uint8_t *buffer, size_t size)
Write data to UART.
err_t uart_set_baud(uart_t *obj, uint32_t baud)
Set the UART baud rate.
err_t uart_set_data_bits(uart_t *obj, uart_data_bits_t bits)
Set the number of UART data bits.
void uart_set_blocking(uart_t *obj, bool blocking)
Set UART Driver in blocking/non-blocking mode.
void uart_clear(uart_t *obj)
Discard all characters from UART buffers.
err_t uart_println(uart_t *obj, char *text)
Print the string to UART and append new line.
err_t uart_open(uart_t *obj, uart_config_t *config)
Open the UART Driver object.
err_t uart_set_stop_bits(uart_t *obj, uart_stop_bits_t stop)
Set the number of UART stop bits.
size_t uart_bytes_available(uart_t *obj)
Check number of bytes available to read from UART.
int32_t err_t
Definition hal_target.h:64
UART init configuration structure, consisted of the following fields :
Definition drv_uart.h:138
size_t tx_ring_size
Definition drv_uart.h:150
uint32_t baud
Definition drv_uart.h:142
uart_parity_t parity
Definition drv_uart.h:144
size_t rx_ring_size
Definition drv_uart.h:151
pin_name_t rx_pin
Definition drv_uart.h:140
ring_buf8_t rx_buf
Definition drv_uart.h:148
pin_name_t tx_pin
Definition drv_uart.h:139
ring_buf8_t tx_buf
Definition drv_uart.h:147
uart_stop_bits_t stop_bits
Definition drv_uart.h:145
uart_data_bits_t data_bits
Definition drv_uart.h:143
UART driver context structure, consisted of the following fields :
Definition drv_uart.h:165
handle_t handle
Definition drv_uart.h:166
uint8_t * tx_ring_buffer
Definition drv_uart.h:170
bool is_blocking
Definition drv_uart.h:176
bool is_rx_irq_enabled
Definition drv_uart.h:174
uart_config_t config
Definition drv_uart.h:168
bool is_tx_irq_enabled
Definition drv_uart.h:173
uint8_t * rx_ring_buffer
Definition drv_uart.h:171