27typedef enum { UART_PORT_1 = 0, UART_PORT_2, NUM_UART_PORTS }
UartPort;
30#define UART_MAX_BUFFER_LEN 256U
32#define UART_TIMEOUT_MS 1U
StatusCode
StatusCodes for various errors.
Definition: status.h:27
StatusCode uart_tx(UartPort uart, uint8_t *data, size_t len)
Transmit data from the UART port.
Definition: uart.c:145
UartPort
UART Port selection.
Definition: uart.h:27
StatusCode uart_init(UartPort uart, UartSettings *settings)
Initialize UART instance, assuming standard 8 bits 1 stop bit.
Definition: uart.c:149
UartFlowControl
UART Flow control selection.
Definition: uart.h:39
StatusCode uart_rx(UartPort uart, uint8_t *data, size_t len)
Receive data from the UART port.
Definition: uart.c:141
@ UART_FLOW_CONTROL_RTS_CTS
Definition: uart.h:43
@ UART_FLOW_CONTROL_CTS
Definition: uart.h:42
@ UART_FLOW_CONTROL_RTS
Definition: uart.h:41
@ UART_FLOW_CONTROL_NONE
Definition: uart.h:40
Port and pin data.
Definition: gpio.h:112
UART Settings.
Definition: uart.h:53
GpioAddress rx
Definition: uart.h:55
UartFlowControl flow_control
Definition: uart.h:57
uint32_t baudrate
Definition: uart.h:56
GpioAddress tx
Definition: uart.h:54