stm32:Serial DMA buffer round off not up

This commit is contained in:
David Sidrane 2017-05-08 15:54:03 +00:00
parent c64983dbeb
commit 546e7acb99

View File

@ -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 */