libxr 1.0
Want to be the best embedded framework
|
Public Member Functions | |
STM32UART (UART_HandleTypeDef *uart_handle, RawData dma_buff_rx, RawData dma_buff_tx, uint32_t rx_queue_size=5, uint32_t tx_queue_size=5) | |
ErrorCode | SetConfig (UART::Configuration config) |
设置 UART 配置 / Sets the UART configuration | |
![]() | |
UART (size_t rx_queue_size, size_t rx_buffer_size, size_t tx_queue_size, size_t tx_buffer_size) | |
UART 构造函数 / UART constructor. | |
Static Public Member Functions | |
static ErrorCode | WriteFun (WritePort &port) |
static ErrorCode | ReadFun (ReadPort &port) |
Data Fields | |
RawData | dma_buff_rx_ |
RawData | dma_buff_tx_ |
UART_HandleTypeDef * | uart_handle_ |
stm32_uart_id_t | id_ = STM32_UART_ID_ERROR |
![]() | |
ReadPort | read_port_ |
读取端口 / Read port | |
WritePort | write_port_ |
写入端口 / Write port | |
Static Public Attributes | |
static STM32UART * | map [STM32_UART_NUMBER] = {nullptr} |
Additional Inherited Members | |
![]() | |
enum class | Parity : uint8_t { NO_PARITY = 0 , EVEN = 1 , ODD = 2 } |
奇偶校验模式 / Parity mode More... | |
Definition at line 112 of file stm32_uart.hpp.
|
inline |
Definition at line 179 of file stm32_uart.hpp.
Definition at line 152 of file stm32_uart.hpp.
|
inlinevirtual |
设置 UART 配置 / Sets the UART configuration
ErrorCode::OK
,否则返回相应错误码 / Returns the operation status, ErrorCode::OK
if successful, otherwise an error code该方法为纯虚函数,子类必须实现具体的 UART 配置逻辑。 This is a pure virtual function. Subclasses must implement the specific UART configuration logic.
Implements LibXR::UART.
Definition at line 208 of file stm32_uart.hpp.
Definition at line 115 of file stm32_uart.hpp.
RawData LibXR::STM32UART::dma_buff_rx_ |
Definition at line 249 of file stm32_uart.hpp.
RawData LibXR::STM32UART::dma_buff_tx_ |
Definition at line 249 of file stm32_uart.hpp.
stm32_uart_id_t LibXR::STM32UART::id_ = STM32_UART_ID_ERROR |
Definition at line 253 of file stm32_uart.hpp.
Definition at line 255 of file stm32_uart.hpp.
UART_HandleTypeDef* LibXR::STM32UART::uart_handle_ |
Definition at line 251 of file stm32_uart.hpp.