From d3e0d5ee7258469c6c856d763d2c279b0998bd0b Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Tue, 3 Dec 2019 07:18:42 -0600 Subject: [PATCH] arch/arm/src/stm32f7/stm32_serial.c: CONFIG_USART_DMAPRIO->CONFIG_USART_RXDMAPRIO. --- arch/arm/src/stm32f7/stm32_serial.c | 35 ++++++++++++++++++----------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/arch/arm/src/stm32f7/stm32_serial.c b/arch/arm/src/stm32f7/stm32_serial.c index dd80234ca2..f161f868c7 100644 --- a/arch/arm/src/stm32f7/stm32_serial.c +++ b/arch/arm/src/stm32f7/stm32_serial.c @@ -186,26 +186,35 @@ /* DMA priority */ -# ifndef CONFIG_USART_DMAPRIO -# define CONFIG_USART_DMAPRIO DMA_SCR_PRIMED +# ifndef CONFIG_USART_RXDMAPRIO +# define CONFIG_USART_RXDMAPRIO DMA_SCR_PRIMED # endif -# if (CONFIG_USART_DMAPRIO & ~DMA_SCR_PL_MASK) != 0 -# error "Illegal value for CONFIG_USART_DMAPRIO" +# if (CONFIG_USART_RXDMAPRIO & ~DMA_SCR_PL_MASK) != 0 +# error "Illegal value for CONFIG_USART_RXDMAPRIO" # endif /* DMA control words */ -# define SERIAL_DMA_CONTROL_WORD \ - (DMA_SCR_DIR_P2M | \ - DMA_SCR_CIRC | \ - DMA_SCR_MINC | \ - DMA_SCR_PSIZE_8BITS | \ - DMA_SCR_MSIZE_8BITS | \ - CONFIG_USART_DMAPRIO | \ - DMA_SCR_PBURST_SINGLE | \ +# define SERIAL_DMA_CONTROL_WORD \ + (DMA_SCR_DIR_P2M | \ + DMA_SCR_CIRC | \ + DMA_SCR_MINC | \ + DMA_SCR_PSIZE_8BITS | \ + DMA_SCR_MSIZE_8BITS | \ + CONFIG_USART_RXDMAPRIO | \ + DMA_SCR_PBURST_SINGLE | \ DMA_SCR_MBURST_SINGLE) -#endif /* SERIAL_HAVE_DMA */ + +# define SERIAL_DMA_CONTROL_WORD_TX \ + (DMA_SCR_DIR_M2P | \ + DMA_SCR_MINC | \ + DMA_SCR_PSIZE_8BITS | \ + DMA_SCR_MSIZE_8BITS | \ + DMA_SCR_PBURST_SINGLE | \ + DMA_SCR_MBURST_SINGLE | \ + CONFIG_USART_RXDMAPRIO) +#endif /* SERIAL_HAVE_RXDMA */ /* Power management definitions */