1 #ifndef RUUVI_INTERFACE_UART_H
2 #define RUUVI_INTERFACE_UART_H
38 ruuvi_interface_gpio_id_t
tx;
39 ruuvi_interface_gpio_id_t
rx;
40 ruuvi_interface_gpio_id_t
cts;
41 ruuvi_interface_gpio_id_t
rts;
Ruuvi error codes and error check function.
ruuvi_driver_status_t ruuvi_interface_uart_uninit()
Uninitialize UART driver.
ruuvi_interface_uart_baud_t
@ RUUVI_INTERFACE_UART_BAUD_9600
9600 bauds
@ RUUVI_INTERFACE_UART_BAUD_115200
2 Mbps
bool ruuvi_interface_uart_is_init()
check if UART interface is already initialized.
ruuvi_driver_status_t ruuvi_interface_uart_send_blocking(const uint8_t *const p_tx, const size_t tx_len)
UART write function. Function is blocking and will not sleep while transaction is ongoing.
ruuvi_driver_status_t ruuvi_interface_uart_init(const ruuvi_interface_uart_init_config_t *const config)
Callback function for received data.
ruuvi_interface_gpio_id_t tx
pin number of TX.
ruuvi_interface_gpio_id_t cts
pin number of CTS.
bool parity
True -> parity bit enabled. False -> disabled.
ruuvi_interface_uart_baud_t baud
Baud rate, see ruuvi_interface_uart_baud_t.
ruuvi_interface_gpio_id_t rts
pin number of RTS.
bool hwfc
True -> Hardware flow control enabled. False -> disabled.
ruuvi_interface_gpio_id_t rx
pin number of RX.