From 7d30697408fbad876179cd6806f1d2fd4ff0150f Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 4 Feb 2016 14:14:43 -0600 Subject: [PATCH] There are a few things that should still depend on CONFIG_NSH_ARCHINT vs CONFIG_LIB_BOARDCTL --- configs/eagle100/src/lm_appinit.c | 10 +++---- configs/lm3s6965-ek/src/lm_appinit.c | 5 +++- configs/lm3s8962-ek/src/lm_appinit.c | 5 +++- .../lpcxpresso-lpc1115/src/lpc11_appinit.c | 19 ++++++------- .../lpcxpresso-lpc1768/src/lpc17_appinit.c | 27 +++++++------------ configs/mcu123-lpc214x/src/lpc2148_appinit.c | 5 +++- configs/nucleus2g/src/lpc17_appinit.c | 5 +++- configs/olimex-lpc1766stk/src/lpc17_appinit.c | 5 +++- configs/olimex-strp711/src/str71_appinit.c | 16 +++++------ .../pic32mx-starterkit/src/pic32mx_appinit.c | 4 ++- configs/pic32mx7mmb/src/pic32_appinit.c | 4 ++- configs/samd20-xplained/src/sam_appinit.c | 4 --- configs/samd21-xplained/src/sam_appinit.c | 4 --- configs/saml21-xplained/src/sam_appinit.c | 4 --- configs/shenzhou/src/stm32_appinit.c | 14 +--------- configs/sure-pic32mx/src/pic32mx_appinit.c | 27 ++++++++++++------- configs/u-blox-c027/src/lpc17_appinit.c | 21 ++++++++++----- configs/zkit-arm-1769/src/lpc17_appinit.c | 17 ++++++++---- 18 files changed, 104 insertions(+), 92 deletions(-) diff --git a/configs/eagle100/src/lm_appinit.c b/configs/eagle100/src/lm_appinit.c index c4cf32b523..6594f5abb1 100644 --- a/configs/eagle100/src/lm_appinit.c +++ b/configs/eagle100/src/lm_appinit.c @@ -57,7 +57,7 @@ /* PORT and SLOT number probably depend on the board configuration */ -#ifdef CONFIG_ARCH_BOARD_EAGLE100 +#ifdef CONFIG_NSH_ARCHINIT # undef NSH_HAVEUSBDEV # define NSH_HAVEMMCSD 1 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 @@ -71,10 +71,10 @@ # define CONFIG_NSH_MMCSDSLOTNO 0 # endif #else - /* Add configuration for new LM3s boards here */ -# error "Unrecognized lm3s board" -# undef NSH_HAVEUSBDEV -# undef NSH_HAVEMMCSD +# undef CONFIG_NSH_MMCSDSPIPORTNO +# define CONFIG_NSH_MMCSDSPIPORTNO 0 +# undef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 #endif /* Can't support USB features if USB is not enabled */ diff --git a/configs/lm3s6965-ek/src/lm_appinit.c b/configs/lm3s6965-ek/src/lm_appinit.c index 92b7099c58..6f2480b80d 100644 --- a/configs/lm3s6965-ek/src/lm_appinit.c +++ b/configs/lm3s6965-ek/src/lm_appinit.c @@ -74,7 +74,7 @@ /* PORT and SLOT number depend on the board configuration */ -#ifdef CONFIG_LIB_BOARDCTL +#ifdef CONFIG_NSH_ARCHINIT # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 # error "The LM3S6965 Eval Kit MMC/SD is on SSI0" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -89,8 +89,11 @@ # define CONFIG_NSH_MMCSDMINOR 0 # endif #else +# undef CONFIG_NSH_MMCSDSPIPORTNO # define CONFIG_NSH_MMCSDSPIPORTNO 0 +# undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 +# undef CONFIG_NSH_MMCSDMINOR # define CONFIG_NSH_MMCSDMINOR 0 #endif diff --git a/configs/lm3s8962-ek/src/lm_appinit.c b/configs/lm3s8962-ek/src/lm_appinit.c index da171e263a..7a027dda55 100644 --- a/configs/lm3s8962-ek/src/lm_appinit.c +++ b/configs/lm3s8962-ek/src/lm_appinit.c @@ -61,7 +61,7 @@ /* PORT and SLOT number depend on the board configuration */ -#ifdef CONFIG_LIB_BOARDCTL +#ifdef CONFIG_NSH_ARCHINIT # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 # error "The LM3S8962 Eval Kit MMC/SD is on SSI0" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -79,8 +79,11 @@ # endif #else +# undef CONFIG_NSH_MMCSDSPIPORTNO # define CONFIG_NSH_MMCSDSPIPORTNO 0 +# undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 +# undef CONFIG_NSH_MMCSDMINOR # define CONFIG_NSH_MMCSDMINOR 0 #endif diff --git a/configs/lpcxpresso-lpc1115/src/lpc11_appinit.c b/configs/lpcxpresso-lpc1115/src/lpc11_appinit.c index 5c77107dbf..bbe61c493d 100644 --- a/configs/lpcxpresso-lpc1115/src/lpc11_appinit.c +++ b/configs/lpcxpresso-lpc1115/src/lpc11_appinit.c @@ -54,22 +54,17 @@ /* PORT and SLOT number probably depend on the board configuration */ -#ifdef CONFIG_ARCH_BOARD_LPCXPRESSO -# define NSH_HAVEUSBDEV 1 -# ifdef CONFIG_LPC17_SSP1 -# define NSH_HAVEMMCSD 1 -# else -# undef NSH_HAVEMMCSD -# endif +#define NSH_HAVEUSBDEV 1 +#ifdef CONFIG_LPC17_SSP1 +# define NSH_HAVEMMCSD 1 #else -# error "Unrecognized board" -# undef NSH_HAVEUSBDEV # undef NSH_HAVEMMCSD #endif /* Do we have SPI support for MMC/SD? */ #ifdef NSH_HAVEMMCSD +#ifdef CONFIG_NSH_ARCHINIT # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 # error "The LPCXpresso MMC/SD is on SSP1" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -80,6 +75,12 @@ # undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 # endif +#else +# undef CONFIG_NSH_MMCSDSPIPORTNO +# define CONFIG_NSH_MMCSDSPIPORTNO 1 +# undef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +#endif #endif /* Can't support USB device features if USB device is not enabled */ diff --git a/configs/lpcxpresso-lpc1768/src/lpc17_appinit.c b/configs/lpcxpresso-lpc1768/src/lpc17_appinit.c index ddbf899da4..a9b760b87c 100644 --- a/configs/lpcxpresso-lpc1768/src/lpc17_appinit.c +++ b/configs/lpcxpresso-lpc1768/src/lpc17_appinit.c @@ -59,22 +59,17 @@ /* PORT and SLOT number probably depend on the board configuration */ -#ifdef CONFIG_ARCH_BOARD_LPCXPRESSO -# define NSH_HAVEUSBDEV 1 -# ifdef CONFIG_LPC17_SSP1 -# define NSH_HAVEMMCSD 1 -# else -# undef NSH_HAVEMMCSD -# endif +#define NSH_HAVEUSBDEV 1 +#ifdef CONFIG_LPC17_SSP1 +# define NSH_HAVEMMCSD 1 #else -# error "Unrecognized board" -# undef NSH_HAVEUSBDEV # undef NSH_HAVEMMCSD #endif /* Do we have SPI support for MMC/SD? */ #ifdef NSH_HAVEMMCSD +#ifdef CONFIG_NSH_ARCHINIT # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 # error "The LPCXpresso MMC/SD is on SSP1" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -85,6 +80,12 @@ # undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 # endif +#else +# undef CONFIG_NSH_MMCSDSPIPORTNO +# define CONFIG_NSH_MMCSDSPIPORTNO 1 +# undef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +#endif #endif /* Can't support USB device features if USB device is not enabled */ @@ -109,14 +110,6 @@ # undef NSH_HAVEMMCSD #endif /* CONFIG_LIB_BOARDCTL */ -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/mcu123-lpc214x/src/lpc2148_appinit.c b/configs/mcu123-lpc214x/src/lpc2148_appinit.c index 9bbddcd02a..6437d12bf5 100644 --- a/configs/mcu123-lpc214x/src/lpc2148_appinit.c +++ b/configs/mcu123-lpc214x/src/lpc2148_appinit.c @@ -60,7 +60,7 @@ /* PORT and SLOT number depend on the board configuration */ -#ifdef CONFIG_LIB_BOARDCTL +#ifdef CONFIG_NSH_ARCHINIT # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 # error "The LPC214x MMC/SD is on SPI1" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -78,8 +78,11 @@ # endif #else +# undef CONFIG_NSH_MMCSDSPIPORTNO # define CONFIG_NSH_MMCSDSPIPORTNO 1 +# undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 +# undef CONFIG_NSH_MMCSDMINOR # define CONFIG_NSH_MMCSDMINOR 0 #endif diff --git a/configs/nucleus2g/src/lpc17_appinit.c b/configs/nucleus2g/src/lpc17_appinit.c index af348d93c6..c0496b35cd 100644 --- a/configs/nucleus2g/src/lpc17_appinit.c +++ b/configs/nucleus2g/src/lpc17_appinit.c @@ -60,7 +60,7 @@ /* PORT and SLOT number probably depend on the board configuration */ -#ifdef CONFIG_LIB_BOARDCTL +#ifdef CONFIG_NSH_ARCHINIT # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 # error "The Nucleus-2G MMC/SD is on SSP0" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -78,8 +78,11 @@ # endif #else +# undef CONFIG_NSH_MMCSDSPIPORTNO # define CONFIG_NSH_MMCSDSPIPORTNO 0 +# undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 +# undef CONFIG_NSH_MMCSDMINOR # define CONFIG_NSH_MMCSDMINOR 0 #endif diff --git a/configs/olimex-lpc1766stk/src/lpc17_appinit.c b/configs/olimex-lpc1766stk/src/lpc17_appinit.c index 642a056781..89fd701173 100644 --- a/configs/olimex-lpc1766stk/src/lpc17_appinit.c +++ b/configs/olimex-lpc1766stk/src/lpc17_appinit.c @@ -66,7 +66,7 @@ /* MMC/SD is on SSP port 1. There is only a single slot, slot 0 */ -#ifdef CONFIG_LIB_BOARDCTL +#ifdef CONFIG_NSH_ARCHINIT # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 # undef CONFIG_NSH_MMCSDSPIPORTNO # define CONFIG_NSH_MMCSDSPIPORTNO 1 @@ -82,8 +82,11 @@ # endif #else +# undef CONFIG_NSH_MMCSDSPIPORTNO # define CONFIG_NSH_MMCSDSPIPORTNO 1 +# undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 +# undef CONFIG_NSH_MMCSDMINOR # define CONFIG_NSH_MMCSDMINOR 0 #endif diff --git a/configs/olimex-strp711/src/str71_appinit.c b/configs/olimex-strp711/src/str71_appinit.c index 72779fd866..44cca74773 100644 --- a/configs/olimex-strp711/src/str71_appinit.c +++ b/configs/olimex-strp711/src/str71_appinit.c @@ -57,10 +57,10 @@ /* PORT and SLOT number probably depend on the board configuration */ -#ifdef CONFIG_ARCH_BOARD_OLIMEX_STRP711 -# define NSH_HAVEUSBDEV 1 -# ifdef CONFIG_STR71X_BSPI1 -# define NSH_HAVEMMCSD 1 +#define NSH_HAVEUSBDEV 1 +#ifdef CONFIG_STR71X_BSPI1 +# define NSH_HAVEMMCSD 1 +# ifdef CONFIG_NSH_ARCHINIT # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 # error "The Olimex STR-P711 MMC/SD is on BSPI1" # undef CONFIG_NSH_MMCSDSPIPORTNO @@ -72,12 +72,12 @@ # define CONFIG_NSH_MMCSDSLOTNO 0 # endif # else -# undef NSH_HAVEMMCSD +# undef CONFIG_NSH_MMCSDSPIPORTNO +# define CONFIG_NSH_MMCSDSPIPORTNO 0 +# undef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 # endif #else - /* Add configuration for new STR71x boards here */ -# error "Unrecognized STR71x board" -# undef NSH_HAVEUSBDEV # undef NSH_HAVEMMCSD #endif diff --git a/configs/pic32mx-starterkit/src/pic32mx_appinit.c b/configs/pic32mx-starterkit/src/pic32mx_appinit.c index 57268cfa45..6423630733 100644 --- a/configs/pic32mx-starterkit/src/pic32mx_appinit.c +++ b/configs/pic32mx-starterkit/src/pic32mx_appinit.c @@ -87,7 +87,9 @@ /* Make sure that the NSH configuration uses the slot */ -# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0 +# if !defined(CONFIG_NSH_MMCSDSLOTNO) +# define CONFIG_NSH_MMCSDSLOTNO 0 +# elif CONFIG_NSH_MMCSDSLOTNO != 0 # warning "The PIC32 Starter Kit has only one slot (0)" # undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 diff --git a/configs/pic32mx7mmb/src/pic32_appinit.c b/configs/pic32mx7mmb/src/pic32_appinit.c index 26562593ae..0970e27781 100644 --- a/configs/pic32mx7mmb/src/pic32_appinit.c +++ b/configs/pic32mx7mmb/src/pic32_appinit.c @@ -86,7 +86,9 @@ * SD slot on the Mikroelektronica PIC32MX7 MMB). */ -# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0 +# if !defined(CONFIG_NSH_MMCSDSLOTNO) +# define CONFIG_NSH_MMCSDSLOTNO 0 +# elif CONFIG_NSH_MMCSDSLOTNO != 0 # warning "The Mikroelektronika PIC32MX7 MMB has only one slot (0)" # undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 diff --git a/configs/samd20-xplained/src/sam_appinit.c b/configs/samd20-xplained/src/sam_appinit.c index e010822c73..dd0ca0c9f3 100644 --- a/configs/samd20-xplained/src/sam_appinit.c +++ b/configs/samd20-xplained/src/sam_appinit.c @@ -76,14 +76,10 @@ # if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAMDL_MMCSDSLOTNO # error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO) -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO SAMDL_MMCSDSLOTNO # endif # if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SPI_PORTNO # error CONFIG_NSH_MMCSDSPIPORTNO must have the same value as SPI_PORTNO -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO SPI_PORTNO # endif /* Default MMC/SD minor number */ diff --git a/configs/samd21-xplained/src/sam_appinit.c b/configs/samd21-xplained/src/sam_appinit.c index f7225ead2f..e0bca03010 100644 --- a/configs/samd21-xplained/src/sam_appinit.c +++ b/configs/samd21-xplained/src/sam_appinit.c @@ -76,14 +76,10 @@ # if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAMDL_MMCSDSLOTNO # error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO) -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO SAMDL_MMCSDSLOTNO # endif # if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SPI_PORTNO # error CONFIG_NSH_MMCSDSPIPORTNO must have the same value as SPI_PORTNO -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO SPI_PORTNO # endif /* Default MMC/SD minor number */ diff --git a/configs/saml21-xplained/src/sam_appinit.c b/configs/saml21-xplained/src/sam_appinit.c index ef2d68b28c..98d66e9213 100644 --- a/configs/saml21-xplained/src/sam_appinit.c +++ b/configs/saml21-xplained/src/sam_appinit.c @@ -76,14 +76,10 @@ # if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAMDL_MMCSDSLOTNO # error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO) -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO SAMDL_MMCSDSLOTNO # endif # if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SPI_PORTNO # error CONFIG_NSH_MMCSDSPIPORTNO must have the same value as SPI_PORTNO -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO SPI_PORTNO # endif /* Default MMC/SD minor number */ diff --git a/configs/shenzhou/src/stm32_appinit.c b/configs/shenzhou/src/stm32_appinit.c index 24c15b99ab..4ef9ad82db 100644 --- a/configs/shenzhou/src/stm32_appinit.c +++ b/configs/shenzhou/src/stm32_appinit.c @@ -88,24 +88,12 @@ # if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != STM32_MMCSDSLOTNO # error "Only one MMC/SD slot: Slot 0" -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO STM32_MMCSDSLOTNO -# endif - -# ifndef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO STM32_MMCSDSLOTNO # endif /* Verify configured SPI port number */ # if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != STM32_MMCSDSPIPORTNO # error "Only one MMC/SD port: SPI1" -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO STM32_MMCSDSPIPORTNO -# endif - -# ifndef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO STM32_MMCSDSPIPORTNO # endif #endif @@ -183,7 +171,7 @@ int board_app_initialize(void) if (ret < 0) { syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot %d: %d\n", - CONFIG_NSH_MMCSDSLOTNO, ret); + STM32_MMCSDSLOTNO, ret); return ret; } #endif diff --git a/configs/sure-pic32mx/src/pic32mx_appinit.c b/configs/sure-pic32mx/src/pic32mx_appinit.c index cb7c3086a6..6992300bd0 100644 --- a/configs/sure-pic32mx/src/pic32mx_appinit.c +++ b/configs/sure-pic32mx/src/pic32mx_appinit.c @@ -85,17 +85,26 @@ /* MMC/SD configuration */ #ifdef NSH_HAVE_MMCSD -# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 2 -# warning "The Sure PIC32MX MMC/SD is on SPI2" -# undef CONFIG_NSH_MMCSDSPIPORTNO +# ifdef CONFIG_NSH_ARCHINIT +# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 2 +# warning "The Sure PIC32MX MMC/SD is on SPI2" +# undef CONFIG_NSH_MMCSDSPIPORTNO +# define CONFIG_NSH_MMCSDSPIPORTNO 2 +# endif +# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0 +# error "The Sure PIC32MX MMC/SD has only one slot (0)" +# warning CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +# endif +# ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +# endif +# else +# undef CONFIG_NSH_MMCSDSPIPORTNO # define CONFIG_NSH_MMCSDSPIPORTNO 2 -# endif -# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0 -# error "The Sure PIC32MX MMC/SD has only one slot (0)" -# warning CONFIG_NSH_MMCSDSLOTNO +# undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -# ifndef CONFIG_NSH_MMCSDMINOR +# undef CONFIG_NSH_MMCSDMINOR # define CONFIG_NSH_MMCSDMINOR 0 # endif #endif diff --git a/configs/u-blox-c027/src/lpc17_appinit.c b/configs/u-blox-c027/src/lpc17_appinit.c index 44e9565182..ce83755f4d 100644 --- a/configs/u-blox-c027/src/lpc17_appinit.c +++ b/configs/u-blox-c027/src/lpc17_appinit.c @@ -77,14 +77,21 @@ /* Do we have SPI support for MMC/SD? */ #ifdef NSH_HAVEMMCSD -# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 -# error "External MMC/SD on SSP0" -# undef CONFIG_NSH_MMCSDSPIPORTNO +# ifdef CONFIG_NSH_ARCHINIT +# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 +# error "External MMC/SD on SSP0" +# undef CONFIG_NSH_MMCSDSPIPORTNO +# define CONFIG_NSH_MMCSDSPIPORTNO 0 +# endif +# if !defined(CONFIG_NSH_MMCSDSLOTNO) +# error "Use MMC/SD slot 0 by default" +# undef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +# endif +# else +# undef CONFIG_NSH_MMCSDSPIPORTNO # define CONFIG_NSH_MMCSDSPIPORTNO 0 -# endif -# if !defined(CONFIG_NSH_MMCSDSLOTNO) -# error "Use MMC/SD slot 0 by default" -# undef CONFIG_NSH_MMCSDSLOTNO +# undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 # endif #endif diff --git a/configs/zkit-arm-1769/src/lpc17_appinit.c b/configs/zkit-arm-1769/src/lpc17_appinit.c index 585d986b41..e9d9c1baa1 100644 --- a/configs/zkit-arm-1769/src/lpc17_appinit.c +++ b/configs/zkit-arm-1769/src/lpc17_appinit.c @@ -78,13 +78,20 @@ /* Do we have SPI support for MMC/SD? */ #ifdef CONFIG_NSH_HAVEMMCSD -# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 -# error "The ZKit-arm MMC/SD is on SPI port 0" +# ifdef CONFIG_NSH_ARCHINIT +# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 +# error "The ZKit-arm MMC/SD is on SPI port 0" +# undef CONFIG_NSH_MMCSDSPIPORTNO +# define CONFIG_NSH_MMCSDSPIPORTNO 0 +# endif +# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0 +# error "The ZKit-arm MMC/SD has only one slot (0)" +# undef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +# endif +# else # undef CONFIG_NSH_MMCSDSPIPORTNO # define CONFIG_NSH_MMCSDSPIPORTNO 0 -# endif -# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0 -# error "The ZKit-arm MMC/SD has only one slot (0)" # undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 # endif