Shenzhou board is first to use ONLY Kconfig for configuration

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5114 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2012-09-08 13:56:21 +00:00
parent 755d0c1095
commit a6112b0350
26 changed files with 1077 additions and 176 deletions
+21
View File
@@ -677,6 +677,27 @@ config ARCH_IRQBUTTONS
---help---
"Support interrupts on button presses and releases."
config NSH_MMCSDMINOR
int "MMC/SD minor number"
default 0
depends on NSH_LIBRARY && MMCSD
---help---
If board-specific NSH start-up logic needs to mount an MMC/SD device, then the setting should be provided to identify the MMC/SD minor device number (i.e., the N in /dev/mmcsdN). Default 0
config NSH_MMCSDSLOTNO
int "MMC/SD slot number"
default 0
depends on NSH_LIBRARY && MMCSD
---help---
If board-specific NSH start-up supports more than one MMC/SD slot, then this setting should be provided to indicate which slot should be used. Default: 0.
config NSH_MMCSDSPIPORTNO
int "MMC/SD SPI device number"
default 0
depends on NSH_LIBRARY && MMCSD && SPI
---help---
If board-specif NSH start-up logic will mount an SPI-based MMC/SD volume, then this setting may be needed to tell the board logic which SPI bus to use. Default: 0 (meaning is board-specific).
comment "Board-Specific Options"
if ARCH_BOARD_AMBER
-1
View File
@@ -721,7 +721,6 @@ defconfig -- This is a configuration file similar to the Linux
Filesystem configuration
CONFIG_FS_FAT - Enable FAT filesystem support
CONFIG_FAT_SECTORSIZE - Max supported sector size
CONFIG_FAT_LCNAMES - Enable use of the NT-style upper/lower case 8.3
file name support.
CONFIG_FAT_LFN - Enable FAT long file names. NOTE: Microsoft claims
+7 -7
View File
@@ -61,8 +61,8 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_EA3131
# define CONFIG_NSH_HAVEUSBDEV 1
# define CONFIG_NSH_HAVEMMCSD 1
# define NSH_HAVEUSBDEV 1
# define NSH_HAVEMMCSD 1
# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0
# error "Only one MMC/SD slot"
# undef CONFIG_NSH_MMCSDSLOTNO
@@ -74,14 +74,14 @@
/* Add configuration for new LPC31XX boards here */
# error "Unrecognized LPC31XX board"
# undef CONFIG_NSH_HAVEUSBDEV
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD
#endif
/* Can't support USB features if USB is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled or if SDIO support
@@ -89,7 +89,7 @@
*/
#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_LPC31_MCI)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
@@ -126,7 +126,7 @@
int nsh_archinitialize(void)
{
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
FAR struct sdio_dev_s *sdio;
int ret;
+7 -7
View File
@@ -61,8 +61,8 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_EA3152
# define CONFIG_NSH_HAVEUSBDEV 1
# define CONFIG_NSH_HAVEMMCSD 1
# define NSH_HAVEUSBDEV 1
# define NSH_HAVEMMCSD 1
# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0
# error "Only one MMC/SD slot"
# undef CONFIG_NSH_MMCSDSLOTNO
@@ -74,14 +74,14 @@
/* Add configuration for new LPC31XX boards here */
# error "Unrecognized LPC31XX board"
# undef CONFIG_NSH_HAVEUSBDEV
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD
#endif
/* Can't support USB features if USB is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled or if SDIO support
@@ -89,7 +89,7 @@
*/
#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_LPC31_MCI)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
@@ -126,7 +126,7 @@
int nsh_archinitialize(void)
{
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
FAR struct sdio_dev_s *sdio;
int ret;
+6 -6
View File
@@ -56,8 +56,8 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_EAGLE100
# undef CONFIG_NSH_HAVEUSBDEV
# define CONFIG_NSH_HAVEMMCSD 1
# undef NSH_HAVEUSBDEV
# define NSH_HAVEMMCSD 1
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0
# error "The Eagle100 MMC/SD is on SSI0"
# undef CONFIG_NSH_MMCSDSPIPORTNO
@@ -71,20 +71,20 @@
#else
/* Add configuration for new LM3s boards here */
# error "Unrecognized lm3s board"
# undef CONFIG_NSH_HAVEUSBDEV
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD
#endif
/* Can't support USB features if USB is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled */
#if defined(CONFIG_DISABLE_MOUNTPOINT)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
+8 -8
View File
@@ -72,8 +72,8 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_HYMINI_STM32V
# define CONFIG_NSH_HAVEUSBDEV 1
# define CONFIG_NSH_HAVEMMCSD 1
# define NSH_HAVEUSBDEV 1
# define NSH_HAVEMMCSD 1
# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0
# error "Only one MMC/SD slot"
# undef CONFIG_NSH_MMCSDSLOTNO
@@ -84,14 +84,14 @@
#else
/* Add configuration for new STM32 boards here */
# error "Unrecognized STM32 board"
# undef CONFIG_NSH_HAVEUSBDEV
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD
#endif
/* Can't support USB features if USB is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled or if SDIO support
@@ -99,7 +99,7 @@
*/
#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_STM32_SDIO)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
@@ -136,7 +136,7 @@
int nsh_archinitialize(void)
{
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
FAR struct sdio_dev_s *sdio;
int ret;
@@ -146,7 +146,7 @@ int nsh_archinitialize(void)
/* Mount the SDIO-based MMC/SD block driver */
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
/* First, get an instance of the SDIO interface */
message("nsh_archinitialize: Initializing SDIO slot %d\n",
+11 -11
View File
@@ -61,8 +61,8 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_KWIKSTIK_K40
# define CONFIG_NSH_HAVEUSBDEV 1
# define CONFIG_NSH_HAVEMMCSD 1
# define NSH_HAVEUSBDEV 1
# define NSH_HAVEMMCSD 1
# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0
# error "Only one MMC/SD slot, slot 0"
# undef CONFIG_NSH_MMCSDSLOTNO
@@ -73,14 +73,14 @@
#else
/* Add configuration for new Kinetis boards here */
# error "Unrecognized Kinetis board"
# undef CONFIG_NSH_HAVEUSBDEV
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD
#endif
/* Can't support USB features if USB is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled or if SDHC support
@@ -88,7 +88,7 @@
*/
#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_KINETIS_SDHC)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
@@ -129,7 +129,7 @@
* reduces the probability of name collistions.
*/
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
struct kinetis_nsh_s
{
FAR struct sdio_dev_s *sdhc; /* SDIO driver handle */
@@ -141,7 +141,7 @@ struct kinetis_nsh_s
* Private Data
****************************************************************************/
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
static struct kinetis_nsh_s g_nsh;
#endif
@@ -153,7 +153,7 @@ static struct kinetis_nsh_s g_nsh;
* Name: kinetis_mediachange
****************************************************************************/
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
static void kinetis_mediachange(void)
{
bool inserted;
@@ -180,7 +180,7 @@ static void kinetis_mediachange(void)
* Name: kinetis_cdinterrupt
****************************************************************************/
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
static int kinetis_cdinterrupt(int irq, FAR void *context)
{
/* All of the work is done by kinetis_mediachange() */
@@ -204,7 +204,7 @@ static int kinetis_cdinterrupt(int irq, FAR void *context)
int nsh_archinitialize(void)
{
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
int ret;
/* Configure GPIO pins.
+6 -6
View File
@@ -56,8 +56,8 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_LM3S6965EK
# undef CONFIG_NSH_HAVEUSBDEV
# define CONFIG_NSH_HAVEMMCSD 1
# undef NSH_HAVEUSBDEV
# define NSH_HAVEMMCSD 1
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0
# error "The LM3S6965 Eval Kit MMC/SD is on SSI0"
# undef CONFIG_NSH_MMCSDSPIPORTNO
@@ -71,20 +71,20 @@
#else
/* Add configuration for new LM3s boards here */
# error "Unrecognized lm3s board"
# undef CONFIG_NSH_HAVEUSBDEV
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD
#endif
/* Can't support USB features if USB is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled */
#if defined(CONFIG_DISABLE_MOUNTPOINT)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
+6 -6
View File
@@ -56,8 +56,8 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_LM3S8962EK
# undef CONFIG_NSH_HAVEUSBDEV
# define CONFIG_NSH_HAVEMMCSD 1
# undef NSH_HAVEUSBDEV
# define NSH_HAVEMMCSD 1
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0
# error "The LM3S8962 Eval Kit MMC/SD is on SSI0"
# undef CONFIG_NSH_MMCSDSPIPORTNO
@@ -71,20 +71,20 @@
#else
/* Add configuration for new LM3s boards here */
# error "Unrecognized lm3s board"
# undef CONFIG_NSH_HAVEUSBDEV
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD
#endif
/* Can't support USB features if USB is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled */
#if defined(CONFIG_DISABLE_MOUNTPOINT)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
+9 -9
View File
@@ -56,21 +56,21 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_LPCXPRESSO
# define CONFIG_NSH_HAVEUSBDEV 1
# define NSH_HAVEUSBDEV 1
# ifdef CONFIG_LPC17_SSP1
# define CONFIG_NSH_HAVEMMCSD 1
# define NSH_HAVEMMCSD 1
# else
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
# endif
#else
# error "Unrecognized board"
# undef CONFIG_NSH_HAVEUSBDEV
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD
#endif
/* Do we have SPI support for MMC/SD? */
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1
# error "The LPCXpresso MMC/SD is on SSP1"
# undef CONFIG_NSH_MMCSDSPIPORTNO
@@ -86,13 +86,13 @@
/* Can't support USB device features if USB device is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled */
#if defined(CONFIG_DISABLE_MOUNTPOINT)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
@@ -137,7 +137,7 @@
int nsh_archinitialize(void)
{
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
FAR struct spi_dev_s *ssp;
int ret;
+3 -3
View File
@@ -56,16 +56,16 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_MBED
# define CONFIG_NSH_HAVEUSBDEV 1
# define NSH_HAVEUSBDEV 1
#else
# error "Unrecognized board"
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Can't support USB features if USB is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Debug ********************************************************************/
+6 -6
View File
@@ -56,8 +56,8 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_MCU123
# define CONFIG_NSH_HAVEUSBDEV 1
# define CONFIG_NSH_HAVEMMCSD 1
# define NSH_HAVEUSBDEV 1
# define NSH_HAVEMMCSD 1
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1
# error "The LPC214x MMC/SD is on SPI1"
# undef CONFIG_NSH_MMCSDSPIPORTNO
@@ -71,20 +71,20 @@
#else
/* Add configuration for new LPC214x boards here */
# error "Unrecognized LPC214x board"
# undef CONFIG_NSH_HAVEUSBDEV
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD
#endif
/* Can't support USB features if USB is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled */
#if defined(CONFIG_DISABLE_MOUNTPOINT)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
+3 -3
View File
@@ -75,8 +75,8 @@
/* Use minor device number 0 is not is provided */
#ifndef CONFIG_NSH_SST25MINOR
# define CONFIG_NSH_SST25MINOR 0
#ifndef CONFIG_NSH_MMCSDMINOR
# define CONFIG_NSH_MMCSDMINOR 0
#endif
/* Can't support both FAT and NXFFS */
@@ -125,7 +125,7 @@ int nsh_archinitialize(void)
#ifndef CONFIG_FS_NXFFS
/* And finally, use the FTL layer to wrap the MTD driver as a block driver */
ret = ftl_initialize(CONFIG_NSH_SST25MINOR, mtd);
ret = ftl_initialize(CONFIG_NSH_MMCSDMINOR, mtd);
if (ret < 0)
{
fdbg("ERROR: Initialize the FTL layer\n");
+6 -6
View File
@@ -56,8 +56,8 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_NUCLEUS2G
# define CONFIG_NSH_HAVEUSBDEV 1
# define CONFIG_NSH_HAVEMMCSD 1
# define NSH_HAVEUSBDEV 1
# define NSH_HAVEMMCSD 1
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0
# error "The Nucleus-2G MMC/SD is on SSP0"
# undef CONFIG_NSH_MMCSDSPIPORTNO
@@ -73,20 +73,20 @@
# endif
#else
# error "Unrecognized board"
# undef CONFIG_NSH_HAVEUSBDEV
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD
#endif
/* Can't support USB device features if USB device is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled */
#if defined(CONFIG_DISABLE_MOUNTPOINT)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
+12 -12
View File
@@ -61,8 +61,8 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_LPC1766STK
# define CONFIG_NSH_HAVEMMCSD 1
# define CONFIG_NSH_HAVEUSBHOST 1
# define NSH_HAVEMMCSD 1
# define NSH_HAVEUSBHOST 1
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1
# error "The LPC1766-STK MMC/SD is on SSP1"
# undef CONFIG_NSH_MMCSDSPIPORTNO
@@ -75,18 +75,18 @@
# endif
# ifndef CONFIG_LPC17_SSP1
# warning "CONFIG_LPC17_SSP1 is not enabled"
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
# endif
#else
# error "Unrecognized board"
# undef CONFIG_NSH_HAVEMMCSD
# undef CONFIG_NSH_HAVEUSBHOST
# undef NSH_HAVEMMCSD
# undef NSH_HAVEUSBHOST
#endif
/* Can't support MMC/SD features if mountpoints are disabled */
#if defined(CONFIG_DISABLE_MOUNTPOINT)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
@@ -108,10 +108,10 @@
#endif
#if !defined(CONFIG_USBHOST) || !defined(CONFIG_LPC17_USBHOST)
# undef CONFIG_NSH_HAVEUSBHOST
# undef NSH_HAVEUSBHOST
#endif
#ifdef CONFIG_NSH_HAVEUSBHOST
#ifdef NSH_HAVEUSBHOST
# ifndef CONFIG_USBHOST_DEFPRIO
# define CONFIG_USBHOST_DEFPRIO 50
# endif
@@ -140,7 +140,7 @@
* Private Data
****************************************************************************/
#ifdef CONFIG_NSH_HAVEUSBHOST
#ifdef NSH_HAVEUSBHOST
static struct usbhost_driver_s *g_drvr;
#endif
@@ -156,7 +156,7 @@ static struct usbhost_driver_s *g_drvr;
*
****************************************************************************/
#ifdef CONFIG_NSH_HAVEUSBHOST
#ifdef NSH_HAVEUSBHOST
static int nsh_waiter(int argc, char *argv[])
{
bool connected = false;
@@ -197,7 +197,7 @@ static int nsh_waiter(int argc, char *argv[])
*
****************************************************************************/
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
static int nsh_sdinitialize(void)
{
FAR struct spi_dev_s *ssp;
@@ -257,7 +257,7 @@ errout:
*
****************************************************************************/
#ifdef CONFIG_NSH_HAVEUSBHOST
#ifdef NSH_HAVEUSBHOST
static int nsh_usbhostinitialize(void)
{
int pid;
+4 -4
View File
@@ -61,19 +61,19 @@
/* PORT and SLOT number probably depend on the board configuration */
#undef CONFIG_NSH_HAVEUSBDEV
#undef CONFIG_NSH_HAVEMMCSD
#undef NSH_HAVEUSBDEV
#undef NSH_HAVEMMCSD
/* Can't support USB features if USB is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled */
#if defined(CONFIG_DISABLE_MOUNTPOINT)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
-1
View File
@@ -107,7 +107,6 @@ CONFIG_STM32_PWR=y
# APB1 (low speed)
CONFIG_STM32_RTC=n
CONFIG_STM32_BKP=n
CONFIG_STM32_TIM2=n
CONFIG_STM32_TIM3=n
+8 -8
View File
@@ -56,9 +56,9 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_OLIMEX_STRP711
# define CONFIG_NSH_HAVEUSBDEV 1
# define NSH_HAVEUSBDEV 1
# ifdef CONFIG_STR71X_BSPI1
# define CONFIG_NSH_HAVEMMCSD 1
# define NSH_HAVEMMCSD 1
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1
# error "The Olimex STR-P711 MMC/SD is on BSPI1"
# undef CONFIG_NSH_MMCSDSPIPORTNO
@@ -70,25 +70,25 @@
# define CONFIG_NSH_MMCSDSLOTNO 0
# endif
# else
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
# endif
#else
/* Add configuration for new STR71x boards here */
# error "Unrecognized STR71x board"
# undef CONFIG_NSH_HAVEUSBDEV
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD
#endif
/* Can't support USB features if USB is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled */
#if defined(CONFIG_DISABLE_MOUNTPOINT)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
@@ -128,7 +128,7 @@ int nsh_archinitialize(void)
FAR struct spi_dev_s *spi;
int ret;
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
/* Get the SPI port */
+17 -17
View File
@@ -58,8 +58,8 @@
/* Configuration ************************************************************/
/* Assume that we have MMC/SD, USB host (and USB device) */
#define CONFIG_NSH_HAVEMMCSD 1
#define CONFIG_NSH_HAVEUSBHOST 1
#define NSH_HAVEMMCSD 1
#define NSH_HAVEUSBHOST 1
/* The PIC32 Ethernet Starter Kit does not have an SD slot on board. If one
* is added, then it must be specified by defining which SPI bus that it
@@ -67,12 +67,12 @@
*/
#ifndef CONFIG_PIC32MX_MMCSDSPIPORTNO
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
/* Make sure that the configuration will support the SD card */
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
/* Make sure that the NSH configuration uses the correct SPI */
@@ -96,23 +96,23 @@
# if CONFIG_PIC32MX_MMCSDSPIPORTNO == 1 && !defined(CONFIG_PIC32MX_SPI1)
# warning "CONFIG_PIC32MX_SPI1 is not enabled"
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
# elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 2 && !defined(CONFIG_PIC32MX_SPI2)
# warning "CONFIG_PIC32MX_SPI2 is not enabled"
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
# elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 3 && !defined(CONFIG_PIC32MX_SPI3)
# warning "CONFIG_PIC32MX_SPI3 is not enabled"
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
# elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 4 && !defined(CONFIG_PIC32MX_SPI4)
# warning "CONFIG_PIC32MX_SPI4 is not enabled"
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
# endif
#endif
/* Can't support MMC/SD features if mountpoints are disabled */
#if defined(CONFIG_DISABLE_MOUNTPOINT)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
/* Select /dev/mmcsd0 if no other minor number is provided */
@@ -126,22 +126,22 @@
#ifdef CONFIG_USBHOST
# ifndef CONFIG_PIC32MX_USBHOST
# error "CONFIG_PIC32MX_USBHOST is not selected"
# undef CONFIG_NSH_HAVEUSBHOST
# undef NSH_HAVEUSBHOST
# endif
#endif
#ifdef CONFIG_PIC32MX_USBHOST
# ifndef CONFIG_USBHOST
# warning "CONFIG_USBHOST is not selected"
# undef CONFIG_NSH_HAVEUSBHOST
# undef NSH_HAVEUSBHOST
# endif
#endif
#if !defined(CONFIG_USBHOST) || !defined(CONFIG_PIC32MX_USBHOST)
# undef CONFIG_NSH_HAVEUSBHOST
# undef NSH_HAVEUSBHOST
#endif
#ifdef CONFIG_NSH_HAVEUSBHOST
#ifdef NSH_HAVEUSBHOST
# ifndef CONFIG_USBHOST_DEFPRIO
# define CONFIG_USBHOST_DEFPRIO 50
# endif
@@ -170,7 +170,7 @@
* Private Data
****************************************************************************/
#ifdef CONFIG_NSH_HAVEUSBHOST
#ifdef NSH_HAVEUSBHOST
static struct usbhost_driver_s *g_drvr;
#endif
@@ -186,7 +186,7 @@ static struct usbhost_driver_s *g_drvr;
*
****************************************************************************/
#ifdef CONFIG_NSH_HAVEUSBHOST
#ifdef NSH_HAVEUSBHOST
static int nsh_waiter(int argc, char *argv[])
{
bool connected = false;
@@ -227,7 +227,7 @@ static int nsh_waiter(int argc, char *argv[])
*
****************************************************************************/
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
static int nsh_sdinitialize(void)
{
FAR struct spi_dev_s *ssp;
@@ -280,7 +280,7 @@ errout:
*
****************************************************************************/
#ifdef CONFIG_NSH_HAVEUSBHOST
#ifdef NSH_HAVEUSBHOST
static int nsh_usbhostinitialize(void)
{
int pid;
+16 -16
View File
@@ -58,8 +58,8 @@
/* Configuration ************************************************************/
/* Assume that we have MMC/SD, USB host (and USB device) */
#define CONFIG_NSH_HAVEMMCSD 1
#define CONFIG_NSH_HAVEUSBHOST 1
#define NSH_HAVEMMCSD 1
#define NSH_HAVEUSBHOST 1
/* The Mikroelektronika PIC32MX7 MMB has one SD slot on board, connected to SPI 1. */
@@ -69,7 +69,7 @@
/* Make sure that the configuration will support the SD card */
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
/* Make sure that the NSH configuration uses the correct SPI */
@@ -95,23 +95,23 @@
# if CONFIG_PIC32MX_MMCSDSPIPORTNO == 1 && !defined(CONFIG_PIC32MX_SPI1)
# warning "CONFIG_PIC32MX_SPI1 is not enabled"
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
# elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 2 && !defined(CONFIG_PIC32MX_SPI2)
# warning "CONFIG_PIC32MX_SPI2 is not enabled"
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
# elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 3 && !defined(CONFIG_PIC32MX_SPI3)
# warning "CONFIG_PIC32MX_SPI3 is not enabled"
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
# elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 4 && !defined(CONFIG_PIC32MX_SPI4)
# warning "CONFIG_PIC32MX_SPI4 is not enabled"
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
# endif
#endif
/* Can't support MMC/SD features if mountpoints are disabled */
#if defined(CONFIG_DISABLE_MOUNTPOINT)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
/* Select /dev/mmcsd0 if no other minor number is provided */
@@ -125,22 +125,22 @@
#ifdef CONFIG_USBHOST
# ifndef CONFIG_PIC32MX_USBHOST
# error "CONFIG_PIC32MX_USBHOST is not selected"
# undef CONFIG_NSH_HAVEUSBHOST
# undef NSH_HAVEUSBHOST
# endif
#endif
#ifdef CONFIG_PIC32MX_USBHOST
# ifndef CONFIG_USBHOST
# warning "CONFIG_USBHOST is not selected"
# undef CONFIG_NSH_HAVEUSBHOST
# undef NSH_HAVEUSBHOST
# endif
#endif
#if !defined(CONFIG_USBHOST) || !defined(CONFIG_PIC32MX_USBHOST)
# undef CONFIG_NSH_HAVEUSBHOST
# undef NSH_HAVEUSBHOST
#endif
#ifdef CONFIG_NSH_HAVEUSBHOST
#ifdef NSH_HAVEUSBHOST
# ifndef CONFIG_USBHOST_DEFPRIO
# define CONFIG_USBHOST_DEFPRIO 50
# endif
@@ -169,7 +169,7 @@
* Private Data
****************************************************************************/
#ifdef CONFIG_NSH_HAVEUSBHOST
#ifdef NSH_HAVEUSBHOST
static struct usbhost_driver_s *g_drvr;
#endif
@@ -185,7 +185,7 @@ static struct usbhost_driver_s *g_drvr;
*
****************************************************************************/
#ifdef CONFIG_NSH_HAVEUSBHOST
#ifdef NSH_HAVEUSBHOST
static int nsh_waiter(int argc, char *argv[])
{
bool connected = false;
@@ -226,7 +226,7 @@ static int nsh_waiter(int argc, char *argv[])
*
****************************************************************************/
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
static int nsh_sdinitialize(void)
{
FAR struct spi_dev_s *spi;
@@ -288,7 +288,7 @@ errout:
*
****************************************************************************/
#ifdef CONFIG_NSH_HAVEUSBHOST
#ifdef NSH_HAVEUSBHOST
static int nsh_usbhostinitialize(void)
{
int pid;
+7 -7
View File
@@ -62,8 +62,8 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_SAM3UEK
# define CONFIG_NSH_HAVEUSBDEV 1
# define CONFIG_NSH_HAVEMMCSD 1
# define NSH_HAVEUSBDEV 1
# define NSH_HAVEMMCSD 1
# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0
# error "Only one MMC/SD slot"
# undef CONFIG_NSH_MMCSDSLOTNO
@@ -74,14 +74,14 @@
#else
/* Add configuration for new SAM3U boards here */
# error "Unrecognized SAM3U board"
# undef CONFIG_NSH_HAVEUSBDEV
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD
#endif
/* Can't support USB features if USB is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled or if SDIO support
@@ -89,7 +89,7 @@
*/
#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_SAM3U_HSMCI)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
@@ -126,7 +126,7 @@
int nsh_archinitialize(void)
{
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
FAR struct sdio_dev_s *sdio;
int ret;
-1
View File
@@ -480,7 +480,6 @@ Shenzhou-specific Configuration Options
APB1 (low speed)
----------------
CONFIG_STM32_RTC
CONFIG_STM32_BKP
CONFIG_STM32_TIM2
CONFIG_STM32_TIM3
File diff suppressed because it is too large Load Diff
+8 -8
View File
@@ -70,8 +70,8 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_STM3210E_EVAL
# define CONFIG_NSH_HAVEUSBDEV 1
# define CONFIG_NSH_HAVEMMCSD 1
# define NSH_HAVEUSBDEV 1
# define NSH_HAVEMMCSD 1
# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0
# error "Only one MMC/SD slot"
# undef CONFIG_NSH_MMCSDSLOTNO
@@ -82,14 +82,14 @@
#else
/* Add configuration for new STM32 boards here */
# error "Unrecognized STM32 board"
# undef CONFIG_NSH_HAVEUSBDEV
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD
#endif
/* Can't support USB features if USB is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled or if SDIO support
@@ -97,7 +97,7 @@
*/
#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_STM32_SDIO)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
@@ -138,7 +138,7 @@ int nsh_archinitialize(void)
FAR struct spi_dev_s *spi;
FAR struct mtd_dev_s *mtd;
#endif
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
FAR struct sdio_dev_s *sdio;
int ret;
#endif
@@ -177,7 +177,7 @@ int nsh_archinitialize(void)
/* Mount the SDIO-based MMC/SD block driver */
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
/* First, get an instance of the SDIO interface */
message("nsh_archinitialize: Initializing SDIO slot %d\n",
+12 -12
View File
@@ -61,8 +61,8 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_SUREPIC32MX
# define CONFIG_NSH_HAVEMMCSD 1
# define CONFIG_NSH_HAVEUSBHOST 1
# define NSH_HAVEMMCSD 1
# define NSH_HAVEUSBHOST 1
# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 2
# error "The Sure PIC32MX MMC/SD is on SPI2"
# undef CONFIG_NSH_MMCSDSPIPORTNO
@@ -75,18 +75,18 @@
# endif
# ifndef CONFIG_PIC32MX_SPI2
# warning "CONFIG_PIC32MX_SPI2 is not enabled"
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
# endif
#else
# error "Unrecognized board"
# undef CONFIG_NSH_HAVEMMCSD
# undef CONFIG_NSH_HAVEUSBHOST
# undef NSH_HAVEMMCSD
# undef NSH_HAVEUSBHOST
#endif
/* Can't support MMC/SD features if mountpoints are disabled */
#if defined(CONFIG_DISABLE_MOUNTPOINT)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
@@ -108,10 +108,10 @@
#endif
#if !defined(CONFIG_USBHOST) || !defined(CONFIG_PIC32MX_USBHOST)
# undef CONFIG_NSH_HAVEUSBHOST
# undef NSH_HAVEUSBHOST
#endif
#ifdef CONFIG_NSH_HAVEUSBHOST
#ifdef NSH_HAVEUSBHOST
# ifndef CONFIG_USBHOST_DEFPRIO
# define CONFIG_USBHOST_DEFPRIO 50
# endif
@@ -140,7 +140,7 @@
* Private Data
****************************************************************************/
#ifdef CONFIG_NSH_HAVEUSBHOST
#ifdef NSH_HAVEUSBHOST
static struct usbhost_driver_s *g_drvr;
#endif
@@ -156,7 +156,7 @@ static struct usbhost_driver_s *g_drvr;
*
****************************************************************************/
#ifdef CONFIG_NSH_HAVEUSBHOST
#ifdef NSH_HAVEUSBHOST
static int nsh_waiter(int argc, char *argv[])
{
bool connected = false;
@@ -197,7 +197,7 @@ static int nsh_waiter(int argc, char *argv[])
*
****************************************************************************/
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
static int nsh_sdinitialize(void)
{
FAR struct spi_dev_s *spi;
@@ -259,7 +259,7 @@ errout:
*
****************************************************************************/
#ifdef CONFIG_NSH_HAVEUSBHOST
#ifdef NSH_HAVEUSBHOST
static int nsh_usbhostinitialize(void)
{
int pid;
+11 -11
View File
@@ -61,8 +61,8 @@
/* PORT and SLOT number probably depend on the board configuration */
#ifdef CONFIG_ARCH_BOARD_TWR_K60N512
# define CONFIG_NSH_HAVEUSBDEV 1
# define CONFIG_NSH_HAVEMMCSD 1
# define NSH_HAVEUSBDEV 1
# define NSH_HAVEMMCSD 1
# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0
# error "Only one MMC/SD slot, slot 0"
# undef CONFIG_NSH_MMCSDSLOTNO
@@ -73,14 +73,14 @@
#else
/* Add configuration for new Kinetis boards here */
# error "Unrecognized Kinetis board"
# undef CONFIG_NSH_HAVEUSBDEV
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEUSBDEV
# undef NSH_HAVEMMCSD
#endif
/* Can't support USB features if USB is not enabled */
#ifndef CONFIG_USBDEV
# undef CONFIG_NSH_HAVEUSBDEV
# undef NSH_HAVEUSBDEV
#endif
/* Can't support MMC/SD features if mountpoints are disabled or if SDHC support
@@ -88,7 +88,7 @@
*/
#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_KINETIS_SDHC)
# undef CONFIG_NSH_HAVEMMCSD
# undef NSH_HAVEMMCSD
#endif
#ifndef CONFIG_NSH_MMCSDMINOR
@@ -129,7 +129,7 @@
* reduces the probability of name collistions.
*/
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
struct kinetis_nsh_s
{
FAR struct sdio_dev_s *sdhc; /* SDIO driver handle */
@@ -141,7 +141,7 @@ struct kinetis_nsh_s
* Private Data
****************************************************************************/
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
static struct kinetis_nsh_s g_nsh;
#endif
@@ -153,7 +153,7 @@ static struct kinetis_nsh_s g_nsh;
* Name: kinetis_mediachange
****************************************************************************/
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
static void kinetis_mediachange(void)
{
bool inserted;
@@ -190,7 +190,7 @@ static void kinetis_mediachange(void)
* Name: kinetis_cdinterrupt
****************************************************************************/
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
static int kinetis_cdinterrupt(int irq, FAR void *context)
{
/* All of the work is done by kinetis_mediachange() */
@@ -214,7 +214,7 @@ static int kinetis_cdinterrupt(int irq, FAR void *context)
int nsh_archinitialize(void)
{
#ifdef CONFIG_NSH_HAVEMMCSD
#ifdef NSH_HAVEMMCSD
int ret;
/* Configure GPIO pins */