From e7f6952d15696921dfbce7ca22699e2916dd2f35 Mon Sep 17 00:00:00 2001 From: zhouchuanfu <353896039@qq.com> Date: Sat, 12 Jan 2019 11:21:31 +0800 Subject: [PATCH] fix bug with dma setting --- bsp/stm32f10x/drivers/usart.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bsp/stm32f10x/drivers/usart.c b/bsp/stm32f10x/drivers/usart.c index 1c61b184a6..4164e8785a 100644 --- a/bsp/stm32f10x/drivers/usart.c +++ b/bsp/stm32f10x/drivers/usart.c @@ -293,8 +293,8 @@ static const struct rt_uart_ops stm32_uart_ops = struct stm32_uart uart1 = { USART1, -#ifdef RT_SERIAL_USING_DMA USART1_IRQn, +#ifdef RT_SERIAL_USING_DMA { DMA1_Channel5, DMA1_FLAG_GL5, @@ -334,9 +334,9 @@ void DMA1_Channel5_IRQHandler(void) { /* UART2 device driver structure */ struct stm32_uart uart2 = { - USART2, -#ifdef RT_SERIAL_USING_DMA + USART2, USART2_IRQn, +#ifdef RT_SERIAL_USING_DMA { DMA1_Channel6, DMA1_FLAG_GL6, @@ -377,8 +377,8 @@ void DMA1_Channel6_IRQHandler(void) { struct stm32_uart uart3 = { USART3, -#ifdef RT_SERIAL_USING_DMA USART3_IRQn, +#ifdef RT_SERIAL_USING_DMA { DMA1_Channel3, DMA1_FLAG_GL3, @@ -419,8 +419,8 @@ void DMA1_Channel3_IRQHandler(void) { struct stm32_uart uart4 = { UART4, -#ifdef RT_SERIAL_USING_DMA UART4_IRQn, +#ifdef RT_SERIAL_USING_DMA { DMA2_Channel3, DMA2_FLAG_GL3,