From 62031175228af349357149bc1d0d4aced39d7cc6 Mon Sep 17 00:00:00 2001 From: HubretXie Date: Thu, 17 Jan 2019 12:53:52 +0800 Subject: [PATCH 1/5] Update drv_usart.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DMA中断函数名称统一修改为UART --- bsp/stm32/libraries/HAL_Drivers/drv_usart.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_usart.c b/bsp/stm32/libraries/HAL_Drivers/drv_usart.c index 03ba4c6f2a..47a2be5abb 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_usart.c +++ b/bsp/stm32/libraries/HAL_Drivers/drv_usart.c @@ -308,7 +308,7 @@ void USART1_IRQHandler(void) rt_interrupt_leave(); } #if defined(RT_SERIAL_USING_DMA) && defined(BSP_UART1_RX_USING_DMA) -void USART1_DMA_RX_IRQHandler(void) +void UART1_DMA_RX_IRQHandler(void) { /* enter interrupt */ rt_interrupt_enter(); @@ -333,7 +333,7 @@ void USART2_IRQHandler(void) rt_interrupt_leave(); } #if defined(RT_SERIAL_USING_DMA) && defined(BSP_UART2_RX_USING_DMA) -void USART2_DMA_RX_IRQHandler(void) +void UART2_DMA_RX_IRQHandler(void) { /* enter interrupt */ rt_interrupt_enter(); @@ -358,7 +358,7 @@ void USART3_IRQHandler(void) rt_interrupt_leave(); } #if defined(RT_SERIAL_USING_DMA) && defined(BSP_UART3_RX_USING_DMA) -void USART3_DMA_RX_IRQHandler(void) +void UART3_DMA_RX_IRQHandler(void) { /* enter interrupt */ rt_interrupt_enter(); @@ -383,7 +383,7 @@ void UART4_IRQHandler(void) rt_interrupt_leave(); } #if defined(RT_SERIAL_USING_DMA) && defined(BSP_UART4_RX_USING_DMA) -void USART4_DMA_RX_IRQHandler(void) +void UART4_DMA_RX_IRQHandler(void) { /* enter interrupt */ rt_interrupt_enter(); @@ -408,7 +408,7 @@ void UART5_IRQHandler(void) rt_interrupt_leave(); } #if defined(RT_SERIAL_USING_DMA) && defined(BSP_UART5_RX_USING_DMA) -void USART5_DMA_RX_IRQHandler(void) +void UART5_DMA_RX_IRQHandler(void) { /* enter interrupt */ rt_interrupt_enter(); From 0e4b502319f04b598b40489c74f2bbe4b0a8d541 Mon Sep 17 00:00:00 2001 From: HubretXie Date: Thu, 17 Jan 2019 12:56:39 +0800 Subject: [PATCH 2/5] Update dma_config.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 串口dma中断名称统一修改为uart --- .../HAL_Drivers/config/f4/dma_config.h | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f4/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/config/f4/dma_config.h index 83ea331643..d382fc4e29 100644 --- a/bsp/stm32/libraries/HAL_Drivers/config/f4/dma_config.h +++ b/bsp/stm32/libraries/HAL_Drivers/config/f4/dma_config.h @@ -132,12 +132,12 @@ extern "C" { #define SPI1_RX_DMA_INSTANCE DMA2_Stream2 #define SPI1_RX_DMA_CHANNEL DMA_CHANNEL_3 #define SPI1_RX_DMA_IRQ DMA2_Stream2_IRQn -#elif defined(BSP_UART1_RX_USING_DMA) && !defined(USART1_RX_DMA_INSTANCE) -#define USART1_DMA_RX_IRQHandler DMA2_Stream2_IRQHandler -#define USART1_RX_DMA_RCC RCC_AHB1ENR_DMA2EN -#define USART1_RX_DMA_INSTANCE DMA2_Stream2 -#define USART1_RX_DMA_CHANNEL DMA_CHANNEL_4 -#define USART1_RX_DMA_IRQ DMA2_Stream2_IRQn +#elif defined(BSP_UART1_RX_USING_DMA) && !defined(UART1_RX_DMA_INSTANCE) +#define UART1_DMA_RX_IRQHandler DMA2_Stream2_IRQHandler +#define UART1_RX_DMA_RCC RCC_AHB1ENR_DMA2EN +#define UART1_RX_DMA_INSTANCE DMA2_Stream2 +#define UART1_RX_DMA_CHANNEL DMA_CHANNEL_4 +#define UART1_RX_DMA_IRQ DMA2_Stream2_IRQn #endif /* DMA2 stream3 */ @@ -184,12 +184,12 @@ extern "C" { #define SPI1_TX_DMA_INSTANCE DMA2_Stream5 #define SPI1_TX_DMA_CHANNEL DMA_CHANNEL_3 #define SPI1_TX_DMA_IRQ DMA2_Stream5_IRQn -#elif defined(BSP_UART1_RX_USING_DMA) && !defined(USART1_RX_DMA_INSTANCE) -#define USART1_DMA_RX_IRQHandler DMA2_Stream5_IRQHandler -#define USART1_RX_DMA_RCC RCC_AHB1ENR_DMA2EN -#define USART1_RX_DMA_INSTANCE DMA2_Stream5 -#define USART1_RX_DMA_CHANNEL DMA_CHANNEL_4 -#define USART1_RX_DMA_IRQ DMA2_Stream5_IRQn +#elif defined(BSP_UART1_RX_USING_DMA) && !defined(UART1_RX_DMA_INSTANCE) +#define UART1_DMA_RX_IRQHandler DMA2_Stream5_IRQHandler +#define UART1_RX_DMA_RCC RCC_AHB1ENR_DMA2EN +#define UART1_RX_DMA_INSTANCE DMA2_Stream5 +#define UART1_RX_DMA_CHANNEL DMA_CHANNEL_4 +#define UART1_RX_DMA_IRQ DMA2_Stream5_IRQn #elif defined(BSP_SPI5_RX_USING_DMA) && !defined(SPI5_RX_DMA_INSTANCE) #define SPI5_DMA_RX_IRQHandler DMA2_Stream5_IRQHandler #define SPI5_RX_DMA_RCC RCC_AHB1ENR_DMA2EN From 8580b9a8185691b8e5e6d667b12a74efac6a8a08 Mon Sep 17 00:00:00 2001 From: HubretXie Date: Thu, 17 Jan 2019 12:58:31 +0800 Subject: [PATCH 3/5] Update dma_config.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 串口dma中断名称统一修改为uart --- .../HAL_Drivers/config/f7/dma_config.h | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f7/dma_config.h b/bsp/stm32/libraries/HAL_Drivers/config/f7/dma_config.h index 5023b20a91..f716e23765 100644 --- a/bsp/stm32/libraries/HAL_Drivers/config/f7/dma_config.h +++ b/bsp/stm32/libraries/HAL_Drivers/config/f7/dma_config.h @@ -133,12 +133,12 @@ extern "C" { #define SPI1_RX_DMA_INSTANCE DMA2_Stream2 #define SPI1_RX_DMA_CHANNEL DMA_CHANNEL_3 #define SPI1_RX_DMA_IRQ DMA2_Stream2_IRQn -#elif defined(BSP_UART1_RX_USING_DMA) && !defined(USART1_RX_DMA_INSTANCE) -#define USART1_DMA_RX_IRQHandler DMA2_Stream2_IRQHandler -#define USART1_RX_DMA_RCC RCC_AHB1ENR_DMA2EN -#define USART1_RX_DMA_INSTANCE DMA2_Stream2 -#define USART1_RX_DMA_CHANNEL DMA_CHANNEL_4 -#define USART1_RX_DMA_IRQ DMA2_Stream2_IRQn +#elif defined(BSP_UART1_RX_USING_DMA) && !defined(UART1_RX_DMA_INSTANCE) +#define UART1_DMA_RX_IRQHandler DMA2_Stream2_IRQHandler +#define UART1_RX_DMA_RCC RCC_AHB1ENR_DMA2EN +#define UART1_RX_DMA_INSTANCE DMA2_Stream2 +#define UART1_RX_DMA_CHANNEL DMA_CHANNEL_4 +#define UART1_RX_DMA_IRQ DMA2_Stream2_IRQn #elif defined(BSP_QSPI_USING_DMA) && !defined(QSPI_DMA_INSTANCE) #define QSPI_DMA_IRQHandler DMA2_Stream2_IRQHandler #define QSPI_DMA_RCC RCC_AHB1ENR_DMA2EN @@ -190,12 +190,12 @@ extern "C" { #define SPI1_TX_DMA_INSTANCE DMA2_Stream5 #define SPI1_TX_DMA_CHANNEL DMA_CHANNEL_3 #define SPI1_TX_DMA_IRQ DMA2_Stream5_IRQn -#elif defined(BSP_UART1_RX_USING_DMA) && !defined(USART1_RX_DMA_INSTANCE) -#define USART1_DMA_RX_IRQHandler DMA2_Stream5_IRQHandler -#define USART1_RX_DMA_RCC RCC_AHB1ENR_DMA2EN -#define USART1_RX_DMA_INSTANCE DMA2_Stream5 -#define USART1_RX_DMA_CHANNEL DMA_CHANNEL_4 -#define USART1_RX_DMA_IRQ DMA2_Stream5_IRQn +#elif defined(BSP_UART1_RX_USING_DMA) && !defined(UART1_RX_DMA_INSTANCE) +#define UART1_DMA_RX_IRQHandler DMA2_Stream5_IRQHandler +#define UART1_RX_DMA_RCC RCC_AHB1ENR_DMA2EN +#define UART1_RX_DMA_INSTANCE DMA2_Stream5 +#define UART1_RX_DMA_CHANNEL DMA_CHANNEL_4 +#define UART1_RX_DMA_IRQ DMA2_Stream5_IRQn #elif defined(BSP_SPI5_RX_USING_DMA) && !defined(SPI5_RX_DMA_INSTANCE) #define SPI5_DMA_RX_IRQHandler DMA2_Stream5_IRQHandler #define SPI5_RX_DMA_RCC RCC_AHB1ENR_DMA2EN From a4b57e2d6c8bbbbcf09fa4723ea9e015cbd70a01 Mon Sep 17 00:00:00 2001 From: HubretXie Date: Thu, 17 Jan 2019 13:09:06 +0800 Subject: [PATCH 4/5] Update uart_config.h --- bsp/stm32/libraries/HAL_Drivers/config/f4/uart_config.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f4/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/config/f4/uart_config.h index 244ba2581a..50eb02bfc0 100644 --- a/bsp/stm32/libraries/HAL_Drivers/config/f4/uart_config.h +++ b/bsp/stm32/libraries/HAL_Drivers/config/f4/uart_config.h @@ -33,10 +33,10 @@ extern "C" { #ifndef UART1_DMA_CONFIG #define UART1_DMA_CONFIG \ { \ - .Instance = USART1_RX_DMA_INSTANCE, \ - .channel = USART1_RX_DMA_CHANNEL, \ - .dma_rcc = USART1_RX_DMA_RCC, \ - .dma_irq = USART1_RX_DMA_IRQ, \ + .Instance = UART1_RX_DMA_INSTANCE, \ + .channel = UART1_RX_DMA_CHANNEL, \ + .dma_rcc = UART1_RX_DMA_RCC, \ + .dma_irq = UART1_RX_DMA_IRQ, \ } #endif /* UART1_DMA_CONFIG */ #endif /* BSP_UART1_RX_USING_DMA */ From 35ded2acb3f3627105805f8e57bd45672bf52a79 Mon Sep 17 00:00:00 2001 From: HubretXie Date: Thu, 17 Jan 2019 13:09:39 +0800 Subject: [PATCH 5/5] Update uart_config.h --- bsp/stm32/libraries/HAL_Drivers/config/f7/uart_config.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bsp/stm32/libraries/HAL_Drivers/config/f7/uart_config.h b/bsp/stm32/libraries/HAL_Drivers/config/f7/uart_config.h index 6d4aa39b92..a4eeeff936 100644 --- a/bsp/stm32/libraries/HAL_Drivers/config/f7/uart_config.h +++ b/bsp/stm32/libraries/HAL_Drivers/config/f7/uart_config.h @@ -33,10 +33,10 @@ extern "C" { #ifndef UART1_DMA_CONFIG #define UART1_DMA_CONFIG \ { \ - .Instance = USART1_RX_DMA_INSTANCE, \ - .channel = USART1_RX_DMA_CHANNEL, \ - .dma_rcc = USART1_RX_DMA_RCC, \ - .dma_irq = USART1_RX_DMA_IRQ, \ + .Instance = UART1_RX_DMA_INSTANCE, \ + .channel = UART1_RX_DMA_CHANNEL, \ + .dma_rcc = UART1_RX_DMA_RCC, \ + .dma_irq = UART1_RX_DMA_IRQ, \ } #endif /* UART1_DMA_CONFIG */ #endif /* BSP_UART1_RX_USING_DMA */