Refactor serial configuratin; AVR teensy Kconfig now builds

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5092 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2012-09-05 12:45:35 +00:00
parent dbaa35bf9c
commit 48362edbb5
4 changed files with 15 additions and 367 deletions
+3 -153
View File
@@ -256,6 +256,7 @@ config LPC43_TMR3
config LPC43_USART0 config LPC43_USART0
bool "USART0" bool "USART0"
select ARCH_HAS_USART0
default n default n
config LPC43_UART1 config LPC43_UART1
@@ -264,10 +265,12 @@ config LPC43_UART1
config LPC43_USART2 config LPC43_USART2
bool "USART2" bool "USART2"
select ARCH_HAS_USART2
default n default n
config LPC43_USART3 config LPC43_USART3
bool "USART3" bool "USART3"
select ARCH_HAS_USART3
default n default n
config LPC43_USB0 config LPC43_USB0
@@ -289,64 +292,9 @@ config LPC43_WWDT
endmenu 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" menu "UART1 Configuration"
depends on LPC43_UART1 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 config UART1_RXBUFSIZE
int "UART1 Rx buffer size" int "UART1 Rx buffer size"
default 256 default 256
@@ -387,104 +335,6 @@ config UART1_2STOP
endmenu 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 config SERIAL_TERMIOS
bool "Serial driver TERMIOS supported" bool "Serial driver TERMIOS supported"
depends on LPC43_USART0 || LPC43_UART1 || LPC43_USART2 || LPC43_USART3 depends on LPC43_USART0 || LPC43_UART1 || LPC43_USART2 || LPC43_USART3
+4 -196
View File
@@ -288,14 +288,17 @@ config STM32_TIM14
config STM32_USART1 config STM32_USART1
bool "USART1" bool "USART1"
select ARCH_HAS_USART1
default n default n
config STM32_USART2 config STM32_USART2
bool "USART2" bool "USART2"
select ARCH_HAS_USART2
default n default n
config STM32_USART3 config STM32_USART3
bool "USART3" bool "USART3"
select ARCH_HAS_USART3
default n default n
config STM32_UART4 config STM32_UART4
@@ -309,6 +312,7 @@ config STM32_UART5
config STM32_USART6 config STM32_USART6
bool "USART6" bool "USART6"
default n default n
select ARCH_HAS_USART6
depends on STM32_STM32F20XX || STM32_STM32F40XX depends on STM32_STM32F20XX || STM32_STM32F40XX
config STM32_USB config STM32_USB
@@ -1420,53 +1424,6 @@ config STM32_TIM14_DAC2
endchoice 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 config USART1_RXDMA
bool "USART1 Rx DMA" bool "USART1 Rx DMA"
default n default n
@@ -1474,55 +1431,6 @@ config USART1_RXDMA
---help--- ---help---
In high data rate usage, Rx DMA may eliminate Rx overrun errors 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 config USART2_RXDMA
bool "USART2 Rx DMA" bool "USART2 Rx DMA"
default n default n
@@ -1530,55 +1438,6 @@ config USART2_RXDMA
---help--- ---help---
In high data rate usage, Rx DMA may eliminate Rx overrun errors 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 config USART3_RXDMA
bool "USART3 Rx DMA" bool "USART3 Rx DMA"
default n default n
@@ -1586,8 +1445,6 @@ config USART3_RXDMA
---help--- ---help---
In high data rate usage, Rx DMA may eliminate Rx overrun errors In high data rate usage, Rx DMA may eliminate Rx overrun errors
endmenu
menu "UART4 Configuration" menu "UART4 Configuration"
depends on STM32_UART4 depends on STM32_UART4
@@ -1700,53 +1557,6 @@ config UART5_RXDMA
endmenu 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 config USART6_RXDMA
bool "USART6 Rx DMA" bool "USART6 Rx DMA"
default n default n
@@ -1754,8 +1564,6 @@ config USART6_RXDMA
---help--- ---help---
In high data rate usage, Rx DMA may eliminate Rx overrun errors In high data rate usage, Rx DMA may eliminate Rx overrun errors
endmenu
config SERIAL_TERMIOS config SERIAL_TERMIOS
bool "Serial driver TERMIOS supported" bool "Serial driver TERMIOS supported"
depends on STM32_USART1 || STM32_USART2 || STM32_USART3 || STM32_UART4 || STM32_UART5 || STM32_USART6 depends on STM32_USART1 || STM32_USART2 || STM32_USART3 || STM32_UART4 || STM32_UART5 || STM32_USART6
+8
View File
@@ -116,4 +116,12 @@ source arch/avr/src/atmega/Kconfig
source arch/avr/src/avr32/Kconfig source arch/avr/src/avr32/Kconfig
source arch/avr/src/at32uc3/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 endif
-18
View File
@@ -909,12 +909,6 @@ endmenu
menu "UART1 Configuration" menu "UART1 Configuration"
depends on PIC32MX_UART1 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 config UART1_RXBUFSIZE
int "UART1 Rx buffer size" int "UART1 Rx buffer size"
default 256 default 256
@@ -956,12 +950,6 @@ endmenu
menu "UART2 Configuration" menu "UART2 Configuration"
depends on PIC32MX_UART2 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 config UART2_RXBUFSIZE
int "UART2 Rx buffer size" int "UART2 Rx buffer size"
default 256 default 256
@@ -1003,12 +991,6 @@ endmenu
menu "UART3 Configuration" menu "UART3 Configuration"
depends on PIC32MX_UART3 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 config UART3_RXBUFSIZE
int "UART3 Rx buffer size" int "UART3 Rx buffer size"
default 256 default 256