9
0
Fork 0

Add Kconfig settings for the LPC17xx

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5094 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2012-09-05 17:20:19 +00:00
parent e7cefa68f4
commit 9d88d667da
11 changed files with 1053 additions and 583 deletions

View File

@ -6,6 +6,7 @@
config NSH_LIBRARY
bool "NSH Library"
default n
select SYSTEM_READLINE
---help---
Build the NSH support library. This is used, for example, by examples/nsh
in order to implement the full NuttShell (NSH).

View File

@ -152,26 +152,91 @@ config RAW_BINARY
should not be selected if you are not using the GNU toolchain.
endmenu
menu "Customize Header Files"
config ARCH_STDBOOL_H
bool "stdbool.h"
default n
---help---
The stdbool.h header file can be found at nuttx/include/stdbool.h.
However, that header includes logic to redirect the inclusion of an
architecture specific header file like:
#ifdef CONFIG_ARCH_STDBOOL_H
# include <arch/stdbool.h>
#else
...
#endif
Recall that that include path, include/arch, is a symbolic link and
will refer to a version of stdbool.h at nuttx/arch/<architecture>/include/stdbool.h.
config ARCH_MATH_H
bool "math.h"
default n
---help---
There is also a re-directing version of math.h in the source tree.
However, it resides out-of-the-way at include/nuttx/math.h because it
conflicts too often with the system math.h. If ARCH_MATH_H=y is
defined, however, the top-level makefile will copy the redirecting
math.h header file from include/nuttx/math.h to include/math.h. math.h
will then include the architecture-specific version of math.h that you
must provide at nuttx/arch/>architecture</include/math.h.
#ifdef CONFIG_ARCH_MATH_H
# include <arch/math.h>
#endif
So for the architectures that define ARCH_MATH_H=y, include/math.h
will be the redirecting math.h header file; for the architectures
that don't select ARCH_MATH_H, the redirecting math.h header file
will stay out-of-the-way in include/nuttx/.
config ARCH_STDARG_H
bool "stdarg.h"
default n
---help---
There is also a redirecting version of stdarg.h in the source tree
as well. It also resides out-of-the-way at include/nuttx/stdarg.h.
This is because you should normally use your toolchain's stdarg.h
file. But sometimes, your toolchain's stdarg.h file may have other
header file dependencies and so may not be usable in the NuttX build
environment. In those cases, you may have to create a architecture-
specific stdarg.h header file at nuttx/arch/<architecture>/include/stdarg.h
If ARCH_STDARG_H=y is defined, the top-level makefile will copy the
re-directing stdarg.h header file from include/nuttx/stdarg.h to
include/stdarg.h. So for the architectures that cannot use their
toolchain's stdarg.h file, they can use this alternative by defining
ARCH_STDARG_H=y and providing. If ARCH_STDARG_H, is not defined, then
the stdarg.h header file will stay out-of-the-way in include/nuttx/.
endmenu
menu "Debug Options"
config DEBUG
bool "Enable debug output"
bool "Enable debug features"
default n
---help---
enables built-in debug options
Enables built-in debug features. Selecting this option will (1) Enable
debug assertions in the code, (2) enable extended parameter testing in
many functions, and (3) enable support for debug output. Note that enabling
this option by itself does not produce debug output. Debug output must
also be selected on a subsystem-by-subsystem basis.
if DEBUG
config DEBUG_VERBOSE
bool "Enable debug verbose output"
default n
---help---
enables verbose debug output
Enables verbose debug output (assuming debug output is enabled)
config DEBUG_ENABLE
bool "Enable debug controls"
default n
---help---
Support an interface to enable or disable debug output.
Support an interface to dynamically enable or disable debug output.
config DEBUG_SCHED
bool "Enable scheduler debug output"

View File

@ -2,3 +2,452 @@
# For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt.
#
choice
prompt "NXP LPC17XX Chip Selection"
default ARCH_CHIP_LPC1768
depends on ARCH_CHIP_LPC17XX
config ARCH_CHIP_LPC1751
bool "LPC1751"
config ARCH_CHIP_LPC1752
bool "LPC1752"
config ARCH_CHIP_LPC1754
bool "LPC1754"
config ARCH_CHIP_LPC1756
bool "LPC1756"
config ARCH_CHIP_LPC1758
bool "LPC1758"
config ARCH_CHIP_LPC1759
bool "LPC1759"
config ARCH_CHIP_LPC1764
bool "LPC1764"
config ARCH_CHIP_LPC1765
bool "LPC1765"
config ARCH_CHIP_LPC1766
bool "LPC1766"
config ARCH_CHIP_LPC1767
bool "LPC1767"
config ARCH_CHIP_LPC1768
bool "LPC1768"
config ARCH_CHIP_LPC1769
bool "LPC1769"
endchoice
config ARCH_FAMILY_LPC175X
bool
default y if ARCH_CHIP_LPC1751 || ARCH_CHIP_LPC1752 || ARCH_CHIP_LPC1754 || ARCH_CHIP_LPC1756 || ARCH_CHIP_LPC1758 || ARCH_CHIP_LPC1759
config ARCH_FAMILY_LPC176X
bool
default y if ARCH_CHIP_LPC1764 || ARCH_CHIP_LPC1765 || ARCH_CHIP_LPC1766 || ARCH_CHIP_LPC1767 || ARCH_CHIP_LPC1768 || ARCH_CHIP_LPC1769
config ARCH_CORTEXM3
bool
default y if ARCH_CHIP_LPC17XX
config ARCH_CORTEXM4
bool
default n
menu "LPC17xx Peripheral Support"
config LPC17_MAINOSC
bool "Main oscillator"
default y
config LPC17_PLL0
bool "PLL0"
default y
config LPC17_PLL1
bool "PLL1"
default y
config LPC17_ETHERNET
bool "Ethernet"
select NET
select ARCH_HAS_PHY
default n
config LPC17_USBHOST
bool "USB host"
select USBHOST
default n
config LPC17_USBDEV
bool "USB Device"
select USBDEV
default n
config LPC17_USBOTG
bool "USB OTG"
default n
depends on LPC17_USBHOST && LPC17_USBDEV
config LPC17_UART0
bool "UART0"
select ARCH_HAS_UART0
default n
config LPC17_UART1
bool "UART1"
select ARCH_HAS_UART1
default n
config LPC17_UART2
bool "UART2"
select ARCH_HAS_UART2
default n
config LPC17_UART3
bool "UART3"
select ARCH_HAS_UART3
default n
config LPC17_CAN1
bool "CAN1"
select ARCH_HAS_UART4
default n
config LPC17_CAN2
bool "CAN2"
default n
config LPC17_SPI
bool "SPI"
default n
config LPC17_SSP0
bool "SSP0"
default n
config LPC17_SSP1
bool "SSP1"
default n
config LPC17_I2C0
bool "I2C0"
default n
config LPC17_I2C1
bool "I2C1"
default n
config LPC17_I2S
bool "I2S"
default n
config LPC17_TMR0
bool "Timer 0"
default n
config LPC17_TMR1
bool "Timer 1"
default n
config LPC17_TMR2
bool "Timer 2"
default n
config LPC17_TMR3
bool "Timer 3"
default n
config LPC17_RIT
bool "RIT"
default n
config LPC17_PWM
bool "PWM"
default n
config LPC17_MCPWM
bool "MCPWM"
default n
config LPC17_QEI
bool "QEI"
default n
config LPC17_RTC
bool "RTC"
default n
config LPC17_WDT
bool "WDT"
default n
config LPC17_ADC
bool "ADC"
default n
config LPC17_DAC
bool "DAC"
default n
config LPC17_GPDMA
bool "GPDMA"
default n
config LPC17_FLASH
bool "FLASH"
default n
endmenu
config SERIAL_TERMIOS
bool "Serial driver TERMIOS supported"
depends on LPC17_UART0 || LPC17_UART1 || LPC17_UART2 || LPC17_UART3
default n
---help---
Serial driver supports termios.h interfaces (tcsetattr, 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..
menu "CAN driver options"
config CAN_EXTID
bool "CAN extended IDs"
depends on LPC17_CAN1 || LPC17_CAN2
default n
---help---
Enables support for the 29-bit extended ID. Default Standard 11-bit IDs.
config CAN1_BAUD
int "CAN1 BAUD"
depends on LPC17_CAN1
---help---
CAN1 BAUD rate. Required if LPC17_CAN1 is defined.
config CAN2_BAUD
int "CAN2 BAUD"
depends on LPC17_CAN2
---help---
CAN2 BAUD rate. Required if CONFIG_LPC17_CAN2 is defined.
config CAN1_DIVISOR
int "CAN1 CCLK divisor"
depends on LPC17_CAN1
default 4
---help---
CAN1 is clocked at CCLK divided by this number. (the CCLK frequency is divided
by this number to get the CAN clock). Options = {1,2,4,6}. Default: 4.
config CAN2_DIVISOR
int "CAN2 CCLK divisor"
depends on LPC17_CAN2
default 4
---help---
CAN2 is clocked at CCLK divided by this number. (the CCLK frequency is divided
by this number to get the CAN clock). Options = {1,2,4,6}. Default: 4.
config CAN_TSEG1
bool "TSEG1 quanta"
depends on LPC17_CAN1 || LPC17_CAN2
default 6
---help---
The number of CAN time quanta in segment 1. Default: 6
config CAN_TSEG2
bool "TSEG2 quanta"
depends on LPC17_CAN1 || LPC17_CAN2
default 4
---help---
The number of CAN time quanta in segment 2. Default: 7
endmenu
menu "Ethernet driver options"
config PHY_AUTONEG
bool "Autonegiation"
depends on LPC17_ETHERNET
---help---
Enable auto-negotion
config PHY_SPEED100
bool "100Mbit/Sec"
depends on LPC17_ETHERNET && !PHY_AUTONEG
---help---
Select 100Mbit vs. 10Mbit speed.
config PHY_FDUPLEX
bool "Full duplex"
depends on LPC17_ETHERNET && !PHY_AUTONEG
---help---
Select full (vs. half) duplex
config NET_EMACRAM_SIZE
int "EMAC RAM Size"
depends on LPC17_ETHERNET
default 16384
---help---
Size of EMAC RAM. Default: 16384 bytes
config NET_NTXDESC
int "Number of Tx descriptors"
depends on LPC17_ETHERNET
default 18
---help---
Configured number of Tx descriptors. Default: 18
config NET_NRXDESC
int "Number of Rx descriptors"
depends on LPC17_ETHERNET
default 18
---help---
Configured number of Rx descriptors. Default: 18
config NET_PRIORITY
int "Ethernet interrupt priority"
depends on LPC17_ETHERNET
default 0
---help---
Ethernet interrupt priority. The is default is the higest priority (0).
config NET_WOL
bool "Wake-up on LAN"
depends on LPC17_ETHERNET
default n
---help---
Enable Wake-up on Lan (not fully implemented).
config NET_REGDEBUG
bool "Ethernet register-level debug"
depends on LPC17_ETHERNET && DEBUG
default n
---help---
Enable low level register debug. Also needs DEBUG.
config NET_DUMPPACKET
bool "Enable packet dumping"
depends on LPC17_ETHERNET && DEBUG
default n
---help---
Dump all received and transmitted packets. Also needs DEBUG.
config NET_HASH
bool "Hashing"
depends on LPC17_ETHERNET
default n
---help---
Enable receipt of near-perfect match frames.
config NET_MULTICAST
bool "Multicast"
depends on LPC17_ETHERNET
default y if NET_IGMP
default n if !NET_IGMP
---help---
Enable receipt of multicast (and unicast) frames. Automatically set
if NET_IGMP is selected.
endmenu
menu "USB device driver options"
config LPC17_USBDEV_FRAME_INTERRUPT
bool "USB "
depends on LPC17_USBDEV
default n
---help---
Handle USB Start-Of-Frame events. Enable reading SOF from interrupt
handler vs. simply reading on demand. Probably a bad idea... Unless
there is some issue with sampling the SOF from hardware asynchronously.
config LPC17_USBDEV_EPFAST_INTERRUPT
bool "EP fast interrupt handling"
depends on LPC17_USBDEV
default n
---help---
Enable high priority interrupts. I have no idea why you might want to do that
config LPC17_USBDEV_NDMADESCRIPTORS
int "Number of DMA descriptors"
depends on LPC17_USBDEV
default 8
---help---
Number of DMA descriptors to allocate in SRAM. Default: 8
config LPC17_USBDEV_DMA
bool "Enable USB device DMA"
depends on LPC17_USBDEV
default n
---help---
Enable lpc17xx-specific DMA support
config LPC17_USBDEV_NOVBUS
bool "Disable VBUS support"
depends on LPC17_USBDEV
default n
---help---
Define if the hardware implementation does not support the VBUS signal
config LPC17_USBDEV_NOLED
bool "Disable USB device LCD support"
depends on LPC17_USBDEV
default n
---help---
Define if the hardware implementation does not support the LED output
endmenu
menu "USB host driver options"
config USBHOST_OHCIRAM_SIZE
int "OHCI RAM Size"
depends on LPC17_USBHOST
default 16384
---help---
Total size of OHCI RAM (in AHB SRAM Bank 1). Default: 16384
config USBHOST_NEDS
int "Number of Endpoint Descriptors"
depends on LPC17_USBHOST
default 2
---help---
Number of endpoint descriptors. Default: 2
config USBHOST_NTDS
int "Number of transfer descriptors"
depends on LPC17_USBHOST
default 3
---help---
Number of transfer descriptors. Default: 3
config USBHOST_TDBUFFERS
int "Number of descriptor buffers"
depends on LPC17_USBHOST
default 2
---help---
Number of transfer descriptor buffers. Default: 2
config USBHOST_TDBUFSIZE
int "Descriptor buffer size"
depends on LPC17_USBHOST
default 128
---help---
Size of one transfer descriptor buffer. Default 128
config USBHOST_IOBUFSIZE
int "I/O buffer size"
depends on LPC17_USBHOST
default 512
---help---
Size of one end-user I/O buffer. This can be zero if the application
can guarantee that all end-user I/O buffers reside in AHB SRAM.
endmenu

View File

@ -261,6 +261,7 @@ config LPC43_USART0
config LPC43_UART1
bool "UART1"
select ARCH_HAS_UART1
default n
config LPC43_USART2
@ -292,49 +293,6 @@ config LPC43_WWDT
endmenu
menu "UART1 Configuration"
depends on LPC43_UART1
config UART1_RXBUFSIZE
int "UART1 Rx buffer size"
default 256
---help---
Characters are buffered as received. This specific the size of the receive
buffer.
config UART1_TXBUFSIZE
int "UART1 Tx buffer size"
default 256
---help---
Characters are buffered before being sent. This specific the size of the
transmit buffer
config UART1_BAUD
int "UART1 BAUD"
default 11520
---help---
The configured BAUD of the UART
config UART1_BITS
int "UART1 number of bits"
default 8
---help---
The number of bits. Must be either 7 or 8.
config UART1_PARITY
int "UART1 parity"
default 0
---help---
0=no parity, 1=odd parity, 2=even parity
config UART1_2STOP
int "UART1 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

View File

@ -303,10 +303,12 @@ config STM32_USART3
config STM32_UART4
bool "UART4"
select ARCH_HAS_UART4
default n
config STM32_UART5
bool "UART5"
select ARCH_HAS_UART5
default n
config STM32_USART6
@ -1445,53 +1447,6 @@ config USART3_RXDMA
---help---
In high data rate usage, Rx DMA may eliminate Rx overrun errors
menu "UART4 Configuration"
depends on STM32_UART4
config UART4_SERIAL_CONSOLE
bool "UART4 serial console"
default y if !STM32_USART1 && !STM32_USART2 && !STM32_USART3
---help---
Selects the UART4 for the console and ttys0 (default is the USART1).
config UART4_RXBUFSIZE
int "UART4 Rx buffer size"
default 256
---help---
Characters are buffered as received. This specific the size of the receive
buffer.
config UART4_TXBUFSIZE
int "UART4 Tx buffer size"
default 256
---help---
Characters are buffered before being sent. This specific the size of the
transmit buffer
config UART4_BAUD
int "UART4 BAUD"
default 11520
---help---
The configured BAUD of the UART
config UART4_BITS
int "UART4 number of bits"
default 8
---help---
The number of bits. Must be either 7 or 8.
config UART4_PARITY
int "UART4 parity"
default 0
---help---
0=no parity, 1=odd parity, 2=even parity
config UART4_2STOP
int "UART4 two stop bits"
default 0
---help---
0=1 stop bit, 1=Two stop bits. Default: 1 stop bit
config UART4_RXDMA
bool "UART4 Rx DMA"
default n
@ -1499,55 +1454,6 @@ config UART4_RXDMA
---help---
In high data rate usage, Rx DMA may eliminate Rx overrun errors
endmenu
menu "UART5 Configuration"
depends on STM32_UART5
config UART5_SERIAL_CONSOLE
bool "UART5 serial console"
default y if !STM32_USART1 && !STM32_USART2 && !STM32_USART3 && !STM32_UART4
---help---
Selects the UART5 for the console and ttys0 (default is the USART1).
config UART5_RXBUFSIZE
int "UART5 Rx buffer size"
default 256
---help---
Characters are buffered as received. This specific the size of the receive
buffer.
config UART5_TXBUFSIZE
int "UART5 Tx buffer size"
default 256
---help---
Characters are buffered before being sent. This specific the size of the
transmit buffer
config UART5_BAUD
int "UART5 BAUD"
default 11520
---help---
The configured BAUD of the UART
config UART5_BITS
int "UART5 number of bits"
default 8
---help---
The number of bits. Must be either 7 or 8.
config UART5_PARITY
int "UART5 parity"
default 0
---help---
0=no parity, 1=odd parity, 2=even parity
config UART5_2STOP
int "UART5 two stop bits"
default 0
---help---
0=1 stop bit, 1=Two stop bits. Default: 1 stop bit
config UART5_RXDMA
bool "UART5 Rx DMA"
default n
@ -1555,8 +1461,6 @@ config UART5_RXDMA
---help---
In high data rate usage, Rx DMA may eliminate Rx overrun errors
endmenu
config USART6_RXDMA
bool "USART6 Rx DMA"
default n

View File

@ -493,26 +493,32 @@ config PIC32MX_SPI4
config PIC32MX_UART1
bool "UART1"
default n
select ARCH_HAS_UART1
config PIC32MX_UART2
bool "UART2"
default n
select ARCH_HAS_UART1
config PIC32MX_UART3
bool "UART3"
default n
select ARCH_HAS_UART3
config PIC32MX_UART4
bool "UART4"
default n
select ARCH_HAS_UART4
config PIC32MX_UART5
bool "UART5"
default n
select ARCH_HAS_UART5
config PIC32MX_UART6
bool "UART6"
default n
select ARCH_HAS_UART6
config PIC32MX_ADC
bool "ADC1"
@ -561,6 +567,8 @@ config PIC32MX_CAN2
config PIC32MX_ETHERNET
bool "Ethernet"
default n
select NET
select ARCH_HAS_PHY
config PIC32MX_CTMU
bool "Charge Time Measurement Unit (CMTU)"
@ -906,270 +914,6 @@ config PIC32MX_USBPRIO
endmenu
menu "UART1 Configuration"
depends on PIC32MX_UART1
config UART1_RXBUFSIZE
int "UART1 Rx buffer size"
default 256
---help---
Characters are buffered as received. This specific the size of the receive buffer
config UART1_TXBUFSIZE
int "UART1 Tx buffer size"
default 256
---help---
Characters are buffered before being sent. This specific the size of the transmit buffer.
config UART1_BAUD
int "UART1 BAUD"
default 115200
---help---
The configure BAUD of the UART.
config UART1_BITS
int "UART1 bits"
default 8
---help---
The number of bits. Must be either 7 or 8.
config UART1_PARITY
int "UART1 parity"
default 0
---help---
0=no parity, 1=odd parity, 2=even parity
config UART1_2STOP
int "UART1 2 stop bits"
default 0
---help---
0=1 stop bit, 1=Two stop bits. Default: 1 stop bit
endmenu
menu "UART2 Configuration"
depends on PIC32MX_UART2
config UART2_RXBUFSIZE
int "UART2 Rx buffer size"
default 256
---help---
Characters are buffered as received. This specific the size of the receive buffer
config UART2_TXBUFSIZE
int "UART2 Tx buffer size"
default 256
---help---
Characters are buffered before being sent. This specific the size of the transmit buffer.
config UART2_BAUD
int "UART2 BAUD"
default 115200
---help---
The configure BAUD of the UART.
config UART2_BITS
int "UART2 bits"
default 8
---help---
The number of bits. Must be either 7 or 8.
config UART2_PARITY
int "UART2 parity"
default 0
---help---
0=no parity, 1=odd parity, 2=even parity
config UART2_2STOP
int "UART2 2 stop bits"
default 0
---help---
0=1 stop bit, 1=Two stop bits. Default: 1 stop bit
endmenu
menu "UART3 Configuration"
depends on PIC32MX_UART3
config UART3_RXBUFSIZE
int "UART3 Rx buffer size"
default 256
---help---
Characters are buffered as received. This specific the size of the receive buffer
config UART3_TXBUFSIZE
int "UART3 Tx buffer size"
default 256
---help---
Characters are buffered before being sent. This specific the size of the transmit buffer.
config UART3_BAUD
int "UART3 BAUD"
default 115200
---help---
The configure BAUD of the UART.
config UART3_BITS
int "UART3 bits"
default 8
---help---
The number of bits. Must be either 7 or 8.
config UART3_PARITY
int "UART3 parity"
default 0
---help---
0=no parity, 1=odd parity, 2=even parity
config UART3_2STOP
int "UART3 2 stop bits"
default 0
---help---
0=1 stop bit, 1=Two stop bits. Default: 1 stop bit
endmenu
menu "UART4 Configuration"
depends on PIC32MX_UART4
config UART4_SERIAL_CONSOLE
bool "UART4 serial console"
default y if !PIC32MX_UART1 && !PIC32MX_UART2 && !PIC32MX_UART3
---help---
Selects the UART4 for the console and ttys0. Default: UART4 (if enabled).
config UART4_RXBUFSIZE
int "UART4 Rx buffer size"
default 256
---help---
Characters are buffered as received. This specific the size of the receive buffer
config UART4_TXBUFSIZE
int "UART4 Tx buffer size"
default 256
---help---
Characters are buffered before being sent. This specific the size of the transmit buffer.
config UART4_BAUD
int "UART4 BAUD"
default 115200
---help---
The configure BAUD of the UART.
config UART4_BITS
int "UART4 bits"
default 8
---help---
The number of bits. Must be either 7 or 8.
config UART4_PARITY
int "UART4 parity"
default 0
---help---
0=no parity, 1=odd parity, 2=even parity
config UART4_2STOP
int "UART4 2 stop bits"
default 0
---help---
0=1 stop bit, 1=Two stop bits. Default: 1 stop bit
endmenu
menu "UART5 Configuration"
depends on PIC32MX_UART5
config UART5_SERIAL_CONSOLE
bool "UART5 serial console"
default y if !PIC32MX_UART1 && !PIC32MX_UART2 && !PIC32MX_UART3 && !PIC32MX_UART4
---help---
Selects the UART5 for the console and ttys0. Default: UART5 (if enabled).
config UART5_RXBUFSIZE
int "UART5 Rx buffer size"
default 256
---help---
Characters are buffered as received. This specific the size of the receive buffer
config UART5_TXBUFSIZE
int "UART5 Tx buffer size"
default 256
---help---
Characters are buffered before being sent. This specific the size of the transmit buffer.
config UART5_BAUD
int "UART5 BAUD"
default 115200
---help---
The configure BAUD of the UART.
config UART5_BITS
int "UART5 bits"
default 8
---help---
The number of bits. Must be either 7 or 8.
config UART5_PARITY
int "UART5 parity"
default 0
---help---
0=no parity, 1=odd parity, 2=even parity
config UART5_2STOP
int "UART5 2 stop bits"
default 0
---help---
0=1 stop bit, 1=Two stop bits. Default: 1 stop bit
endmenu
menu "UART6 Configuration"
depends on PIC32MX_UART6
config UART6_SERIAL_CONSOLE
bool "UART6 serial console"
default y if !PIC32MX_UART1 && !PIC32MX_UART2 && !PIC32MX_UART3 && !PIC32MX_UART4 && !PIC32MX_UART5
---help---
Selects the UART6 for the console and ttys0. Default: UART6 (if enabled).
config UART6_RXBUFSIZE
int "UART6 Rx buffer size"
default 256
---help---
Characters are buffered as received. This specific the size of the receive buffer
config UART6_TXBUFSIZE
int "UART6 Tx buffer size"
default 256
---help---
Characters are buffered before being sent. This specific the size of the transmit buffer.
config UART6_BAUD
int "UART6 BAUD"
default 115200
---help---
The configure BAUD of the UART.
config UART6_BITS
int "UART6 bits"
default 8
---help---
The number of bits. Must be either 7 or 8.
config UART6_PARITY
int "UART6 parity"
default 0
---help---
0=no parity, 1=odd parity, 2=even parity
config UART6_2STOP
int "UART6 2 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 PIC32MX_UART1 || PIC32MX_UART2 || PIC32MX_UART3 || PIC32MX_UART4 || PIC32MX_UART5 || PIC32MX_UART6
@ -1179,22 +923,6 @@ config SERIAL_TERMIOS
If this is not defined, then the terminal settings (baud, parity, etc).
are not configurable at runtime; serial streams cannot be flushed, etc..
choice
prompt "PIC32MX PHY Selection"
depends on PIC32MX_ETHERNET
default PHY_KS8721
config PHY_KS8721
bool "Micrel KS8721 PHY"
config PHY_DP83848C
bool "National Semiconduction DP83848C PHY"
config PHY_LAN8720
int "SMSC LAN8720 PHY"
endchoice
menu "PIC32MX PHY/Ethernet device driver settings"
depends on PIC32MX_ETHERNET

View File

@ -61,18 +61,22 @@ CONFIG_16550_REGWIDTH=8
CONFIG_16550_ADDRWIDTH=16
CONFIG_16550_SUPRESS_CONFIG=y
CONFIG_SUPPRESS_SERIAL_INTS=n
CONFIG_16550_UART0=y
CONFIG_16550_UART0_BASE=0x3f8
CONFIG_16550_UART0_CLOCK=16000000
CONFIG_16550_UART0_IRQ=IRQ4
CONFIG_16550_UART1=n
CONFIG_16550_UART1_BASE=0x2f8
CONFIG_16550_UART1_CLOCK=16000000
CONFIG_16550_UART1_IRQ=IRQ3
CONFIG_16550_UART2=n
CONFIG_16550_UART2_BASE=0x3e8
CONFIG_16550_UART2_CLOCK=16000000
CONFIG_16550_UART2_IRQ=IRQ4
CONFIG_16550_UART3=n
CONFIG_16550_UART3_BASE=0x2e8
CONFIG_16550_UART3_CLOCK=16000000
@ -81,40 +85,40 @@ CONFIG_16550_UART3_IRQ=IRQ3
#
# Serial device driver settings
#
CONFIG_UART0_SERIAL_CONSOLE=y
CONFIG_UART1_SERIAL_CONSOLE=n
CONFIG_UART2_SERIAL_CONSOLE=n
CONFIG_UART3_SERIAL_CONSOLE=n
CONFIG_16550_UART0_SERIAL_CONSOLE=y
CONFIG_16550_UART1_SERIAL_CONSOLE=n
CONFIG_16550_UART2_SERIAL_CONSOLE=n
CONFIG_16550_UART3_SERIAL_CONSOLE=n
CONFIG_UART0_TXBUFSIZE=256
CONFIG_UART1_TXBUFSIZE=256
CONFIG_UART2_TXBUFSIZE=256
CONFIG_UART3_TXBUFSIZE=256
CONFIG_16550_UART0_TXBUFSIZE=256
CONFIG_16550_UART1_TXBUFSIZE=256
CONFIG_16550_UART2_TXBUFSIZE=256
CONFIG_16550_UART3_TXBUFSIZE=256
CONFIG_UART0_RXBUFSIZE=256
CONFIG_UART1_RXBUFSIZE=256
CONFIG_UART2_RXBUFSIZE=256
CONFIG_UART3_RXBUFSIZE=256
CONFIG_16550_UART0_RXBUFSIZE=256
CONFIG_16550_UART1_RXBUFSIZE=256
CONFIG_16550_UART2_RXBUFSIZE=256
CONFIG_16550_UART3_RXBUFSIZE=256
CONFIG_UART0_BAUD=57600
CONFIG_UART2_BAUD=57600
CONFIG_UART3_BAUD=57600
CONFIG_UART1_BAUD=57600
CONFIG_16550_UART0_BAUD=57600
CONFIG_16550_UART2_BAUD=57600
CONFIG_16550_UART3_BAUD=57600
CONFIG_16550_UART1_BAUD=57600
CONFIG_UART0_BITS=8
CONFIG_UART1_BITS=8
CONFIG_UART2_BITS=8
CONFIG_UART3_BITS=8
CONFIG_16550_UART0_BITS=8
CONFIG_16550_UART1_BITS=8
CONFIG_16550_UART2_BITS=8
CONFIG_16550_UART3_BITS=8
CONFIG_UART0_PARITY=0
CONFIG_UART1_PARITY=0
CONFIG_UART2_PARITY=0
CONFIG_UART3_PARITY=0
CONFIG_16550_UART0_PARITY=0
CONFIG_16550_UART1_PARITY=0
CONFIG_16550_UART2_PARITY=0
CONFIG_16550_UART3_PARITY=0
CONFIG_UART0_2STOP=0
CONFIG_UART1_2STOP=0
CONFIG_UART2_2STOP=0
CONFIG_UART3_2STOP=0
CONFIG_16550_UART0_2STOP=0
CONFIG_16550_UART1_2STOP=0
CONFIG_16550_UART2_2STOP=0
CONFIG_16550_UART3_2STOP=0
#
# General OS setup

View File

@ -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

View File

@ -128,20 +128,20 @@ struct uart_ops_s g_uart_ops =
/* I/O buffers */
#ifdef CONFIG_16550_UART0
static char g_uart0rxbuffer[CONFIG_UART0_RXBUFSIZE];
static char g_uart0txbuffer[CONFIG_UART0_TXBUFSIZE];
static char g_uart0rxbuffer[CONFIG_16550_UART0_RXBUFSIZE];
static char g_uart0txbuffer[CONFIG_16550_UART0_TXBUFSIZE];
#endif
#ifdef CONFIG_16550_UART1
static char g_uart1rxbuffer[CONFIG_UART1_RXBUFSIZE];
static char g_uart1txbuffer[CONFIG_UART1_TXBUFSIZE];
static char g_uart1rxbuffer[CONFIG_16550_UART1_RXBUFSIZE];
static char g_uart1txbuffer[CONFIG_16550_UART1_TXBUFSIZE];
#endif
#ifdef CONFIG_16550_UART2
static char g_uart2rxbuffer[CONFIG_UART1_RXBUFSIZE];
static char g_uart2txbuffer[CONFIG_UART1_TXBUFSIZE];
static char g_uart2rxbuffer[CONFIG_16550_UART2_RXBUFSIZE];
static char g_uart2txbuffer[CONFIG_16550_UART2_TXBUFSIZE];
#endif
#ifdef CONFIG_16550_UART3
static char g_uart3rxbuffer[CONFIG_UART1_RXBUFSIZE];
static char g_uart3txbuffer[CONFIG_UART1_TXBUFSIZE];
static char g_uart3rxbuffer[CONFIG_16550_UART3_RXBUFSIZE];
static char g_uart3txbuffer[CONFIG_16550_UART3_TXBUFSIZE];
#endif
/* This describes the state of the LPC17xx uart0 port. */
@ -151,16 +151,16 @@ static struct u16550_s g_uart0priv =
{
.uartbase = CONFIG_16550_UART0_BASE,
#ifndef CONFIG_16550_SUPRESS_CONFIG
.baud = CONFIG_UART0_BAUD,
.baud = CONFIG_16550_UART0_BAUD,
.uartclk = CONFIG_16550_UART0_CLOCK,
#endif
#ifndef CONFIG_SUPPRESS_SERIAL_INTS
.irq = CONFIG_16550_UART0_IRQ,
#endif
#ifndef CONFIG_16550_SUPRESS_CONFIG
.parity = CONFIG_UART0_PARITY,
.bits = CONFIG_UART0_BITS,
.stopbits2 = CONFIG_UART0_2STOP,
.parity = CONFIG_16550_UART0_PARITY,
.bits = CONFIG_16550_UART0_BITS,
.stopbits2 = CONFIG_16550_UART0_2STOP,
#endif
};
@ -168,12 +168,12 @@ static uart_dev_t g_uart0port =
{
.recv =
{
.size = CONFIG_UART0_RXBUFSIZE,
.size = CONFIG_16550_UART0_RXBUFSIZE,
.buffer = g_uart0rxbuffer,
},
.xmit =
{
.size = CONFIG_UART0_TXBUFSIZE,
.size = CONFIG_16550_UART0_TXBUFSIZE,
.buffer = g_uart0txbuffer,
},
.ops = &g_uart_ops,
@ -188,16 +188,16 @@ static struct u16550_s g_uart1priv =
{
.uartbase = CONFIG_16550_UART1_BASE,
#ifndef CONFIG_16550_SUPRESS_CONFIG
.baud = CONFIG_UART1_BAUD,
.baud = CONFIG_16550_UART1_BAUD,
.uartclk = CONFIG_16550_UART1_CLOCK,
#endif
#ifndef CONFIG_SUPPRESS_SERIAL_INTS
.irq = CONFIG_16550_UART1_IRQ,
#endif
#ifndef CONFIG_16550_SUPRESS_CONFIG
.parity = CONFIG_UART1_PARITY,
.bits = CONFIG_UART1_BITS,
.stopbits2 = CONFIG_UART1_2STOP,
.parity = CONFIG_16550_UART1_PARITY,
.bits = CONFIG_16550_UART1_BITS,
.stopbits2 = CONFIG_16550_UART1_2STOP,
#endif
};
@ -205,12 +205,12 @@ static uart_dev_t g_uart1port =
{
.recv =
{
.size = CONFIG_UART1_RXBUFSIZE,
.size = CONFIG_16550_UART1_RXBUFSIZE,
.buffer = g_uart1rxbuffer,
},
.xmit =
{
.size = CONFIG_UART1_TXBUFSIZE,
.size = CONFIG_16550_UART1_TXBUFSIZE,
.buffer = g_uart1txbuffer,
},
.ops = &g_uart_ops,
@ -225,16 +225,16 @@ static struct u16550_s g_uart2priv =
{
.uartbase = CONFIG_16550_UART2_BASE,
#ifndef CONFIG_16550_SUPRESS_CONFIG
.baud = CONFIG_UART2_BAUD,
.baud = CONFIG_16550_UART2_BAUD,
.uartclk = CONFIG_16550_UART2_CLOCK,
#endif
#ifndef CONFIG_SUPPRESS_SERIAL_INTS
.irq = CONFIG_16550_UART2_IRQ,
#endif
#ifndef CONFIG_16550_SUPRESS_CONFIG
.parity = CONFIG_UART2_PARITY,
.bits = CONFIG_UART2_BITS,
.stopbits2 = CONFIG_UART2_2STOP,
.parity = CONFIG_16550_UART2_PARITY,
.bits = CONFIG_16550_UART2_BITS,
.stopbits2 = CONFIG_16550_UART2_2STOP,
#endif
};
@ -242,12 +242,12 @@ static uart_dev_t g_uart2port =
{
.recv =
{
.size = CONFIG_UART2_RXBUFSIZE,
.size = CONFIG_16550_UART2_RXBUFSIZE,
.buffer = g_uart2rxbuffer,
},
.xmit =
{
.size = CONFIG_UART2_TXBUFSIZE,
.size = CONFIG_16550_UART2_TXBUFSIZE,
.buffer = g_uart2txbuffer,
},
.ops = &g_uart_ops,
@ -262,16 +262,16 @@ static struct u16550_s g_uart3priv =
{
.uartbase = CONFIG_16550_UART3_BASE,
#ifndef CONFIG_16550_SUPRESS_CONFIG
.baud = CONFIG_UART3_BAUD,
.baud = CONFIG_16550_UART3_BAUD,
.uartclk = CONFIG_16550_UART3_CLOCK,
#endif
#ifndef CONFIG_SUPPRESS_SERIAL_INTS
.irq = CONFIG_16550_UART3_IRQ,
#endif
#ifndef CONFIG_16550_SUPRESS_CONFIG
.parity = CONFIG_UART3_PARITY,
.bits = CONFIG_UART3_BITS,
.stopbits2 = CONFIG_UART3_2STOP,
.parity = CONFIG_16550_UART3_PARITY,
.bits = CONFIG_16550_UART3_BITS,
.stopbits2 = CONFIG_16550_UART3_2STOP,
#endif
};
@ -279,12 +279,12 @@ static uart_dev_t g_uart3port =
{
.recv =
{
.size = CONFIG_UART3_RXBUFSIZE,
.size = CONFIG_16550_UART3_RXBUFSIZE,
.buffer = g_uart3rxbuffer,
},
.xmit =
{
.size = CONFIG_UART3_TXBUFSIZE,
.size = CONFIG_16550_UART3_TXBUFSIZE,
.buffer = g_uart3txbuffer,
},
.ops = &g_uart_ops,
@ -294,7 +294,7 @@ static uart_dev_t g_uart3port =
/* Which UART with be tty0/console and which tty1? tty2? tty3? */
#if defined(CONFIG_UART0_SERIAL_CONSOLE)
#if defined(CONFIG_16550_UART0_SERIAL_CONSOLE)
# define CONSOLE_DEV g_uart0port /* UART0=console */
# define TTYS0_DEV g_uart0port /* UART0=ttyS0 */
# ifdef CONFIG_16550_UART1
@ -333,7 +333,7 @@ static uart_dev_t g_uart3port =
# undef TTYS3_DEV /* No ttyS3 */
# endif
# endif
#elif defined(CONFIG_UART1_SERIAL_CONSOLE)
#elif defined(CONFIG_16550_UART1_SERIAL_CONSOLE)
# define CONSOLE_DEV g_uart1port /* UART1=console */
# define TTYS0_DEV g_uart1port /* UART1=ttyS0 */
# ifdef CONFIG_16550_UART
@ -372,7 +372,7 @@ static uart_dev_t g_uart3port =
# undef TTYS3_DEV /* No ttyS3 */
# endif
# endif
#elif defined(CONFIG_UART2_SERIAL_CONSOLE)
#elif defined(CONFIG_16550_UART2_SERIAL_CONSOLE)
# define CONSOLE_DEV g_uart2port /* UART2=console */
# define TTYS0_DEV g_uart2port /* UART2=ttyS0 */
# ifdef CONFIG_16550_UART
@ -411,7 +411,7 @@ static uart_dev_t g_uart3port =
# undef TTYS3_DEV /* No ttyS3 */
# endif
# endif
#elif defined(CONFIG_UART3_SERIAL_CONSOLE)
#elif defined(CONFIG_16550_UART3_SERIAL_CONSOLE)
# define CONSOLE_DEV g_uart3port /* UART3=console */
# define TTYS0_DEV g_uart3port /* UART3=ttyS0 */
# ifdef CONFIG_16550_UART
@ -1161,4 +1161,4 @@ int up_putc(int ch)
}
#endif
#endif /* CONFIG_UART_16550 */
#endif /* CONFIG_16550_UART */

View File

@ -169,71 +169,3 @@ config ARCH_BZERO
bool "bzero"
default n
endif
config ARCH_HEADER_FILES
bool "Customize header files"
default n
---help---
The architecture may provide custom versions of certain
standard header files
if ARCH_HEADER_FILES
config ARCH_STDBOOL_H
bool "stdbool.h"
default n
---help---
The stdbool.h header file can be found at nuttx/include/stdbool.h.
However, that header includes logic to redirect the inclusion of an
architecture specific header file like:
#ifdef CONFIG_ARCH_STDBOOL_H
# include <arch/stdbool.h>
#else
...
#endif
Recall that that include path, include/arch, is a symbolic link and
will refer to a version of stdbool.h at nuttx/arch/<architecture>/include/stdbool.h.
config ARCH_MATH_H
bool "math.h"
default n
---help---
There is also a re-directing version of math.h in the source tree.
However, it resides out-of-the-way at include/nuttx/math.h because it
conflicts too often with the system math.h. If ARCH_MATH_H=y is
defined, however, the top-level makefile will copy the redirecting
math.h header file from include/nuttx/math.h to include/math.h. math.h
will then include the architecture-specific version of math.h that you
must provide at nuttx/arch/>architecture</include/math.h.
#ifdef CONFIG_ARCH_MATH_H
# include <arch/math.h>
#endif
So for the architectures that define ARCH_MATH_H=y, include/math.h
will be the redirecting math.h header file; for the architectures
that don't select ARCH_MATH_H, the redirecting math.h header file
will stay out-of-the-way in include/nuttx/.
config ARCH_STDARG_H
bool "stdarg.h"
default n
---help---
There is also a redirecting version of stdarg.h in the source tree
as well. It also resides out-of-the-way at include/nuttx/stdarg.h.
This is because you should normally use your toolchain's stdarg.h
file. But sometimes, your toolchain's stdarg.h file may have other
header file dependencies and so may not be usable in the NuttX build
environment. In those cases, you may have to create a architecture-
specific stdarg.h header file at nuttx/arch/<architecture>/include/stdarg.h
If ARCH_STDARG_H=y is defined, the top-level makefile will copy the
re-directing stdarg.h header file from include/nuttx/stdarg.h to
include/stdarg.h. So for the architectures that cannot use their
toolchain's stdarg.h file, they can use this alternative by defining
ARCH_STDARG_H=y and providing. If ARCH_STDARG_H, is not defined, then
the stdarg.h header file will stay out-of-the-way in include/nuttx/.
endif

View File

@ -9,8 +9,27 @@ config NET
---help---
Enable or disable all network features
config ARCH_HAS_PHY
bool
if NET
choice
prompt "Board PHY Selection"
depends on ARCH_HAS_PHY
default PHY_KS8721
config PHY_KS8721
bool "Micrel KS8721 PHY"
config PHY_DP83848C
bool "National Semiconduction DP83848C PHY"
config PHY_LAN8720
int "SMSC LAN8720 PHY"
endchoice
config NET_NOINTS
bool "Not interrupt driven"
default n