diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-12 19:37:33 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-04-12 19:37:33 +0000 |
commit | c1c9b913a2f0cf2b6bdfb5ee9143796abfbad4d4 (patch) | |
tree | 51905004bdcb2d906dc66cc30d198655dfaf11ae /nuttx/configs/lpcxpresso-lpc1768/src | |
parent | 42d1c7ccb2a4b580da835788a332cea62e8165dc (diff) | |
download | px4-nuttx-c1c9b913a2f0cf2b6bdfb5ee9143796abfbad4d4.tar.gz px4-nuttx-c1c9b913a2f0cf2b6bdfb5ee9143796abfbad4d4.tar.bz2 px4-nuttx-c1c9b913a2f0cf2b6bdfb5ee9143796abfbad4d4.zip |
Fixes for clean LPCXpresso NSH build
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3495 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/lpcxpresso-lpc1768/src')
-rwxr-xr-x | nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c index ad64ab9b9..01b1df6db 100755 --- a/nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c +++ b/nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c @@ -57,7 +57,20 @@ #ifdef CONFIG_ARCH_BOARD_LPCXPRESSO # define CONFIG_NSH_HAVEUSBDEV 1 -# define CONFIG_NSH_HAVEMMCSD 1 +# ifdef CONFIG_LPC17_SSP0 +# define CONFIG_NSH_HAVEMMCSD 1 +# else +# undef CONFIG_NSH_HAVEMMCSD +# endif +#else +# error "Unrecognized board" +# undef CONFIG_NSH_HAVEUSBDEV +# undef CONFIG_NSH_HAVEMMCSD +#endif + +/* Do we have SPI support for MMC/SD? */ + +#ifdef CONFIG_NSH_HAVEMMCSD # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 # error "The LPCXpresso MMC/SD is on SSP0" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -68,13 +81,6 @@ # undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 # endif -# ifndef CONFIG_LPC17_SSP0 -# warning "CONFIG_LPC17_SSP0 is not enabled" -# endif -#else -# error "Unrecognized board" -# undef CONFIG_NSH_HAVEUSBDEV -# undef CONFIG_NSH_HAVEMMCSD #endif /* Can't support USB device features if USB device is not enabled */ @@ -131,6 +137,7 @@ int nsh_archinitialize(void) { +#ifdef CONFIG_NSH_HAVEMMCSD FAR struct spi_dev_s *ssp; int ret; @@ -159,6 +166,6 @@ int nsh_archinitialize(void) message("Successfuly bound SSP port %d to MMC/SD slot %d\n", CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); - +#endif return OK; } |