20 uint16_t tx_gpio_pin, GPIO_TypeDef *rx_gpio_port, uint16_t rx_gpio_pin,
21 uint32_t pin_remap = 0, uint32_t tx_queue_size = 5,
29 static void TxDmaIRQHandler(DMA_Channel_TypeDef *channel, ch32_uart_id_t
id);
30 static void RxDmaIRQHandler(DMA_Channel_TypeDef *channel, ch32_uart_id_t
id);
42 size_t last_rx_pos_ = 0;
44 USART_TypeDef *instance_;
45 DMA_Channel_TypeDef *dma_rx_channel_;
46 DMA_Channel_TypeDef *dma_tx_channel_;
48 static CH32UART *map[CH32_UART_NUMBER];