summaryrefslogtreecommitdiff
path: root/nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c')
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/src/up_nsh.c25
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;
}