|
libxr
Embedded C++ framework for bare-metal, RTOS and Linux
|
STM32 GPDMA 串口适配器 / STM32 GPDMA UART adapter. More...
#include <stm32_uart_gpdma.hpp>
Public Types | |
| using | AbortCallback = void (*)(DMA_HandleTypeDef*) |
Public Member Functions | |
| STM32GpdmaUartAdapter (UART_HandleTypeDef *uart_handle) | |
| 绑定已初始化的 UART 句柄 / Bind an initialized UART handle. | |
| HAL_StatusTypeDef | StartLinkedListDmaRx (uint8_t *buffer, size_t total_size, bool in_isr) |
| 构建或复用四节点循环链表并启动 RX / Build or reuse the four-node ring and start RX. | |
| uint8_t * | GetLinkedListDmaRxProducer () const |
| 读取一次当前 DMA 写入地址 / Read the current DMA destination address once. | |
| void | CloseTxTerminalSource () const |
| bool | LaunchStop (DMA_HandleTypeDef *dma_handle, AbortCallback callback, bool in_isr) |
| 启动异步中止或接续已有中止 / Start an asynchronous abort or join an existing abort. | |
| bool | AllStopsComplete () const |
| 检查所有已配置的 DMA 通道均已停止 / Check all configured DMA channels have stopped. | |
Static Public Attributes | |
| static constexpr size_t | RX_NODE_COUNT = 4U |
STM32 GPDMA 串口适配器 / STM32 GPDMA UART adapter.
持有四个线性接收节点与循环链表,数据缓冲区由调用者提供。 Owns four linear RX nodes and their circular list; the caller supplies the payload.
Definition at line 40 of file stm32_uart_gpdma.hpp.
| using LibXR::STM32GpdmaUartAdapter::AbortCallback = void (*)(DMA_HandleTypeDef*) |
Definition at line 44 of file stm32_uart_gpdma.hpp.
| void LibXR::STM32GpdmaUartAdapter::CloseTxTerminalSource | ( | ) | const |
关闭 TX 完成中断,保留 DMA 请求位 / Disable TX completion IRQ, retaining DMA requests.
|
staticconstexpr |
Definition at line 43 of file stm32_uart_gpdma.hpp.