From 546e7acb99ab2495866d1b0ad0e705a2b0c1ef49 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Mon, 8 May 2017 15:54:03 +0000 Subject: [PATCH] stm32:Serial DMA buffer round off not up --- arch/arm/src/stm32/stm32_serial.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/src/stm32/stm32_serial.c b/arch/arm/src/stm32/stm32_serial.c index 200c76c43b..6425cd2d91 100644 --- a/arch/arm/src/stm32/stm32_serial.c +++ b/arch/arm/src/stm32/stm32_serial.c @@ -186,8 +186,10 @@ # define CONFIG_STM32_SERIAL_RXDMA_BUFFER_SIZE 32 # endif # define RXDMA_MUTIPLE 4 +# define RXDMA_MUTIPLE_MASK (RXDMA_MUTIPLE -1) # define RXDMA_BUFFER_SIZE ((CONFIG_STM32_SERIAL_RXDMA_BUFFER_SIZE \ - + RXDMA_MUTIPLE) & ~(RXDMA_MUTIPLE-1)) + + RXDMA_MUTIPLE_MASK) \ + & ~RXDMA_MUTIPLE_MASK)) /* DMA priority */