stm32: serial Allow configuring Rx DMA buffer size
This commit is contained in:
parent
c5cd006bd2
commit
b62ef579c8
@ -6165,6 +6165,19 @@ if STM32_SERIALDRIVER
|
||||
|
||||
comment "Serial Driver Configuration"
|
||||
|
||||
config STM32_SERIAL_RXDMA_BUFFER_SIZE
|
||||
int "Rx DMA buffer size"
|
||||
default 32
|
||||
range 32 4096
|
||||
depends on USART1_RXDMA || USART2_RXDMA || USART3_RXDMA || UART4_RXDMA || UART5_RXDMA || USART6_RXDMA || UART7_RXDMA || UART8_RXDMA
|
||||
---help---
|
||||
The DMA buffer size when using RX DMA to emulate a FIFO.
|
||||
|
||||
When streaming data, the generic serial layer will be called
|
||||
every time the FIFO receives half or this number of bytes.
|
||||
|
||||
Value given here will be rounded up to next multiple of 4 bytes.
|
||||
|
||||
config SERIAL_DISABLE_REORDERING
|
||||
bool "Disable reordering of ttySx devices."
|
||||
depends on STM32_USART1 || STM32_USART2 || STM32_USART3 || STM32_UART4 || STM32_UART5 || STM32_USART6 || STM32_UART7 || STM32_UART8
|
||||
|
@ -182,8 +182,12 @@
|
||||
* When streaming data, the generic serial layer will be called
|
||||
* every time the FIFO receives half this number of bytes.
|
||||
*/
|
||||
|
||||
# define RXDMA_BUFFER_SIZE 32
|
||||
# if !defined(CONFIG_STM32_SERIAL_RXDMA_BUFFER_SIZE)
|
||||
# define CONFIG_STM32_SERIAL_RXDMA_BUFFER_SIZE 32
|
||||
# endif
|
||||
# define RXDMA_MUTIPLE 4
|
||||
# define RXDMA_BUFFER_SIZE ((CONFIG_STM32_SERIAL_RXDMA_BUFFER_SIZE \
|
||||
+ RXDMA_MUTIPLE) & ~RXDMA_MUTIPLE)
|
||||
|
||||
/* DMA priority */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user