Merged in david_s5/nuttx-16/david_s5/stm32serial-dma-buffer-round-off-not-up-1494258804216 (pull request #357)

stm32:Serial DMA buffer round off not up

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
David Sidrane 2017-05-08 20:32:44 +00:00 committed by Gregory Nutt
commit 8406b40baa

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