From c2e050b010291298bee7f99143afdbac5c8058cd Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 4 Sep 2012 14:43:56 +0000 Subject: Changes to Kconfig and matching defconfig files git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5085 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/arm/src/stm32/Kconfig | 38 ++++++++++---------- nuttx/arch/arm/src/stm32/stm32_lowputc.c | 20 +++++------ nuttx/arch/arm/src/stm32/stm32_serial.c | 62 ++++++++++++++++---------------- nuttx/arch/arm/src/stm32/stm32_uart.h | 44 +++++++++++------------ 4 files changed, 82 insertions(+), 82 deletions(-) (limited to 'nuttx/arch') diff --git a/nuttx/arch/arm/src/stm32/Kconfig b/nuttx/arch/arm/src/stm32/Kconfig index bf7c59c11..c3130864c 100644 --- a/nuttx/arch/arm/src/stm32/Kconfig +++ b/nuttx/arch/arm/src/stm32/Kconfig @@ -1591,52 +1591,52 @@ endmenu menu "UART4 Configuration" depends on STM32_UART4 -config USART4_SERIAL_CONSOLE +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 USART4_RXBUFSIZE +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 USART4_TXBUFSIZE +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 USART4_BAUD +config UART4_BAUD int "UART4 BAUD" default 11520 ---help--- The configured BAUD of the UART -config USART4_BITS +config UART4_BITS int "UART4 number of bits" default 8 ---help--- The number of bits. Must be either 7 or 8. -config USART4_PARITY +config UART4_PARITY int "UART4 parity" default 0 ---help--- 0=no parity, 1=odd parity, 2=even parity -config USART4_2STOP +config UART4_2STOP bool "UART4 two stop bits" default n ---help--- Two stop bits -config USART4_RXDMA - bool "USART4 Rx DMA" +config UART4_RXDMA + bool "UART4 Rx DMA" default n depends on STM32_STM32F40XX && ARCH_DMA && STM32_DMA1 ---help--- @@ -1647,52 +1647,52 @@ endmenu menu "UART5 Configuration" depends on STM32_UART5 -config USART5_SERIAL_CONSOLE +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 USART5_RXBUFSIZE - int "USART5 Rx buffer size" +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 USART5_TXBUFSIZE +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 USART5_BAUD +config UART5_BAUD int "UART5 BAUD" default 11520 ---help--- The configured BAUD of the UART -config USART5_BITS +config UART5_BITS int "UART5 number of bits" default 8 ---help--- The number of bits. Must be either 7 or 8. -config USART5_PARITY +config UART5_PARITY int "UART5 parity" default 0 ---help--- 0=no parity, 1=odd parity, 2=even parity -config USART5_2STOP +config UART5_2STOP bool "UART5 two stop bits" default n ---help--- Two stop bits -config USART5_RXDMA - bool "USART5 Rx DMA" +config UART5_RXDMA + bool "UART5 Rx DMA" default n depends on STM32_STM32F40XX && ARCH_DMA && STM32_DMA1 ---help--- diff --git a/nuttx/arch/arm/src/stm32/stm32_lowputc.c b/nuttx/arch/arm/src/stm32/stm32_lowputc.c index 14f4efae4..7f7205672 100644 --- a/nuttx/arch/arm/src/stm32/stm32_lowputc.c +++ b/nuttx/arch/arm/src/stm32/stm32_lowputc.c @@ -85,22 +85,22 @@ # define STM32_CONSOLE_2STOP CONFIG_USART3_2STOP # define STM32_CONSOLE_TX GPIO_USART3_TX # define STM32_CONSOLE_RX GPIO_USART3_RX -#elif defined(CONFIG_USART4_SERIAL_CONSOLE) +#elif defined(CONFIG_UART4_SERIAL_CONSOLE) # define STM32_CONSOLE_BASE STM32_UART4_BASE # define STM32_APBCLOCK STM32_PCLK1_FREQUENCY -# define STM32_CONSOLE_BAUD CONFIG_USART4_BAUD -# define STM32_CONSOLE_BITS CONFIG_USART4_BITS -# define STM32_CONSOLE_PARITY CONFIG_USART4_PARITY -# define STM32_CONSOLE_2STOP CONFIG_USART4_2STOP +# define STM32_CONSOLE_BAUD CONFIG_UART4_BAUD +# define STM32_CONSOLE_BITS CONFIG_UART4_BITS +# define STM32_CONSOLE_PARITY CONFIG_UART4_PARITY +# define STM32_CONSOLE_2STOP CONFIG_UART4_2STOP # define STM32_CONSOLE_TX GPIO_UART4_TX # define STM32_CONSOLE_RX GPIO_UART4_RX -#elif defined(CONFIG_USART5_SERIAL_CONSOLE) +#elif defined(CONFIG_UART5_SERIAL_CONSOLE) # define STM32_CONSOLE_BASE STM32_UART5_BASE # define STM32_APBCLOCK STM32_PCLK1_FREQUENCY -# define STM32_CONSOLE_BAUD CONFIG_USART5_BAUD -# define STM32_CONSOLE_BITS CONFIG_USART5_BITS -# define STM32_CONSOLE_PARITY CONFIG_USART5_PARITY -# define STM32_CONSOLE_2STOP CONFIG_USART5_2STOP +# define STM32_CONSOLE_BAUD CONFIG_UART5_BAUD +# define STM32_CONSOLE_BITS CONFIG_UART5_BITS +# define STM32_CONSOLE_PARITY CONFIG_UART5_PARITY +# define STM32_CONSOLE_2STOP CONFIG_UART5_2STOP # define STM32_CONSOLE_TX GPIO_UART5_TX # define STM32_CONSOLE_RX GPIO_UART5_RX #elif defined(CONFIG_USART6_SERIAL_CONSOLE) diff --git a/nuttx/arch/arm/src/stm32/stm32_serial.c b/nuttx/arch/arm/src/stm32/stm32_serial.c index 265abfbf3..b90e4ee97 100644 --- a/nuttx/arch/arm/src/stm32/stm32_serial.c +++ b/nuttx/arch/arm/src/stm32/stm32_serial.c @@ -90,7 +90,7 @@ # endif # if defined(CONFIG_USART2_RXDMA) || defined(CONFIG_USART3_RXDMA) || \ - defined(CONFIG_USART4_RXDMA) || defined(CONFIG_USART5_RXDMA) + defined(CONFIG_UART4_RXDMA) || defined(CONFIG_UART5_RXDMA) # ifndef CONFIG_STM32_DMA1 # error STM32 USART2/3/4/5 receive DMA requires CONFIG_STM32_DMA1 # endif @@ -113,11 +113,11 @@ # error "USART3 DMA channel not defined (DMAMAP_USART3_RX)" # endif -# if defined(CONFIG_USART4_RXDMA) && !defined(DMAMAP_UART4_RX) +# if defined(CONFIG_UART4_RXDMA) && !defined(DMAMAP_UART4_RX) # error "UART4 DMA channel not defined (DMAMAP_UART4_RX)" # endif -# if defined(CONFIG_USART5_RXDMA) && !defined(DMAMAP_UART5_RX) +# if defined(CONFIG_UART5_RXDMA) && !defined(DMAMAP_UART5_RX) # error "UART5 DMA channel not defined (DMAMAP_UART5_RX)" # endif @@ -338,17 +338,17 @@ static char g_usart3rxfifo[RXDMA_BUFFER_SIZE]; #endif #ifdef CONFIG_STM32_UART4 -static char g_uart4rxbuffer[CONFIG_USART4_RXBUFSIZE]; -static char g_uart4txbuffer[CONFIG_USART4_TXBUFSIZE]; -# ifdef CONFIG_USART4_RXDMA +static char g_uart4rxbuffer[CONFIG_UART4_RXBUFSIZE]; +static char g_uart4txbuffer[CONFIG_UART4_TXBUFSIZE]; +# ifdef CONFIG_UART4_RXDMA static char g_uart4rxfifo[RXDMA_BUFFER_SIZE]; # endif #endif #ifdef CONFIG_STM32_UART5 -static char g_uart5rxbuffer[CONFIG_USART5_RXBUFSIZE]; -static char g_uart5txbuffer[CONFIG_USART5_TXBUFSIZE]; -# ifdef CONFIG_USART5_RXDMA +static char g_uart5rxbuffer[CONFIG_UART5_RXBUFSIZE]; +static char g_uart5txbuffer[CONFIG_UART5_TXBUFSIZE]; +# ifdef CONFIG_UART5_RXDMA static char g_uart5rxfifo[RXDMA_BUFFER_SIZE]; # endif #endif @@ -526,15 +526,15 @@ static struct up_dev_s g_uart4priv = #endif .recv = { - .size = CONFIG_USART4_RXBUFSIZE, + .size = CONFIG_UART4_RXBUFSIZE, .buffer = g_uart4rxbuffer, }, .xmit = { - .size = CONFIG_USART4_TXBUFSIZE, + .size = CONFIG_UART4_TXBUFSIZE, .buffer = g_uart4txbuffer, }, -#ifdef CONFIG_USART4_RXDMA +#ifdef CONFIG_UART4_RXDMA .ops = &g_uart_dma_ops, #else .ops = &g_uart_ops, @@ -543,21 +543,21 @@ static struct up_dev_s g_uart4priv = }, .irq = STM32_IRQ_UART4, - .parity = CONFIG_USART4_PARITY, - .bits = CONFIG_USART4_BITS, - .stopbits2 = CONFIG_USART4_2STOP, - .baud = CONFIG_USART4_BAUD, + .parity = CONFIG_UART4_PARITY, + .bits = CONFIG_UART4_BITS, + .stopbits2 = CONFIG_UART4_2STOP, + .baud = CONFIG_UART4_BAUD, .apbclock = STM32_PCLK1_FREQUENCY, .usartbase = STM32_UART4_BASE, .tx_gpio = GPIO_UART4_TX, .rx_gpio = GPIO_UART4_RX, -#ifdef GPIO_USART4_CTS +#ifdef GPIO_UART4_CTS .cts_gpio = GPIO_UART4_CTS, #endif -#ifdef GPIO_USART4_RTS +#ifdef GPIO_UART4_RTS .rts_gpio = GPIO_UART4_RTS, #endif -#ifdef CONFIG_USART4_RXDMA +#ifdef CONFIG_UART4_RXDMA .rxdma_channel = DMAMAP_UART4_RX, .rxfifo = g_uart4rxfifo, #endif @@ -577,15 +577,15 @@ static struct up_dev_s g_uart5priv = #endif .recv = { - .size = CONFIG_USART5_RXBUFSIZE, + .size = CONFIG_UART5_RXBUFSIZE, .buffer = g_uart5rxbuffer, }, .xmit = { - .size = CONFIG_USART5_TXBUFSIZE, + .size = CONFIG_UART5_TXBUFSIZE, .buffer = g_uart5txbuffer, }, -#ifdef CONFIG_USART5_RXDMA +#ifdef CONFIG_UART5_RXDMA .ops = &g_uart_dma_ops, #else .ops = &g_uart_ops, @@ -594,21 +594,21 @@ static struct up_dev_s g_uart5priv = }, .irq = STM32_IRQ_UART5, - .parity = CONFIG_USART5_PARITY, - .bits = CONFIG_USART5_BITS, - .stopbits2 = CONFIG_USART5_2STOP, - .baud = CONFIG_USART5_BAUD, + .parity = CONFIG_UART5_PARITY, + .bits = CONFIG_UART5_BITS, + .stopbits2 = CONFIG_UART5_2STOP, + .baud = CONFIG_UART5_BAUD, .apbclock = STM32_PCLK1_FREQUENCY, .usartbase = STM32_UART5_BASE, .tx_gpio = GPIO_UART5_TX, .rx_gpio = GPIO_UART5_RX, -#ifdef GPIO_USART5_CTS +#ifdef GPIO_UART5_CTS .cts_gpio = GPIO_UART5_CTS, #endif -#ifdef GPIO_USART5_RTS +#ifdef GPIO_UART5_RTS .rts_gpio = GPIO_UART5_RTS, #endif -#ifdef CONFIG_USART5_RXDMA +#ifdef CONFIG_UART5_RXDMA .rxdma_channel = DMAMAP_UART5_RX, .rxfifo = g_uart5rxfifo, #endif @@ -1898,14 +1898,14 @@ void stm32_serial_dma_poll(void) } #endif -#ifdef CONFIG_USART4_RXDMA +#ifdef CONFIG_UART4_RXDMA if (g_uart4priv.rxdma != NULL) { up_dma_rxcallback(g_uart4priv.rxdma, 0, &g_uart4priv); } #endif -#ifdef CONFIG_USART5_RXDMA +#ifdef CONFIG_UART5_RXDMA if (g_uart5priv.rxdma != NULL) { up_dma_rxcallback(g_uart5priv.rxdma, 0, &g_uart5priv); diff --git a/nuttx/arch/arm/src/stm32/stm32_uart.h b/nuttx/arch/arm/src/stm32/stm32_uart.h index 42fe9e346..f51265b18 100644 --- a/nuttx/arch/arm/src/stm32/stm32_uart.h +++ b/nuttx/arch/arm/src/stm32/stm32_uart.h @@ -84,40 +84,40 @@ #if defined(CONFIG_USART1_SERIAL_CONSOLE) && defined(CONFIG_STM32_USART1) # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE -# undef CONFIG_USART4_SERIAL_CONSOLE -# undef CONFIG_USART5_SERIAL_CONSOLE +# undef CONFIG_UART4_SERIAL_CONSOLE +# undef CONFIG_UART5_SERIAL_CONSOLE # undef CONFIG_USART6_SERIAL_CONSOLE # define CONSOLE_UART 1 # define HAVE_CONSOLE 1 #elif defined(CONFIG_USART2_SERIAL_CONSOLE) && defined(CONFIG_STM32_USART2) # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE -# undef CONFIG_USART4_SERIAL_CONSOLE -# undef CONFIG_USART5_SERIAL_CONSOLE +# undef CONFIG_UART4_SERIAL_CONSOLE +# undef CONFIG_UART5_SERIAL_CONSOLE # undef CONFIG_USART6_SERIAL_CONSOLE # define CONSOLE_UART 2 # define HAVE_CONSOLE 1 #elif defined(CONFIG_USART3_SERIAL_CONSOLE) && defined(CONFIG_STM32_USART3) # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE -# undef CONFIG_USART4_SERIAL_CONSOLE -# undef CONFIG_USART5_SERIAL_CONSOLE +# undef CONFIG_UART4_SERIAL_CONSOLE +# undef CONFIG_UART5_SERIAL_CONSOLE # undef CONFIG_USART6_SERIAL_CONSOLE # define CONSOLE_UART 3 # define HAVE_CONSOLE 1 -#elif defined(CONFIG_USART4_SERIAL_CONSOLE) && defined(CONFIG_STM32_UART4) +#elif defined(CONFIG_UART4_SERIAL_CONSOLE) && defined(CONFIG_STM32_UART4) # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE -# undef CONFIG_USART5_SERIAL_CONSOLE +# undef CONFIG_UART5_SERIAL_CONSOLE # undef CONFIG_USART6_SERIAL_CONSOLE # define CONSOLE_UART 4 # define HAVE_CONSOLE 1 -#elif defined(CONFIG_USART5_SERIAL_CONSOLE) && defined(CONFIG_STM32_UART5) +#elif defined(CONFIG_UART5_SERIAL_CONSOLE) && defined(CONFIG_STM32_UART5) # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE -# undef CONFIG_USART4_SERIAL_CONSOLE +# undef CONFIG_UART4_SERIAL_CONSOLE # undef CONFIG_USART6_SERIAL_CONSOLE # define CONSOLE_UART 5 # define HAVE_CONSOLE 1 @@ -125,16 +125,16 @@ # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE -# undef CONFIG_USART4_SERIAL_CONSOLE -# undef CONFIG_USART5_SERIAL_CONSOLE +# undef CONFIG_UART4_SERIAL_CONSOLE +# undef CONFIG_UART5_SERIAL_CONSOLE # define CONSOLE_UART 6 # define HAVE_CONSOLE 1 #else # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE -# undef CONFIG_USART4_SERIAL_CONSOLE -# undef CONFIG_USART5_SERIAL_CONSOLE +# undef CONFIG_UART4_SERIAL_CONSOLE +# undef CONFIG_UART5_SERIAL_CONSOLE # undef CONFIG_USART6_SERIAL_CONSOLE # define CONSOLE_UART 0 # undef HAVE_CONSOLE @@ -149,8 +149,8 @@ # undef CONFIG_USART1_RXDMA # undef CONFIG_USART2_RXDMA # undef CONFIG_USART3_RXDMA -# undef CONFIG_USART4_RXDMA -# undef CONFIG_USART5_RXDMA +# undef CONFIG_UART4_RXDMA +# undef CONFIG_UART5_RXDMA # undef CONFIG_USART6_RXDMA #endif @@ -169,11 +169,11 @@ #endif #ifndef CONFIG_STM32_UART4 -# undef CONFIG_USART4_RXDMA +# undef CONFIG_UART4_RXDMA #endif #ifndef CONFIG_STM32_UART5 -# undef CONFIG_USART5_RXDMA +# undef CONFIG_UART5_RXDMA #endif #ifndef CONFIG_STM32_USART6 @@ -184,8 +184,8 @@ #undef SERIAL_HAVE_DMA #if defined(CONFIG_USART1_RXDMA) || defined(CONFIG_USART2_RXDMA) || \ - defined(CONFIG_USART3_RXDMA) || defined(CONFIG_USART4_RXDMA) || \ - defined(CONFIG_USART5_RXDMA) || defined(CONFIG_USART6_RXDMA) + defined(CONFIG_USART3_RXDMA) || defined(CONFIG_UART4_RXDMA) || \ + defined(CONFIG_UART5_RXDMA) || defined(CONFIG_USART6_RXDMA) # define SERIAL_HAVE_DMA 1 #endif @@ -198,9 +198,9 @@ # undef SERIAL_HAVE_ONLY_DMA #elif defined(CONFIG_STM32_USART3) && !defined(CONFIG_USART3_RXDMA) # undef SERIAL_HAVE_ONLY_DMA -#elif defined(CONFIG_STM32_UART4) && !defined(CONFIG_USART4_RXDMA) +#elif defined(CONFIG_STM32_UART4) && !defined(CONFIG_UART4_RXDMA) # undef SERIAL_HAVE_ONLY_DMA -#elif defined(CONFIG_STM32_UART5) && !defined(CONFIG_USART5_RXDMA) +#elif defined(CONFIG_STM32_UART5) && !defined(CONFIG_UART5_RXDMA) # undef SERIAL_HAVE_ONLY_DMA #elif defined(CONFIG_STM32_USART6) && !defined(CONFIG_USART6_RXDMA) # undef SERIAL_HAVE_ONLY_DMA -- cgit v1.2.3