diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-09-29 02:08:26 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-09-29 02:08:26 +0000 |
commit | d6b6fb44eef7981fa028111f943a48fb3f2d612e (patch) | |
tree | 3f7e93d55f83ac7c43da6e66222c81036406df38 /nuttx/configs | |
parent | a07289f037920ef02d643d0944e17c4d4cfa51ad (diff) | |
download | px4-nuttx-d6b6fb44eef7981fa028111f943a48fb3f2d612e.tar.gz px4-nuttx-d6b6fb44eef7981fa028111f943a48fb3f2d612e.tar.bz2 px4-nuttx-d6b6fb44eef7981fa028111f943a48fb3f2d612e.zip |
Clean-up redundant conditional compilation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2103 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs')
-rwxr-xr-x | nuttx/configs/stm3210e-eval/README.txt | 2 | ||||
-rwxr-xr-x | nuttx/configs/stm3210e-eval/ostest/defconfig | 8 | ||||
-rwxr-xr-x | nuttx/configs/stm3210e-eval/src/stm3210e-internal.h | 13 | ||||
-rwxr-xr-x | nuttx/configs/stm3210e-eval/src/up_boot.c | 2 | ||||
-rwxr-xr-x | nuttx/configs/stm3210e-eval/src/up_spi.c | 8 |
5 files changed, 10 insertions, 23 deletions
diff --git a/nuttx/configs/stm3210e-eval/README.txt b/nuttx/configs/stm3210e-eval/README.txt index 023055130..51e86d619 100755 --- a/nuttx/configs/stm3210e-eval/README.txt +++ b/nuttx/configs/stm3210e-eval/README.txt @@ -237,8 +237,6 @@ STM3210E-EVAL-specific Configuration Options CONFIG_U[S]ARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity CONFIG_U[S]ARTn_2STOP - Two stop bits - CONFIG_SPI1_DISABLE - Select to disable support for SPI1 - CONFIG_SPI2_DISABLE - Select to disable support for SPI2 CONFIG_SPI_POLLWAIT - Select to disable interrupt driven SPI support. Poll-waiting is recommended if the interrupt rate would be to high in the interrupt driven case. diff --git a/nuttx/configs/stm3210e-eval/ostest/defconfig b/nuttx/configs/stm3210e-eval/ostest/defconfig index a511d4eb4..d73d0d983 100755 --- a/nuttx/configs/stm3210e-eval/ostest/defconfig +++ b/nuttx/configs/stm3210e-eval/ostest/defconfig @@ -126,8 +126,6 @@ CONFIG_STM32_ADC3=n # # STM32F103Z specific serial device driver settings # -# CONFIG_USARTn_DISABLE - select to disable all support for -# the UART # CONFIG_USARTn_SERIAL_CONSOLE - selects the USARTn for the # console and ttys0 (default is the USART1). # CONFIG_USARTn_RXBUFSIZE - Characters are buffered as received. @@ -139,12 +137,6 @@ CONFIG_STM32_ADC3=n # CONFIG_USARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity # CONFIG_USARTn_2STOP - Two stop bits # -CONFIG_USART1_DISABLE=n -CONFIG_USART2_DISABLE=y -CONFIG_USART3_DISABLE=y -CONFIG_USART4_DISABLE=y -CONFIG_USART5_DISABLE=y - CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART2_SERIAL_CONSOLE=n CONFIG_USART3_SERIAL_CONSOLE=n diff --git a/nuttx/configs/stm3210e-eval/src/stm3210e-internal.h b/nuttx/configs/stm3210e-eval/src/stm3210e-internal.h index 3e5018c26..683aa1054 100755 --- a/nuttx/configs/stm3210e-eval/src/stm3210e-internal.h +++ b/nuttx/configs/stm3210e-eval/src/stm3210e-internal.h @@ -54,14 +54,11 @@ * expanded).
*/
-#if STM32_NSPI == 0
-# undef CONFIG_SPI1_DISABLE
-# define CONFIG_SPI1_DISABLE 1
-# undef CONFIG_SPI2_DISABLE
-# define CONFIG_SPI2_DISABLE 1
-#elif STM32_NSPI == 1
-# undef CONFIG_SPI2_DISABLE
-# define CONFIG_SPI2_DISABLE 1
+#if STM32_NSPI < 1
+# undef CONFIG_STM32_SPI1
+# undef CONFIG_STM32_SPI2
+#elif STM32_NSPI < 2
+# undef CONFIG_STM32_SPI2
#endif
/* STM3210E-EVAL GPIOs **************************************************************/
diff --git a/nuttx/configs/stm3210e-eval/src/up_boot.c b/nuttx/configs/stm3210e-eval/src/up_boot.c index cfc02062d..aef793520 100755 --- a/nuttx/configs/stm3210e-eval/src/up_boot.c +++ b/nuttx/configs/stm3210e-eval/src/up_boot.c @@ -76,7 +76,7 @@ void stm32_boardinitialize(void) * stm32_spiinitialize() has been brought into the link.
*/
-#if !defined(CONFIG_SPI1_DISABLE) || !defined(CONFIG_SPI2_DISABLE)
+#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2)
if (stm32_spiinitialize)
{
stm32_spiinitialize();
diff --git a/nuttx/configs/stm3210e-eval/src/up_spi.c b/nuttx/configs/stm3210e-eval/src/up_spi.c index 852c4faec..c652a6eb2 100755 --- a/nuttx/configs/stm3210e-eval/src/up_spi.c +++ b/nuttx/configs/stm3210e-eval/src/up_spi.c @@ -51,7 +51,7 @@ #include "stm32_internal.h"
#include "stm3210e-internal.h"
-#if !defined(CONFIG_SPI1_DISABLE) || !defined(CONFIG_SPI2_DISABLE)
+#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2)
/************************************************************************************
* Definitions
@@ -115,7 +115,7 @@ void weak_function stm32_spiinitialize(void) *
****************************************************************************/
-#ifndef CONFIG_SPI1_DISABLE
+#ifdef CONFIG_STM32_SPI1
void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, boolean selected)
{
spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
@@ -127,7 +127,7 @@ ubyte stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) }
#endif
-#ifndef CONFIG_SPI2_DISABLE
+#ifdef CONFIG_STM32_SPI2
void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, boolean selected)
{
spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
@@ -139,4 +139,4 @@ ubyte stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) }
#endif
-#endif /* !CONFIG_SPI1_DISABLE || !CONFIG_SPI2_DISABLE */
+#endif /* CONFIG_STM32_SPI1 || CONFIG_STM32_SPI2 */
|