4#include DEF2STR(LIBXR_CH32_CONFIG_FILE)
63static constexpr uint8_t CH32_UART_APB_MAP[] = {
114static constexpr uint32_t CH32_UART_RCC_PERIPH_MAP[] = {
116 RCC_APB2Periph_USART1,
119 RCC_APB1Periph_USART2,
122 RCC_APB1Periph_USART3,
149 RCC_APB1Periph_UART4,
152 RCC_APB1Periph_UART5,
155 RCC_APB1Periph_UART6,
158 RCC_APB1Periph_UART7,
161 RCC_APB1Periph_UART8,
165static constexpr uint32_t CH32_UART_RCC_PERIPH_MAP_DMA[] = {
200#if defined(CH32V20x_D6) || defined(CH32V20x_D8) || defined(CH32V20x_D8W)
220static constexpr uint32_t CH32_UART_TX_DMA_IT_MAP[] = {
255#if !(defined(CH32V20x_D6) || defined(CH32V20x_D8) || defined(CH32V20x_D8W)) && \
276static constexpr uint32_t CH32_UART_RX_DMA_IT_TC_MAP[] = {
311#if !(defined(CH32V20x_D6) || defined(CH32V20x_D8) || defined(CH32V20x_D8W)) && \
332static constexpr uint32_t CH32_UART_RX_DMA_IT_HT_MAP[] = {
367#if !(defined(CH32V20x_D6) || defined(CH32V20x_D8) || defined(CH32V20x_D8W)) && \
388static DMA_Channel_TypeDef*
const CH32_UART_TX_DMA_CHANNEL_MAP[] = {
423#if !(defined(CH32V20x_D6) || defined(CH32V20x_D8) || defined(CH32V20x_D8W)) && \
424 defined(DMA2_Channel5)
444static DMA_Channel_TypeDef*
const CH32_UART_RX_DMA_CHANNEL_MAP[] = {
479#if !(defined(CH32V20x_D6) || defined(CH32V20x_D8) || defined(CH32V20x_D8W)) && \
480 defined(DMA2_Channel3)
500static constexpr IRQn_Type CH32_UART_IRQ_MAP[] = {
551ch32_uart_id_t ch32_uart_get_id(USART_TypeDef* addr);
552USART_TypeDef* ch32_uart_get_instance_id(ch32_uart_id_t);