summaryrefslogtreecommitdiffstats
path: root/nuttx/drivers/serial/Kconfig
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/drivers/serial/Kconfig')
-rw-r--r--nuttx/drivers/serial/Kconfig460
1 files changed, 435 insertions, 25 deletions
diff --git a/nuttx/drivers/serial/Kconfig b/nuttx/drivers/serial/Kconfig
index df80a1ded5..0448f1268b 100644
--- a/nuttx/drivers/serial/Kconfig
+++ b/nuttx/drivers/serial/Kconfig
@@ -215,25 +215,25 @@ endif
choice
prompt "16550 Serial Console"
- default NO_SERIAL_CONSOLE
+ default 16550_NO_SERIAL_CONSOLE
-config UART0_SERIAL_CONSOLE
+config 16550_UART0_SERIAL_CONSOLE
bool "16550 UART0 serial console"
depends on 16550_UART0
-config UART1_SERIAL_CONSOLE
+config 16550_UART1_SERIAL_CONSOLE
bool "16550 UART1 serial console"
depends on 16550_UART1
-config UART2_SERIAL_CONSOLE
+config 16550_UART2_SERIAL_CONSOLE
bool "16550 UART2 serial console"
depends on 16550_UART2
-config UART3_SERIAL_CONSOLE
+config 16550_UART3_SERIAL_CONSOLE
bool "16550 UART3 serial console"
depends on 16550_UART3
-config NO_SERIAL_CONSOLE
+config 16550_NO_SERIAL_CONSOLE
bool "No 16550 serial console"
endchoice
@@ -267,25 +267,27 @@ config 16550_ADDRWIDTH
endif
-config STANDARD_SERIAL
- bool "Standard serial"
- default y if !LOWLEVEL_CONSOLE && !16550_UART
-
-if STANDARD_SERIAL
-config CONFIG_SERIAL_NPOLLWAITERS
- int "Number of poll threads"
- default 2
- depends on !DISABLE_POLL
- ---help---
- Maximum number of threads than can be waiting for POLL events.
- Default: 2
-
-endif
-
#
-# USARTn_XYZ settings
+# MCU serial peripheral driver?
#
+config ARCH_HAS_UART
+ bool
+config ARCH_HAS_UART0
+ bool
+config ARCH_HAS_UART1
+ bool
+config ARCH_HAS_UART2
+ bool
+config ARCH_HAS_UART3
+ bool
+config ARCH_HAS_UART4
+ bool
+config ARCH_HAS_UART5
+ bool
+config ARCH_HAS_UART6
+ bool
+
config ARCH_HAS_USART0
bool
config ARCH_HAS_USART1
@@ -301,42 +303,192 @@ config ARCH_HAS_USART5
config ARCH_HAS_USART6
bool
+config MCU_SERIAL
+ bool
+ default y if ARCH_HAS_UART || ARCH_HAS_UART0 || ARCH_HAS_USART0 || ARCH_HAS_UART1 || ARCH_HAS_USART1 || \
+ ARCH_HAS_UART2 || ARCH_HAS_USART2 || ARCH_HAS_UART3 || ARCH_HAS_USART3 || \
+ ARCH_HAS_UART4 || ARCH_HAS_USART4 || ARCH_HAS_UART5 || ARCH_HAS_USART5 || ARCH_HAS_UART6 || ARCH_HAS_USART6
+
+#
+# Standard serial driver configuration
+#
+
+config STANDARD_SERIAL
+ bool "Enable standard \"upper-half\" serial driver"
+ default y if MCU_SERIAL
+ default n if !MCU_SERIAL
+ depends on !LOWLEVEL_CONSOLE
+ ---help---
+ Enable the standard, upper-half serial driver used by most MCU serial peripherals.
+
+config CONFIG_SERIAL_NPOLLWAITERS
+ int "Number of poll threads"
+ default 2
+ depends on !DISABLE_POLL && STANDARD_SERIAL
+ ---help---
+ Maximum number of threads than can be waiting for POLL events.
+ Default: 2
+
+#
+# U[S]ARTn_XYZ settings for MCU serial drivers
+#
+
choice
prompt "Serial console"
- depends on ARCH_HAS_USART0 || \
- ARCH_HAS_USART1 || ARCH_HAS_USART2 || ARCH_HAS_USART3 || \
- ARCH_HAS_USART4 || ARCH_HAS_USART5 || ARCH_HAS_USART6
+ depends on MCU_SERIAL
+ default NO_SERIAL_CONSOLE
+
+config UART_SERIAL_CONSOLE
+ bool "UART"
+ depends on ARCH_HAS_UART
+
+config UART0_SERIAL_CONSOLE
+ bool "UART0"
+ depends on ARCH_HAS_UART0
config USART0_SERIAL_CONSOLE
bool "USART0"
depends on ARCH_HAS_USART0
+config UART1_SERIAL_CONSOLE
+ bool "UART1"
+ depends on ARCH_HAS_UART1
+
config USART1_SERIAL_CONSOLE
bool "USART1"
depends on ARCH_HAS_USART1
+config UART2_SERIAL_CONSOLE
+ bool "UART2"
+ depends on ARCH_HAS_UART2
+
config USART2_SERIAL_CONSOLE
bool "USART2"
depends on ARCH_HAS_USART2
+config UART3_SERIAL_CONSOLE
+ bool "UART3"
+ depends on ARCH_HAS_UART3
+
config USART3_SERIAL_CONSOLE
bool "USART3"
depends on ARCH_HAS_USART3
+config UART4_SERIAL_CONSOLE
+ bool "UART4"
+ depends on ARCH_HAS_UART4
+
config USART4_SERIAL_CONSOLE
bool "USART4"
depends on ARCH_HAS_USART4
+config UART5_SERIAL_CONSOLE
+ bool "UART5"
+ depends on ARCH_HAS_UART5
+
config USART5_SERIAL_CONSOLE
bool "USART5"
depends on ARCH_HAS_USART5
+config UART6_SERIAL_CONSOLE
+ bool "UART6"
+ depends on ARCH_HAS_UART6
+
config USART6_SERIAL_CONSOLE
bool "USART6"
depends on ARCH_HAS_USART6
+config NO_SERIAL_CONSOLE
+ bool "No serial console"
+
endchoice
+menu "UART Configuration"
+ depends on ARCH_HAS_UART
+
+config UART_RXBUFSIZE
+ int "receive buffer size"
+ default 256
+ help
+ Characters are buffered as they are received. This specifies
+ the size of the receive buffer.
+
+config UART_TXBUFSIZE
+ int "transmit buffer size"
+ default 256
+ help
+ Characters are buffered before being sent. This specifies
+ the size of the transmit buffer.
+
+config UART_BAUD
+ int "baud rate"
+ default 11520
+ help
+ The configured BAUD of the UART.
+
+config UART_BITS
+ int "character size"
+ default 8
+ help
+ The number of bits. Must be either 7 or 8.
+
+config UART_PARITY
+ int "parity setting"
+ default 0
+ help
+ 0=no parity, 1=odd parity, 2=even parity
+
+config UART_2STOP
+ int "use 2 stop bits"
+ default 0
+ help
+ 1=Two stop bits
+
+endmenu
+
+menu "UART0 Configuration"
+ depends on ARCH_HAS_UART0
+
+config UART0_RXBUFSIZE
+ int "receive buffer size"
+ default 256
+ help
+ Characters are buffered as they are received. This specifies
+ the size of the receive buffer.
+
+config UART0_TXBUFSIZE
+ int "transmit buffer size"
+ default 256
+ help
+ Characters are buffered before being sent. This specifies
+ the size of the transmit buffer.
+
+config UART0_BAUD
+ int "baud rate"
+ default 11520
+ help
+ The configured BAUD of the UART.
+
+config UART0_BITS
+ int "character size"
+ default 8
+ help
+ The number of bits. Must be either 7 or 8.
+
+config UART0_PARITY
+ int "parity setting"
+ default 0
+ help
+ 0=no parity, 1=odd parity, 2=even parity
+
+config UART0_2STOP
+ int "use 2 stop bits"
+ default 0
+ help
+ 1=Two stop bits
+
+endmenu
+
menu "USART0 Configuration"
depends on ARCH_HAS_USART0
@@ -380,6 +532,49 @@ config USART0_2STOP
endmenu
+menu "UART1 Configuration"
+ depends on ARCH_HAS_UART1
+
+config UART1_RXBUFSIZE
+ int "receive buffer size"
+ default 256
+ help
+ Characters are buffered as they are received. This specifies
+ the size of the receive buffer.
+
+config UART1_TXBUFSIZE
+ int "transmit buffer size"
+ default 256
+ help
+ Characters are buffered before being sent. This specifies
+ the size of the transmit buffer.
+
+config UART1_BAUD
+ int "baud rate"
+ default 11520
+ help
+ The configured BAUD of the UART.
+
+config UART1_BITS
+ int "character size"
+ default 8
+ help
+ The number of bits. Must be either 7 or 8.
+
+config UART1_PARITY
+ int "parity setting"
+ default 0
+ help
+ 0=no parity, 1=odd parity, 2=even parity
+
+config UART1_2STOP
+ int "uses 2 stop bits"
+ default 0
+ help
+ 1=Two stop bits
+
+endmenu
+
menu "USART1 Configuration"
depends on ARCH_HAS_USART1
@@ -423,6 +618,49 @@ config USART1_2STOP
endmenu
+menu "UART2 Configuration"
+ depends on ARCH_HAS_UART2
+
+config UART2_RXBUFSIZE
+ int "receive buffer size"
+ default 256
+ help
+ Characters are buffered as they are received. This specifies
+ the size of the receive buffer.
+
+config UART2_TXBUFSIZE
+ int "transmit buffer size"
+ default 256
+ help
+ Characters are buffered before being sent. This specifies
+ the size of the transmit buffer.
+
+config UART2_BAUD
+ int "baud rate"
+ default 11520
+ help
+ The configured BAUD of the UART.
+
+config UART2_BITS
+ int "character size"
+ default 8
+ help
+ The number of bits. Must be either 7 or 8.
+
+config UART2_PARITY
+ int "parity setting"
+ default 0
+ help
+ 0=no parity, 1=odd parity, 2=even parity
+
+config UART2_2STOP
+ int "uses 2 stop bits"
+ default 0
+ help
+ 1=Two stop bits
+
+endmenu
+
menu "USART2 Configuration"
depends on ARCH_HAS_USART2
@@ -466,6 +704,49 @@ config USART2_2STOP
endmenu
+menu "UART3 Configuration"
+ depends on ARCH_HAS_UART3
+
+config UART3_RXBUFSIZE
+ int "receive buffer size"
+ default 256
+ help
+ Characters are buffered as they are received. This specifies
+ the size of the receive buffer.
+
+config UART3_TXBUFSIZE
+ int "transmit buffer size"
+ default 256
+ help
+ Characters are buffered before being sent. This specifies
+ the size of the transmit buffer.
+
+config UART3_BAUD
+ int "baud rate"
+ default 11520
+ help
+ The configured BAUD of the UART.
+
+config UART3_BITS
+ int "character size"
+ default 8
+ help
+ The number of bits. Must be either 7 or 8.
+
+config UART3_PARITY
+ int "parity setting"
+ default 0
+ help
+ 0=no parity, 1=odd parity, 2=even parity
+
+config UART3_2STOP
+ int "uses 2 stop bits"
+ default 0
+ help
+ 1=Two stop bits
+
+endmenu
+
menu "USART3 Configuration"
depends on ARCH_HAS_USART3
@@ -509,6 +790,49 @@ config USART3_2STOP
endmenu
+menu "UART4 Configuration"
+ depends on ARCH_HAS_UART4
+
+config UART4_RXBUFSIZE
+ int "receive buffer size"
+ default 256
+ help
+ Characters are buffered as they are received. This specifies
+ the size of the receive buffer.
+
+config UART4_TXBUFSIZE
+ int "transmit buffer size"
+ default 256
+ help
+ Characters are buffered before being sent. This specifies
+ the size of the transmit buffer.
+
+config UART4_BAUD
+ int "baud rate"
+ default 11520
+ help
+ The configured BAUD of the UART.
+
+config UART4_BITS
+ int "character size"
+ default 8
+ help
+ The number of bits. Must be either 7 or 8.
+
+config UART4_PARITY
+ int "parity setting"
+ default 0
+ help
+ 0=no parity, 1=odd parity, 2=even parity
+
+config UART4_2STOP
+ int "uses 2 stop bits"
+ default 0
+ help
+ 1=Two stop bits
+
+endmenu
+
menu "USART4 Configuration"
depends on ARCH_HAS_USART4
@@ -552,6 +876,49 @@ config USART4_2STOP
endmenu
+menu "UART5 Configuration"
+ depends on ARCH_HAS_UART5
+
+config UART5_RXBUFSIZE
+ int "receive buffer size"
+ default 256
+ help
+ Characters are buffered as they are received. This specifies
+ the size of the receive buffer.
+
+config UART5_TXBUFSIZE
+ int "transmit buffer size"
+ default 256
+ help
+ Characters are buffered before being sent. This specifies
+ the size of the transmit buffer.
+
+config UART5_BAUD
+ int "baud rate"
+ default 11520
+ help
+ The configured BAUD of the UART.
+
+config UART5_BITS
+ int "character size"
+ default 8
+ help
+ The number of bits. Must be either 7 or 8.
+
+config UART5_PARITY
+ int "parity setting"
+ default 0
+ help
+ 0=no parity, 1=odd parity, 2=even parity
+
+config UART5_2STOP
+ int "uses 2 stop bits"
+ default 0
+ help
+ 1=Two stop bits
+
+endmenu
+
menu "USART5 Configuration"
depends on ARCH_HAS_USART5
@@ -637,3 +1004,46 @@ config USART6_2STOP
1=Two stop bits
endmenu
+
+menu "UART6 Configuration"
+ depends on ARCH_HAS_UART6
+
+config UART6_RXBUFSIZE
+ int "receive buffer size"
+ default 256
+ help
+ Characters are buffered as they are received. This specifies
+ the size of the receive buffer.
+
+config UART6_TXBUFSIZE
+ int "transmit buffer size"
+ default 256
+ help
+ Characters are buffered before being sent. This specifies
+ the size of the transmit buffer.
+
+config UART6_BAUD
+ int "baud rate"
+ default 11520
+ help
+ The configured BAUD of the UART.
+
+config UART6_BITS
+ int "character size"
+ default 8
+ help
+ The number of bits. Must be either 7 or 8.
+
+config UART6_PARITY
+ int "parity setting"
+ default 0
+ help
+ 0=no parity, 1=odd parity, 2=even parity
+
+config UART6_2STOP
+ int "uses 2 stop bits"
+ default 0
+ help
+ 1=Two stop bits
+
+endmenu