Fix receive DMA for the console device. Now maybe MAVLink will work better.

This commit is contained in:
px4dev
2012-09-07 02:35:58 -07:00
parent e8307aba17
commit e7b29c3eac
2 changed files with 12 additions and 1 deletions
+7
View File
@@ -1835,6 +1835,13 @@ void up_serialinit(void)
#if CONSOLE_UART > 0
(void)uart_register("/dev/console", &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
/* Register all remaining USARTs */
+5 -1
View File
@@ -221,6 +221,9 @@ CONFIG_AT24XX_MTD_BLOCKSIZE=256
# tcflush, etc.). If this is not defined, then the terminal settings (baud,
# parity, etc.) are not configurable at runtime; serial streams cannot be
# 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
# console and ttys0 (default is the USART1).
@@ -234,6 +237,7 @@ CONFIG_AT24XX_MTD_BLOCKSIZE=256
# CONFIG_USARTn_2STOP - Two stop bits
#
CONFIG_SERIAL_TERMIOS=y
CONFIG_SERIAL_CONSOLE_REINIT=y
CONFIG_USART1_SERIAL_CONSOLE=y
CONFIG_USART2_SERIAL_CONSOLE=n
@@ -285,7 +289,7 @@ CONFIG_USART4_2STOP=0
CONFIG_USART5_2STOP=0
CONFIG_USART6_2STOP=0
CONFIG_USART1_RXDMA=n
CONFIG_USART1_RXDMA=y
CONFIG_USART2_RXDMA=y
CONFIG_USART3_RXDMA=n
CONFIG_USART4_RXDMA=n