12#ifdef HAL_UART_MODULE_ENABLED
23template <UartType TxType>
class UartTx;
24template <UartType RxType>
class UartRx;
62template <UartType TxType = UartType::IT, UartType RxType = UartType::IT>
65 Uart(UART_HandleTypeDef *huart,
size_t rx_buf_size = 64)
66 : tx_{huart}, rx_{huart, rx_buf_size} {}
68 bool transmit(
const uint8_t *data,
size_t size, uint32_t timeout) {
69 return tx_.transmit(data, size, timeout);
72 bool receive(uint8_t *data,
size_t size, uint32_t timeout) {
73 return rx_.receive(data, size, timeout);
Definition uart_base.hpp:9
void flush()
Definition uart.hpp:76
size_t available()
Definition uart.hpp:78
bool transmit(const uint8_t *data, size_t size, uint32_t timeout)
Definition uart.hpp:68
Uart(UART_HandleTypeDef *huart, size_t rx_buf_size=64)
Definition uart.hpp:65
bool receive(uint8_t *data, size_t size, uint32_t timeout)
Definition uart.hpp:72