diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-02-02 23:14:54 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-02-02 23:14:54 +0000 |
commit | 16166e4a5ea25f9c01784a11162de92156b5b872 (patch) | |
tree | 5db2d7fe63865f55a665a3ac3a86ed6d4468c6a0 /nuttx/arch/arm | |
parent | 48fd86b3cbce7ecde8f571148444d8953dcc68da (diff) | |
download | px4-nuttx-16166e4a5ea25f9c01784a11162de92156b5b872.tar.gz px4-nuttx-16166e4a5ea25f9c01784a11162de92156b5b872.tar.bz2 px4-nuttx-16166e4a5ea25f9c01784a11162de92156b5b872.zip |
Add stm3240g-eval nsh2 configuration: SDIO and no UART
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4363 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm')
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_lowputc.c | 2 | ||||
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_serial.c | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_lowputc.c b/nuttx/arch/arm/src/stm32/stm32_lowputc.c index d2264252f..ce104c43d 100644 --- a/nuttx/arch/arm/src/stm32/stm32_lowputc.c +++ b/nuttx/arch/arm/src/stm32/stm32_lowputc.c @@ -195,8 +195,6 @@ # define STM32_CONSOLE_2STOP CONFIG_USART6_2STOP # define STM32_CONSOLE_TX GPIO_USART6_TX # define STM32_CONSOLE_RX GPIO_USART6_RX -#else -# error "No CONFIG_USARTn_SERIAL_CONSOLE Setting" #endif /* CR1 settings */ diff --git a/nuttx/arch/arm/src/stm32/stm32_serial.c b/nuttx/arch/arm/src/stm32/stm32_serial.c index 4546cd291..f5fc1d5da 100644 --- a/nuttx/arch/arm/src/stm32/stm32_serial.c +++ b/nuttx/arch/arm/src/stm32/stm32_serial.c @@ -69,13 +69,10 @@ /* Is there a USART enabled? */ -#if !defined(CONFIG_STM32_USART1) && \ - !defined(CONFIG_STM32_USART2) && \ - !defined(CONFIG_STM32_USART3) && \ - !defined(CONFIG_STM32_UART4) && \ - !defined(CONFIG_STM32_UART5) && \ - !defined(CONFIG_STM32_USART6) -# error "No USARTs enabled" +#if defined(CONFIG_STM32_USART1) && defined(CONFIG_STM32_USART2) && \ + defined(CONFIG_STM32_USART3) && defined(CONFIG_STM32_UART4) && \ + defined(CONFIG_STM32_UART5) && defined(CONFIG_STM32_USART6) +# define HAVE_UART 1 #endif /* Is there a serial console? */ @@ -93,7 +90,6 @@ #elif defined(CONFIG_USART6_SERIAL_CONSOLE) && defined(CONFIG_STM32_USART6) # define CONSOLE_UART 6 #else -# warning "No valid CONFIG_USARTn_SERIAL_CONSOLE Setting" # define CONSOLE_UART 0 #endif @@ -102,6 +98,7 @@ */ #ifdef CONFIG_USE_SERIALDRIVER +#ifdef HAVE_UART /**************************************************************************** * Private Types @@ -1146,6 +1143,7 @@ static int up_interrupt_usart6(int irq, void *context) return up_interrupt_common(&g_usart6priv); } #endif +#endif /* HAVE UART */ /**************************************************************************** * Public Functions @@ -1163,6 +1161,7 @@ static int up_interrupt_usart6(int irq, void *context) void up_earlyserialinit(void) { +#ifdef HAVE_UART unsigned i; /* Disable all USART interrupts */ @@ -1180,6 +1179,7 @@ void up_earlyserialinit(void) #if CONSOLE_UART > 0 up_setup(&uart_devs[CONSOLE_UART - 1]->dev); #endif +#endif /* HAVE UART */ } /**************************************************************************** @@ -1193,6 +1193,7 @@ void up_earlyserialinit(void) void up_serialinit(void) { +#ifdef HAVE_UART char devname[16]; unsigned i, j; @@ -1222,6 +1223,7 @@ void up_serialinit(void) devname[9] = '0' + j++; (void)uart_register(devname, &uart_devs[i]->dev); } +#endif /* HAVE UART */ } /**************************************************************************** |