43#define SOFT_UART_FLAG_INVERT_TX 0x1
48#define SOFT_UART_FLAG_INVERT_RX 0x2
Low-level GPIO peripheral driver interface definitions.
Low-level timer peripheral driver interface definitions.
Low-level UART peripheral driver interface definition.
uint_fast8_t tim_t
Default timer type.
void(* uart_rx_cb_t)(void *arg, uint8_t data)
Signature for receive interrupt callback.
unsigned soft_uart_t
Software UART type definition.
void soft_uart_write(soft_uart_t uart, const uint8_t *data, size_t len)
Write data from the given buffer to the specified UART device.
int soft_uart_mode(soft_uart_t uart, uart_data_bits_t data_bits, uart_parity_t parity, uart_stop_bits_t stop_bits)
Setup parity, data and stop bits for a given UART device.
void soft_uart_poweroff(soft_uart_t uart)
Power off the given UART device.
void soft_uart_poweron(soft_uart_t uart)
Power on the given UART device.
int soft_uart_init(soft_uart_t uart, uint32_t baudrate, uart_rx_cb_t rx_cb, void *arg)
Initialize a given UART device.
uart_parity_t
Definition of possible parity modes.
uart_stop_bits_t
Definition of possible stop bits lengths.
uart_data_bits_t
Definition of possible data bits lengths in a UART frame.
Software UART port descriptor.
uint32_t timer_freq
Operating frequency of the timer.
tim_t rx_timer
Hardware timer used for RX.
tim_t tx_timer
Hardware timer used for TX.
uint8_t flags
Soft UART flags.