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 tx_queue_size=5) | |
ErrorCode | SetConfig (UART::Configuration config) |
设置 UART 配置 / Sets the UART configuration | |
![]() | |
template<typename ReadPortType = ReadPort, typename WritePortType = WritePort> | |
UART (ReadPortType *read_port, WritePortType *write_port) | |
UART 构造函数 / UART constructor. | |
template<typename OperationType , typename = std::enable_if_t<std::is_base_of_v< WriteOperation, std::decay_t<OperationType>>>> | |
ErrorCode | Write (ConstRawData data, OperationType &&op) |
template<typename OperationType , typename = std::enable_if_t<std::is_base_of_v< ReadOperation, std::decay_t<OperationType>>>> | |
ErrorCode | Read (RawData data, OperationType &&op) |
Static Public Member Functions | |
static ErrorCode | WriteFun (WritePort &port) |
static ErrorCode | ReadFun (ReadPort &port) |
Data Fields | |
ReadPort | _read_port |
WritePort | _write_port |
RawData | dma_buff_rx_ |
DoubleBuffer | dma_buff_tx_ |
WriteInfoBlock | write_info_active_ |
size_t | last_rx_pos_ = 0 |
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 113 of file stm32_uart.hpp.
|
inline |
Definition at line 190 of file stm32_uart.hpp.
|
inlinestatic |
Definition at line 182 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 225 of file stm32_uart.hpp.
|
inlinestatic |
Definition at line 116 of file stm32_uart.hpp.
ReadPort LibXR::STM32UART::_read_port |
Definition at line 266 of file stm32_uart.hpp.
WritePort LibXR::STM32UART::_write_port |
Definition at line 267 of file stm32_uart.hpp.
RawData LibXR::STM32UART::dma_buff_rx_ |
Definition at line 269 of file stm32_uart.hpp.
DoubleBuffer LibXR::STM32UART::dma_buff_tx_ |
Definition at line 270 of file stm32_uart.hpp.
stm32_uart_id_t LibXR::STM32UART::id_ = STM32_UART_ID_ERROR |
Definition at line 277 of file stm32_uart.hpp.
size_t LibXR::STM32UART::last_rx_pos_ = 0 |
Definition at line 273 of file stm32_uart.hpp.
|
static |
Definition at line 279 of file stm32_uart.hpp.
UART_HandleTypeDef* LibXR::STM32UART::uart_handle_ |
Definition at line 275 of file stm32_uart.hpp.
WriteInfoBlock LibXR::STM32UART::write_info_active_ |
Definition at line 271 of file stm32_uart.hpp.