Clean up usart class a bit

This commit is contained in:
2024-12-15 12:46:53 +01:00
parent e227d9b499
commit e27ae40884
2 changed files with 5 additions and 11 deletions

View File

@@ -9,6 +9,10 @@
#include "stm32f4xx_hal_uart.h"
namespace driver::usart {
constexpr const uint8_t TX_BUFSIZE{20};
constexpr const uint8_t TX_TIMEOUT_MS{200};
class Usart {
public:
explicit Usart(USART_TypeDef* usart, uint32_t baudRate, uint32_t wordLength, uint32_t stopBits,
@@ -23,6 +27,5 @@ class Usart {
UART_HandleTypeDef mHandle{};
void tx(std::string_view range);
void flush();
};
} // namespace driver::usart