5#ifdef HAL_UART_MODULE_ENABLED
11#include "double_buffer.hpp"
13#include "libxr_def.hpp"
14#include "libxr_rw.hpp"
110stm32_uart_id_t stm32_uart_get_id(USART_TypeDef* addr);
128 uint32_t tx_queue_size = 5);
141 size_t last_rx_pos_ = 0;
143 UART_HandleTypeDef* uart_handle_;
147 stm32_uart_id_t id_ = STM32_UART_ID_ERROR;
149 static STM32UART* map[STM32_UART_NUMBER];
双缓冲区管理类 / Double buffer manager class
普通标志位(非原子)/ Non-atomic flag
原始数据封装类。 A class for encapsulating raw data.
ReadPort class for handling read operations.
STM32 UART 驱动实现 / STM32 UART driver implementation.
STM32UART(UART_HandleTypeDef *uart_handle, RawData dma_buff_rx, RawData dma_buff_tx, uint32_t tx_queue_size=5)
构造 UART 对象 / Construct UART object
ErrorCode SetConfig(UART::Configuration config)
设置 UART 配置 / Sets the UART configuration
通用异步收发传输(UART)基类 / Abstract base class for Universal Asynchronous Receiver-Transmitter (UART)
WritePort class for handling write operations.
ErrorCode(* ReadFun)(ReadPort &port, bool in_isr)
Function pointer type for read operations.
ErrorCode(* WriteFun)(WritePort &port, bool in_isr)
Function pointer type for write operations.
UART 配置结构体 / UART configuration structure.