[bsp][stm32] 增加uart7和uart8的DMA配置
This commit is contained in:
parent
f5c88add37
commit
21003c74ea
@ -909,6 +909,34 @@ static void stm32_uart_get_dma_config(void)
|
||||
uart_config[UART6_INDEX].dma_tx = &uart6_dma_tx;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BSP_USING_UART7
|
||||
uart_obj[UART7_INDEX].uart_dma_flag = 0;
|
||||
#ifdef BSP_UART7_RX_USING_DMA
|
||||
uart_obj[UART7_INDEX].uart_dma_flag |= RT_DEVICE_FLAG_DMA_RX;
|
||||
static struct dma_config uart7_dma_rx = UART7_DMA_RX_CONFIG;
|
||||
uart_config[UART7_INDEX].dma_rx = &uart7_dma_rx;
|
||||
#endif
|
||||
#ifdef BSP_UART7_TX_USING_DMA
|
||||
uart_obj[UART7_INDEX].uart_dma_flag |= RT_DEVICE_FLAG_DMA_TX;
|
||||
static struct dma_config uart7_dma_tx = UART7_DMA_TX_CONFIG;
|
||||
uart_config[UART7_INDEX].dma_tx = &uart7_dma_tx;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BSP_USING_UART8
|
||||
uart_obj[UART8_INDEX].uart_dma_flag = 0;
|
||||
#ifdef BSP_UART8_RX_USING_DMA
|
||||
uart_obj[UART8_INDEX].uart_dma_flag |= RT_DEVICE_FLAG_DMA_RX;
|
||||
static struct dma_config uart8_dma_rx = UART8_DMA_RX_CONFIG;
|
||||
uart_config[UART8_INDEX].dma_rx = &uart8_dma_rx;
|
||||
#endif
|
||||
#ifdef BSP_UART8_TX_USING_DMA
|
||||
uart_obj[UART8_INDEX].uart_dma_flag |= RT_DEVICE_FLAG_DMA_TX;
|
||||
static struct dma_config uart8_dma_tx = UART8_DMA_TX_CONFIG;
|
||||
uart_config[UART8_INDEX].dma_tx = &uart8_dma_tx;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef RT_SERIAL_USING_DMA
|
||||
|
Loading…
x
Reference in New Issue
Block a user