From 29a0aab1c91689bed9c9b80f59d5a6cce2ec4e07 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 5 Sep 2012 12:45:35 +0000 Subject: Refactor serial configuratin; AVR teensy Kconfig now builds git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5092 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/arch/arm/src/lpc43xx/Kconfig | 156 +--------------------------- nuttx/arch/arm/src/stm32/Kconfig | 200 +----------------------------------- nuttx/arch/avr/Kconfig | 8 ++ nuttx/arch/mips/src/pic32mx/Kconfig | 18 ---- 4 files changed, 15 insertions(+), 367 deletions(-) (limited to 'nuttx/arch') diff --git a/nuttx/arch/arm/src/lpc43xx/Kconfig b/nuttx/arch/arm/src/lpc43xx/Kconfig index 68d705e3ef..351b940aa1 100644 --- a/nuttx/arch/arm/src/lpc43xx/Kconfig +++ b/nuttx/arch/arm/src/lpc43xx/Kconfig @@ -256,6 +256,7 @@ config LPC43_TMR3 config LPC43_USART0 bool "USART0" + select ARCH_HAS_USART0 default n config LPC43_UART1 @@ -264,10 +265,12 @@ config LPC43_UART1 config LPC43_USART2 bool "USART2" + select ARCH_HAS_USART2 default n config LPC43_USART3 bool "USART3" + select ARCH_HAS_USART3 default n config LPC43_USB0 @@ -289,64 +292,9 @@ config LPC43_WWDT endmenu -menu "USART0 Configuration" - depends on LPC43_USART0 - -config USART0_SERIAL_CONSOLE - bool "USART0 serial console" - default y - ---help--- - Selects the USART0 for the console and ttys0 (default is the USART0). - -config USART0_RXBUFSIZE - int "USART0 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config USART0_TXBUFSIZE - int "USART0 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config USART0_BAUD - int "USART0 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config USART0_BITS - int "USART0 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config USART0_PARITY - int "USART0 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config USART0_2STOP - int "USART0 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - -endmenu - menu "UART1 Configuration" depends on LPC43_UART1 -config UART1_SERIAL_CONSOLE - bool "UART1 serial console" - default y if !LPC43_USART0 - ---help--- - Selects the UART1 for the console and ttys0 (default is the UART1). - config UART1_RXBUFSIZE int "UART1 Rx buffer size" default 256 @@ -387,104 +335,6 @@ config UART1_2STOP endmenu -menu "USART2 Configuration" - depends on LPC43_USART2 - -config USART2_SERIAL_CONSOLE - bool "USART2 serial console" - default y if !LPC43_USART0 && !LPC43_UART1 - ---help--- - Selects the USART2 for the console and ttys0 (default is the USART2). - -config USART2_RXBUFSIZE - int "USART2 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config USART2_TXBUFSIZE - int "USART2 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config USART2_BAUD - int "USART2 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config USART2_BITS - int "USART2 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config USART2_PARITY - int "USART2 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config USART2_2STOP - int "USART2 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - -endmenu - -menu "USART3 Configuration" - depends on LPC43_USART3 - -config USART3_SERIAL_CONSOLE - bool "USART3 serial console" - default y if !LPC43_USART0 && !LPC43_UART1 && !LPC43_USART2 - ---help--- - Selects the USART3 for the console and ttys0 (default is the USART3). - -config USART3_RXBUFSIZE - int "USART3 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config USART3_TXBUFSIZE - int "USART3 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config USART3_BAUD - int "USART3 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config USART3_BITS - int "USART3 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config USART3_PARITY - int "USART3 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config USART3_2STOP - int "USART3 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - -endmenu - config SERIAL_TERMIOS bool "Serial driver TERMIOS supported" depends on LPC43_USART0 || LPC43_UART1 || LPC43_USART2 || LPC43_USART3 diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig index 695fe8e94d..0aa1f76b71 100644 --- a/nuttx/arch/arm/src/stm32/Kconfig +++ b/nuttx/arch/arm/src/stm32/Kconfig @@ -288,14 +288,17 @@ config STM32_TIM14 config STM32_USART1 bool "USART1" + select ARCH_HAS_USART1 default n config STM32_USART2 bool "USART2" + select ARCH_HAS_USART2 default n config STM32_USART3 bool "USART3" + select ARCH_HAS_USART3 default n config STM32_UART4 @@ -309,6 +312,7 @@ config STM32_UART5 config STM32_USART6 bool "USART6" default n + select ARCH_HAS_USART6 depends on STM32_STM32F20XX || STM32_STM32F40XX config STM32_USB @@ -1420,53 +1424,6 @@ config STM32_TIM14_DAC2 endchoice -menu "USART1 Configuration" - depends on STM32_USART1 - -config USART1_SERIAL_CONSOLE - bool "USART1 serial console" - default y - ---help--- - Selects the USART1 for the console and ttys0 (default is the USART1). - -config USART1_RXBUFSIZE - int "USART1 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config USART1_TXBUFSIZE - int "USART1 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config USART1_BAUD - int "USART1 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config USART1_BITS - int "USART1 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config USART1_PARITY - int "USART1 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config USART1_2STOP - int "USART1 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - config USART1_RXDMA bool "USART1 Rx DMA" default n @@ -1474,55 +1431,6 @@ config USART1_RXDMA ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors -endmenu - -menu "USART2 Configuration" - depends on STM32_USART2 - -config USART2_SERIAL_CONSOLE - bool "USART2 serial console" - default y if !STM32_USART1 - ---help--- - Selects the USART2 for the console and ttys0 (default is the USART2). - -config USART2_RXBUFSIZE - int "USART2 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config USART2_TXBUFSIZE - int "USART2 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config USART2_BAUD - int "USART2 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config USART2_BITS - int "USART2 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config USART2_PARITY - int "USART2 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config USART2_2STOP - int "USART2 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - config USART2_RXDMA bool "USART2 Rx DMA" default n @@ -1530,55 +1438,6 @@ config USART2_RXDMA ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors -endmenu - -menu "USART3 Configuration" - depends on STM32_USART3 - -config USART3_SERIAL_CONSOLE - bool "USART3 serial console" - default y if !STM32_USART1 && !STM32_USART2 - ---help--- - Selects the USART3 for the console and ttys0 (default is the USART3). - -config USART3_RXBUFSIZE - int "USART3 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config USART3_TXBUFSIZE - int "USART3 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config USART3_BAUD - int "USART3 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config USART3_BITS - int "USART3 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config USART3_PARITY - int "USART3 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config USART3_2STOP - int "USART3 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - config USART3_RXDMA bool "USART3 Rx DMA" default n @@ -1586,8 +1445,6 @@ config USART3_RXDMA ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors -endmenu - menu "UART4 Configuration" depends on STM32_UART4 @@ -1700,53 +1557,6 @@ config UART5_RXDMA endmenu -menu "USART6 Configuration" - depends on STM32_USART6 - -config USART6_SERIAL_CONSOLE - bool "USART6 serial console" - default y if !STM32_USART1 && !STM32_USART2 && !STM32_USART3 && !STM32_UART4 && !STM32_UART5 - ---help--- - Selects the USART6 for the console and ttys0 (default is the USART6). - -config USART6_RXBUFSIZE - int "USART6 Rx buffer size" - default 256 - ---help--- - Characters are buffered as received. This specific the size of the receive - buffer. - -config USART6_TXBUFSIZE - int "USART6 Tx buffer size" - default 256 - ---help--- - Characters are buffered before being sent. This specific the size of the - transmit buffer - -config USART6_BAUD - int "USART6 BAUD" - default 11520 - ---help--- - The configured BAUD of the UART - -config USART6_BITS - int "USART6 number of bits" - default 8 - ---help--- - The number of bits. Must be either 7 or 8. - -config USART6_PARITY - int "USART6 parity" - default 0 - ---help--- - 0=no parity, 1=odd parity, 2=even parity - -config USART6_2STOP - int "USART6 two stop bits" - default 0 - ---help--- - 0=1 stop bit, 1=Two stop bits. Default: 1 stop bit - config USART6_RXDMA bool "USART6 Rx DMA" default n @@ -1754,8 +1564,6 @@ config USART6_RXDMA ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors -endmenu - config SERIAL_TERMIOS bool "Serial driver TERMIOS supported" depends on STM32_USART1 || STM32_USART2 || STM32_USART3 || STM32_UART4 || STM32_UART5 || STM32_USART6 diff --git a/nuttx/arch/avr/Kconfig b/nuttx/arch/avr/Kconfig index 0fe839b795..0108371425 100644 --- a/nuttx/arch/avr/Kconfig +++ b/nuttx/arch/avr/Kconfig @@ -116,4 +116,12 @@ source arch/avr/src/atmega/Kconfig source arch/avr/src/avr32/Kconfig source arch/avr/src/at32uc3/Kconfig +config AVR_USART0 + bool "USART0 specific serial device driver settings" + select ARCH_HAS_USART0 + +config AVR_USART1 + bool "USART1 specific serial device driver settings" + select ARCH_HAS_USART1 + endif diff --git a/nuttx/arch/mips/src/pic32mx/Kconfig b/nuttx/arch/mips/src/pic32mx/Kconfig index 7c2c9bb23d..908046f833 100644 --- a/nuttx/arch/mips/src/pic32mx/Kconfig +++ b/nuttx/arch/mips/src/pic32mx/Kconfig @@ -909,12 +909,6 @@ endmenu menu "UART1 Configuration" depends on PIC32MX_UART1 -config UART1_SERIAL_CONSOLE - bool "UART1 serial console" - default y - ---help--- - Selects the UART1 for the console and ttys0. Default: UART1 (if enabled). - config UART1_RXBUFSIZE int "UART1 Rx buffer size" default 256 @@ -956,12 +950,6 @@ endmenu menu "UART2 Configuration" depends on PIC32MX_UART2 -config UART2_SERIAL_CONSOLE - bool "UART2 serial console" - default y if !PIC32MX_UART1 - ---help--- - Selects the UART2 for the console and ttys0. Default: UART2 (if enabled). - config UART2_RXBUFSIZE int "UART2 Rx buffer size" default 256 @@ -1003,12 +991,6 @@ endmenu menu "UART3 Configuration" depends on PIC32MX_UART3 -config UART3_SERIAL_CONSOLE - bool "UART3 serial console" - default y if !PIC32MX_UART1 && !PIC32MX_UART2 - ---help--- - Selects the UART3 for the console and ttys0. Default: UART3 (if enabled). - config UART3_RXBUFSIZE int "UART3 Rx buffer size" default 256 -- cgit v1.2.3