mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 06:31:36 +08:00
Fix receive DMA for the console device. Now maybe MAVLink will work better.
This commit is contained in:
@@ -1835,6 +1835,13 @@ void up_serialinit(void)
|
|||||||
#if CONSOLE_UART > 0
|
#if CONSOLE_UART > 0
|
||||||
(void)uart_register("/dev/console", &uart_devs[CONSOLE_UART - 1]->dev);
|
(void)uart_register("/dev/console", &uart_devs[CONSOLE_UART - 1]->dev);
|
||||||
(void)uart_register("/dev/ttyS0", &uart_devs[CONSOLE_UART - 1]->dev);
|
(void)uart_register("/dev/ttyS0", &uart_devs[CONSOLE_UART - 1]->dev);
|
||||||
|
|
||||||
|
/* If we need to re-initialise the console (e.g. to enable DMA) do that here. */
|
||||||
|
|
||||||
|
# if CONFIG_SERIAL_CONSOLE_REINIT
|
||||||
|
uart_devs[CONSOLE_UART - 1]->dev.ops->setup(&uart_devs[CONSOLE_UART - 1]->dev);
|
||||||
|
# endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register all remaining USARTs */
|
/* Register all remaining USARTs */
|
||||||
|
|||||||
@@ -221,6 +221,9 @@ CONFIG_AT24XX_MTD_BLOCKSIZE=256
|
|||||||
# tcflush, etc.). If this is not defined, then the terminal settings (baud,
|
# tcflush, etc.). If this is not defined, then the terminal settings (baud,
|
||||||
# parity, etc.) are not configurable at runtime; serial streams cannot be
|
# parity, etc.) are not configurable at runtime; serial streams cannot be
|
||||||
# flushed, etc.
|
# flushed, etc.
|
||||||
|
# CONFIG_SERIAL_CONSOLE_REINIT - re-initializes the console serial port
|
||||||
|
# immediately after creating the /dev/console device. This is required
|
||||||
|
# if the console serial port has RX DMA enabled.
|
||||||
#
|
#
|
||||||
# CONFIG_USARTn_SERIAL_CONSOLE - selects the USARTn for the
|
# CONFIG_USARTn_SERIAL_CONSOLE - selects the USARTn for the
|
||||||
# console and ttys0 (default is the USART1).
|
# console and ttys0 (default is the USART1).
|
||||||
@@ -234,6 +237,7 @@ CONFIG_AT24XX_MTD_BLOCKSIZE=256
|
|||||||
# CONFIG_USARTn_2STOP - Two stop bits
|
# CONFIG_USARTn_2STOP - Two stop bits
|
||||||
#
|
#
|
||||||
CONFIG_SERIAL_TERMIOS=y
|
CONFIG_SERIAL_TERMIOS=y
|
||||||
|
CONFIG_SERIAL_CONSOLE_REINIT=y
|
||||||
|
|
||||||
CONFIG_USART1_SERIAL_CONSOLE=y
|
CONFIG_USART1_SERIAL_CONSOLE=y
|
||||||
CONFIG_USART2_SERIAL_CONSOLE=n
|
CONFIG_USART2_SERIAL_CONSOLE=n
|
||||||
@@ -285,7 +289,7 @@ CONFIG_USART4_2STOP=0
|
|||||||
CONFIG_USART5_2STOP=0
|
CONFIG_USART5_2STOP=0
|
||||||
CONFIG_USART6_2STOP=0
|
CONFIG_USART6_2STOP=0
|
||||||
|
|
||||||
CONFIG_USART1_RXDMA=n
|
CONFIG_USART1_RXDMA=y
|
||||||
CONFIG_USART2_RXDMA=y
|
CONFIG_USART2_RXDMA=y
|
||||||
CONFIG_USART3_RXDMA=n
|
CONFIG_USART3_RXDMA=n
|
||||||
CONFIG_USART4_RXDMA=n
|
CONFIG_USART4_RXDMA=n
|
||||||
|
|||||||
Reference in New Issue
Block a user