There are a few things that should still depend on CONFIG_NSH_ARCHINT vs CONFIG_LIB_BOARDCTL

This commit is contained in:
Gregory Nutt
2016-02-04 14:14:43 -06:00
parent 3d5a2d5ca2
commit 7d30697408
18 changed files with 104 additions and 92 deletions
+5 -5
View File
@@ -57,7 +57,7 @@
/* PORT and SLOT number probably depend on the board configuration */ /* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_EAGLE100 #ifdef CONFIG_NSH_ARCHINIT
# undef NSH_HAVEUSBDEV # undef NSH_HAVEUSBDEV
# define NSH_HAVEMMCSD 1 # define NSH_HAVEMMCSD 1
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0
@@ -71,10 +71,10 @@
# define CONFIG_NSH_MMCSDSLOTNO 0 # define CONFIG_NSH_MMCSDSLOTNO 0
# endif # endif
#else #else
/* Add configuration for new LM3s boards here */ # undef CONFIG_NSH_MMCSDSPIPORTNO
# error "Unrecognized lm3s board" # define CONFIG_NSH_MMCSDSPIPORTNO 0
# undef NSH_HAVEUSBDEV # undef CONFIG_NSH_MMCSDSLOTNO
# undef NSH_HAVEMMCSD # define CONFIG_NSH_MMCSDSLOTNO 0
#endif #endif
/* Can't support USB features if USB is not enabled */ /* Can't support USB features if USB is not enabled */
+4 -1
View File
@@ -74,7 +74,7 @@
/* PORT and SLOT number depend on the board configuration */ /* 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 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0
# error "The LM3S6965 Eval Kit MMC/SD is on SSI0" # error "The LM3S6965 Eval Kit MMC/SD is on SSI0"
# undef CONFIG_NSH_MMCSDSPIPORTNO # undef CONFIG_NSH_MMCSDSPIPORTNO
@@ -89,8 +89,11 @@
# define CONFIG_NSH_MMCSDMINOR 0 # define CONFIG_NSH_MMCSDMINOR 0
# endif # endif
#else #else
# undef CONFIG_NSH_MMCSDSPIPORTNO
# define CONFIG_NSH_MMCSDSPIPORTNO 0 # define CONFIG_NSH_MMCSDSPIPORTNO 0
# undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO 0 # define CONFIG_NSH_MMCSDSLOTNO 0
# undef CONFIG_NSH_MMCSDMINOR
# define CONFIG_NSH_MMCSDMINOR 0 # define CONFIG_NSH_MMCSDMINOR 0
#endif #endif
+4 -1
View File
@@ -61,7 +61,7 @@
/* PORT and SLOT number depend on the board configuration */ /* 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 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0
# error "The LM3S8962 Eval Kit MMC/SD is on SSI0" # error "The LM3S8962 Eval Kit MMC/SD is on SSI0"
# undef CONFIG_NSH_MMCSDSPIPORTNO # undef CONFIG_NSH_MMCSDSPIPORTNO
@@ -79,8 +79,11 @@
# endif # endif
#else #else
# undef CONFIG_NSH_MMCSDSPIPORTNO
# define CONFIG_NSH_MMCSDSPIPORTNO 0 # define CONFIG_NSH_MMCSDSPIPORTNO 0
# undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO 0 # define CONFIG_NSH_MMCSDSLOTNO 0
# undef CONFIG_NSH_MMCSDMINOR
# define CONFIG_NSH_MMCSDMINOR 0 # define CONFIG_NSH_MMCSDMINOR 0
#endif #endif
+10 -9
View File
@@ -54,22 +54,17 @@
/* PORT and SLOT number probably depend on the board configuration */ /* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_LPCXPRESSO #define NSH_HAVEUSBDEV 1
# define NSH_HAVEUSBDEV 1 #ifdef CONFIG_LPC17_SSP1
# ifdef CONFIG_LPC17_SSP1 # define NSH_HAVEMMCSD 1
# define NSH_HAVEMMCSD 1
# else
# undef NSH_HAVEMMCSD
# endif
#else #else
# error "Unrecognized board"
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD # undef NSH_HAVEMMCSD
#endif #endif
/* Do we have SPI support for MMC/SD? */ /* Do we have SPI support for MMC/SD? */
#ifdef NSH_HAVEMMCSD #ifdef NSH_HAVEMMCSD
#ifdef CONFIG_NSH_ARCHINIT
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1
# error "The LPCXpresso MMC/SD is on SSP1" # error "The LPCXpresso MMC/SD is on SSP1"
# undef CONFIG_NSH_MMCSDSPIPORTNO # undef CONFIG_NSH_MMCSDSPIPORTNO
@@ -80,6 +75,12 @@
# undef CONFIG_NSH_MMCSDSLOTNO # undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO 0 # define CONFIG_NSH_MMCSDSLOTNO 0
# endif # endif
#else
# undef CONFIG_NSH_MMCSDSPIPORTNO
# define CONFIG_NSH_MMCSDSPIPORTNO 1
# undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO 0
#endif
#endif #endif
/* Can't support USB device features if USB device is not enabled */ /* Can't support USB device features if USB device is not enabled */
+10 -17
View File
@@ -59,22 +59,17 @@
/* PORT and SLOT number probably depend on the board configuration */ /* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_LPCXPRESSO #define NSH_HAVEUSBDEV 1
# define NSH_HAVEUSBDEV 1 #ifdef CONFIG_LPC17_SSP1
# ifdef CONFIG_LPC17_SSP1 # define NSH_HAVEMMCSD 1
# define NSH_HAVEMMCSD 1
# else
# undef NSH_HAVEMMCSD
# endif
#else #else
# error "Unrecognized board"
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD # undef NSH_HAVEMMCSD
#endif #endif
/* Do we have SPI support for MMC/SD? */ /* Do we have SPI support for MMC/SD? */
#ifdef NSH_HAVEMMCSD #ifdef NSH_HAVEMMCSD
#ifdef CONFIG_NSH_ARCHINIT
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1
# error "The LPCXpresso MMC/SD is on SSP1" # error "The LPCXpresso MMC/SD is on SSP1"
# undef CONFIG_NSH_MMCSDSPIPORTNO # undef CONFIG_NSH_MMCSDSPIPORTNO
@@ -85,6 +80,12 @@
# undef CONFIG_NSH_MMCSDSLOTNO # undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO 0 # define CONFIG_NSH_MMCSDSLOTNO 0
# endif # endif
#else
# undef CONFIG_NSH_MMCSDSPIPORTNO
# define CONFIG_NSH_MMCSDSPIPORTNO 1
# undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO 0
#endif
#endif #endif
/* Can't support USB device features if USB device is not enabled */ /* Can't support USB device features if USB device is not enabled */
@@ -109,14 +110,6 @@
# undef NSH_HAVEMMCSD # undef NSH_HAVEMMCSD
#endif /* CONFIG_LIB_BOARDCTL */ #endif /* CONFIG_LIB_BOARDCTL */
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
+4 -1
View File
@@ -60,7 +60,7 @@
/* PORT and SLOT number depend on the board configuration */ /* 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 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1
# error "The LPC214x MMC/SD is on SPI1" # error "The LPC214x MMC/SD is on SPI1"
# undef CONFIG_NSH_MMCSDSPIPORTNO # undef CONFIG_NSH_MMCSDSPIPORTNO
@@ -78,8 +78,11 @@
# endif # endif
#else #else
# undef CONFIG_NSH_MMCSDSPIPORTNO
# define CONFIG_NSH_MMCSDSPIPORTNO 1 # define CONFIG_NSH_MMCSDSPIPORTNO 1
# undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO 0 # define CONFIG_NSH_MMCSDSLOTNO 0
# undef CONFIG_NSH_MMCSDMINOR
# define CONFIG_NSH_MMCSDMINOR 0 # define CONFIG_NSH_MMCSDMINOR 0
#endif #endif
+4 -1
View File
@@ -60,7 +60,7 @@
/* PORT and SLOT number probably depend on the board configuration */ /* 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 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0
# error "The Nucleus-2G MMC/SD is on SSP0" # error "The Nucleus-2G MMC/SD is on SSP0"
# undef CONFIG_NSH_MMCSDSPIPORTNO # undef CONFIG_NSH_MMCSDSPIPORTNO
@@ -78,8 +78,11 @@
# endif # endif
#else #else
# undef CONFIG_NSH_MMCSDSPIPORTNO
# define CONFIG_NSH_MMCSDSPIPORTNO 0 # define CONFIG_NSH_MMCSDSPIPORTNO 0
# undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO 0 # define CONFIG_NSH_MMCSDSLOTNO 0
# undef CONFIG_NSH_MMCSDMINOR
# define CONFIG_NSH_MMCSDMINOR 0 # define CONFIG_NSH_MMCSDMINOR 0
#endif #endif
@@ -66,7 +66,7 @@
/* MMC/SD is on SSP port 1. There is only a single slot, slot 0 */ /* 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 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1
# undef CONFIG_NSH_MMCSDSPIPORTNO # undef CONFIG_NSH_MMCSDSPIPORTNO
# define CONFIG_NSH_MMCSDSPIPORTNO 1 # define CONFIG_NSH_MMCSDSPIPORTNO 1
@@ -82,8 +82,11 @@
# endif # endif
#else #else
# undef CONFIG_NSH_MMCSDSPIPORTNO
# define CONFIG_NSH_MMCSDSPIPORTNO 1 # define CONFIG_NSH_MMCSDSPIPORTNO 1
# undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO 0 # define CONFIG_NSH_MMCSDSLOTNO 0
# undef CONFIG_NSH_MMCSDMINOR
# define CONFIG_NSH_MMCSDMINOR 0 # define CONFIG_NSH_MMCSDMINOR 0
#endif #endif
+8 -8
View File
@@ -57,10 +57,10 @@
/* PORT and SLOT number probably depend on the board configuration */ /* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_OLIMEX_STRP711 #define NSH_HAVEUSBDEV 1
# define NSH_HAVEUSBDEV 1 #ifdef CONFIG_STR71X_BSPI1
# ifdef CONFIG_STR71X_BSPI1 # define NSH_HAVEMMCSD 1
# define NSH_HAVEMMCSD 1 # ifdef CONFIG_NSH_ARCHINIT
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1
# error "The Olimex STR-P711 MMC/SD is on BSPI1" # error "The Olimex STR-P711 MMC/SD is on BSPI1"
# undef CONFIG_NSH_MMCSDSPIPORTNO # undef CONFIG_NSH_MMCSDSPIPORTNO
@@ -72,12 +72,12 @@
# define CONFIG_NSH_MMCSDSLOTNO 0 # define CONFIG_NSH_MMCSDSLOTNO 0
# endif # endif
# else # else
# undef NSH_HAVEMMCSD # undef CONFIG_NSH_MMCSDSPIPORTNO
# define CONFIG_NSH_MMCSDSPIPORTNO 0
# undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO 0
# endif # endif
#else #else
/* Add configuration for new STR71x boards here */
# error "Unrecognized STR71x board"
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD # undef NSH_HAVEMMCSD
#endif #endif
@@ -87,7 +87,9 @@
/* Make sure that the NSH configuration uses the slot */ /* 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)" # warning "The PIC32 Starter Kit has only one slot (0)"
# undef CONFIG_NSH_MMCSDSLOTNO # undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO 0 # define CONFIG_NSH_MMCSDSLOTNO 0
+3 -1
View File
@@ -86,7 +86,9 @@
* SD slot on the Mikroelektronica PIC32MX7 MMB). * 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)" # warning "The Mikroelektronika PIC32MX7 MMB has only one slot (0)"
# undef CONFIG_NSH_MMCSDSLOTNO # undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO 0 # define CONFIG_NSH_MMCSDSLOTNO 0
@@ -76,14 +76,10 @@
# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAMDL_MMCSDSLOTNO # if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAMDL_MMCSDSLOTNO
# error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO) # error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO)
# undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO SAMDL_MMCSDSLOTNO
# endif # endif
# if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SPI_PORTNO # if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SPI_PORTNO
# error CONFIG_NSH_MMCSDSPIPORTNO must have the same value as 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 # endif
/* Default MMC/SD minor number */ /* Default MMC/SD minor number */
@@ -76,14 +76,10 @@
# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAMDL_MMCSDSLOTNO # if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAMDL_MMCSDSLOTNO
# error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO) # error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO)
# undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO SAMDL_MMCSDSLOTNO
# endif # endif
# if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SPI_PORTNO # if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SPI_PORTNO
# error CONFIG_NSH_MMCSDSPIPORTNO must have the same value as 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 # endif
/* Default MMC/SD minor number */ /* Default MMC/SD minor number */
@@ -76,14 +76,10 @@
# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAMDL_MMCSDSLOTNO # if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAMDL_MMCSDSLOTNO
# error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO) # error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO)
# undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO SAMDL_MMCSDSLOTNO
# endif # endif
# if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SPI_PORTNO # if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SPI_PORTNO
# error CONFIG_NSH_MMCSDSPIPORTNO must have the same value as 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 # endif
/* Default MMC/SD minor number */ /* Default MMC/SD minor number */
+1 -13
View File
@@ -88,24 +88,12 @@
# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != STM32_MMCSDSLOTNO # if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != STM32_MMCSDSLOTNO
# error "Only one MMC/SD slot: Slot 0" # 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 # endif
/* Verify configured SPI port number */ /* Verify configured SPI port number */
# if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != STM32_MMCSDSPIPORTNO # if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != STM32_MMCSDSPIPORTNO
# error "Only one MMC/SD port: SPI1" # 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
#endif #endif
@@ -183,7 +171,7 @@ int board_app_initialize(void)
if (ret < 0) if (ret < 0)
{ {
syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot %d: %d\n", syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot %d: %d\n",
CONFIG_NSH_MMCSDSLOTNO, ret); STM32_MMCSDSLOTNO, ret);
return ret; return ret;
} }
#endif #endif
+18 -9
View File
@@ -85,17 +85,26 @@
/* MMC/SD configuration */ /* MMC/SD configuration */
#ifdef NSH_HAVE_MMCSD #ifdef NSH_HAVE_MMCSD
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 2 # ifdef CONFIG_NSH_ARCHINIT
# warning "The Sure PIC32MX MMC/SD is on SPI2" # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 2
# undef CONFIG_NSH_MMCSDSPIPORTNO # 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 # define CONFIG_NSH_MMCSDSPIPORTNO 2
# endif # undef CONFIG_NSH_MMCSDSLOTNO
# 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 # define CONFIG_NSH_MMCSDSLOTNO 0
# endif # undef CONFIG_NSH_MMCSDMINOR
# ifndef CONFIG_NSH_MMCSDMINOR
# define CONFIG_NSH_MMCSDMINOR 0 # define CONFIG_NSH_MMCSDMINOR 0
# endif # endif
#endif #endif
+14 -7
View File
@@ -77,14 +77,21 @@
/* Do we have SPI support for MMC/SD? */ /* Do we have SPI support for MMC/SD? */
#ifdef NSH_HAVEMMCSD #ifdef NSH_HAVEMMCSD
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 # ifdef CONFIG_NSH_ARCHINIT
# error "External MMC/SD on SSP0" # if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0
# undef CONFIG_NSH_MMCSDSPIPORTNO # 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 # define CONFIG_NSH_MMCSDSPIPORTNO 0
# endif # undef CONFIG_NSH_MMCSDSLOTNO
# if !defined(CONFIG_NSH_MMCSDSLOTNO)
# error "Use MMC/SD slot 0 by default"
# undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO 0 # define CONFIG_NSH_MMCSDSLOTNO 0
# endif # endif
#endif #endif
+12 -5
View File
@@ -78,13 +78,20 @@
/* Do we have SPI support for MMC/SD? */ /* Do we have SPI support for MMC/SD? */
#ifdef CONFIG_NSH_HAVEMMCSD #ifdef CONFIG_NSH_HAVEMMCSD
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 # ifdef CONFIG_NSH_ARCHINIT
# error "The ZKit-arm MMC/SD is on SPI port 0" # 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 # undef CONFIG_NSH_MMCSDSPIPORTNO
# define CONFIG_NSH_MMCSDSPIPORTNO 0 # 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 # undef CONFIG_NSH_MMCSDSLOTNO
# define CONFIG_NSH_MMCSDSLOTNO 0 # define CONFIG_NSH_MMCSDSLOTNO 0
# endif # endif