Rename all occurrences of composite_archinitialize to board_composite_initialize
This commit is contained in:
parent
a2620361df
commit
39326f3b96
@ -105,7 +105,7 @@ static inline int boardctl_usbdevctrl(FAR struct boardioc_usbdev_ctrl_s *ctrl)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
ret = -EINVAL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
@ -123,7 +123,8 @@ static inline int boardctl_usbdevctrl(FAR struct boardioc_usbdev_ctrl_s *ctrl)
|
|||||||
case BOARDIOC_USBDEV_CONNECT: /* Connect the USB MSC device */
|
case BOARDIOC_USBDEV_CONNECT: /* Connect the USB MSC device */
|
||||||
{
|
{
|
||||||
DEBUGASSERT(ctrl->handle != NULL);
|
DEBUGASSERT(ctrl->handle != NULL);
|
||||||
???
|
#warning Missing logic
|
||||||
|
ret = -ENOSYS;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -135,7 +136,7 @@ static inline int boardctl_usbdevctrl(FAR struct boardioc_usbdev_ctrl_s *ctrl)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
ret = -EINVAL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
@ -169,11 +170,15 @@ static inline int boardctl_usbdevctrl(FAR struct boardioc_usbdev_ctrl_s *ctrl)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
ret = -EINVAL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
default:
|
||||||
|
ret = -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* configs/fire-stm32v2/src/stm32_composite.c
|
* configs/fire-stm32v2/src/stm32_composite.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Configure and register the STM32 SPI-based MMC/SD block driver.
|
* Configure and register the STM32 SPI-based MMC/SD block driver.
|
||||||
@ -43,6 +43,8 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <nuttx/board.h>
|
||||||
|
|
||||||
#include "fire-stm32v2.h"
|
#include "fire-stm32v2.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -60,14 +62,14 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: composite_archinitialize
|
* Name: board_composite_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Perform architecture specific initialization
|
* Perform architecture specific initialization of a composite USB device.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int composite_archinitialize(void)
|
int board_composite_initialize(int port)
|
||||||
{
|
{
|
||||||
/* If system/composite is built as an NSH command, then SD slot should
|
/* If system/composite is built as an NSH command, then SD slot should
|
||||||
* already have been initialized in board_app_initialize() (see stm32_appinit.c).
|
* already have been initialized in board_app_initialize() (see stm32_appinit.c).
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* configs/mcu123-lpc214x/src/lpc2148_composite.c
|
* configs/mcu123-lpc214x/src/lpc2148_composite.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Configure and register the LPC214x MMC/SD SPI block driver.
|
* Configure and register the LPC214x MMC/SD SPI block driver.
|
||||||
@ -45,8 +45,9 @@
|
|||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <nuttx/spi/spi.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/mmcsd.h>
|
#include <nuttx/mmcsd.h>
|
||||||
|
#include <nuttx/spi/spi.h>
|
||||||
#include <nuttx/usb/composite.h>
|
#include <nuttx/usb/composite.h>
|
||||||
|
|
||||||
#include "lpc214x_spi.h"
|
#include "lpc214x_spi.h"
|
||||||
@ -71,14 +72,14 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: composite_archinitialize
|
* Name: board_composite_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Perform architecture specific initialization
|
* Perform architecture specific initialization of a composite USB device.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int composite_archinitialize(void)
|
int board_composite_initialize(int port)
|
||||||
{
|
{
|
||||||
/* If system/composite is built as an NSH command, then SD slot should
|
/* If system/composite is built as an NSH command, then SD slot should
|
||||||
* already have been initialized in board_app_initialize() (see lpc2148_appinit.c).
|
* already have been initialized in board_app_initialize() (see lpc2148_appinit.c).
|
||||||
|
@ -228,21 +228,5 @@ int stm32_can_initialize(void);
|
|||||||
int usbmsc_archinitialize(void);
|
int usbmsc_archinitialize(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Name: composite_archinitialize
|
|
||||||
*
|
|
||||||
* Description:
|
|
||||||
* Called from the application system/composite or the boards_nsh if the
|
|
||||||
* application is not included.
|
|
||||||
* Perform architecture specific initialization. This function must
|
|
||||||
* configure the block device to export via USB. This function must be
|
|
||||||
* provided by architecture-specific logic in order to use this add-on.
|
|
||||||
*
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_SYSTEM_COMPOSITE)
|
|
||||||
extern int composite_archinitialize(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
#endif /* __CONFIGS_OLIMEXINO_STM32_SRC_OLIMEXINO_STM32_H */
|
#endif /* __CONFIGS_OLIMEXINO_STM32_SRC_OLIMEXINO_STM32_H */
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* configs/olimexino-stm32/src/stm32_appinit.c
|
* configs/olimexino-stm32/src/stm32_appinit.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2015, 2016 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
* David Sidrane <david_s5@nscdg.com>
|
* David Sidrane <david_s5@nscdg.com>
|
||||||
*
|
*
|
||||||
@ -60,17 +60,6 @@
|
|||||||
#include "stm32.h"
|
#include "stm32.h"
|
||||||
#include "olimexino-stm32.h"
|
#include "olimexino-stm32.h"
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Data
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
****************************************************************************/
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -95,7 +84,7 @@ int board_app_initialize(void)
|
|||||||
|
|
||||||
#ifdef CONFIG_USBDEV_COMPOSITE
|
#ifdef CONFIG_USBDEV_COMPOSITE
|
||||||
#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_SYSTEM_COMPOSITE)
|
#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_SYSTEM_COMPOSITE)
|
||||||
ret = composite_archinitialize();
|
ret = board_composite_initialize(0);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -44,8 +44,9 @@
|
|||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <nuttx/spi/spi.h>
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/mmcsd.h>
|
#include <nuttx/mmcsd.h>
|
||||||
|
#include <nuttx/spi/spi.h>
|
||||||
|
|
||||||
#include "stm32.h"
|
#include "stm32.h"
|
||||||
#include "olimexino-stm32.h"
|
#include "olimexino-stm32.h"
|
||||||
@ -81,14 +82,14 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: composite_archinitialize
|
* Name: board_composite_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Perform architecture specific initialization
|
* Perform architecture specific initialization of a composite USB device.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int composite_archinitialize(void)
|
int board_composite_initialize(int port)
|
||||||
{
|
{
|
||||||
/* If system/composite is built as an NSH command, then SD slot should
|
/* If system/composite is built as an NSH command, then SD slot should
|
||||||
* already have been initialized in board_app_initialize() (see stm32_appinit.c).
|
* already have been initialized in board_app_initialize() (see stm32_appinit.c).
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
int board_composite_initialize(int port)
|
int board_composite_initialize(int port)
|
||||||
{
|
{
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_USBDEV_COMPOSITE */
|
#endif /* CONFIG_USBDEV_COMPOSITE */
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* configs/shenzhou/src/stm32_composite.c
|
* configs/shenzhou/src/stm32_composite.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Configure and register the STM32 SPI-based MMC/SD block driver.
|
* Configure and register the STM32 SPI-based MMC/SD block driver.
|
||||||
@ -60,14 +60,14 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: composite_archinitialize
|
* Name: board_composite_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Perform architecture specific initialization
|
* Perform architecture specific initialization of a composite USB device.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int composite_archinitialize(void)
|
int board_composite_initialize(int port)
|
||||||
{
|
{
|
||||||
/* If system/composite is built as an NSH command, then SD slot should
|
/* If system/composite is built as an NSH command, then SD slot should
|
||||||
* already have been initialized in board_app_initialize() (see
|
* already have been initialized in board_app_initialize() (see
|
||||||
|
@ -116,10 +116,6 @@
|
|||||||
# undef HAVE_USBMONITOR
|
# undef HAVE_USBMONITOR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Data
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* config/spark/src/stm32_composite.c
|
* config/spark/src/stm32_composite.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
* David_s5 <david_s5@nscdg.com>
|
* David_s5 <david_s5@nscdg.com>
|
||||||
*
|
*
|
||||||
@ -46,6 +46,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <nuttx/kmalloc.h>
|
#include <nuttx/kmalloc.h>
|
||||||
|
#include <nuttx/board.h>
|
||||||
|
|
||||||
#ifdef CONFIG_MTD_SST25
|
#ifdef CONFIG_MTD_SST25
|
||||||
# include <nuttx/spi/spi.h>
|
# include <nuttx/spi/spi.h>
|
||||||
@ -120,15 +121,15 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: do_composite_archinitialize
|
* Name: stm32_composite_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Perform architecture specific initialization
|
* Perform architecture specific initialization
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if !defined(CONFIG_LIB_BOARDCTL) || !defined(CONFIG_NSH_BUILTIN_APPS)
|
#ifndef CONFIG_NSH_BUILTIN_APPS
|
||||||
static int do_composite_archinitialize(void)
|
static int stm32_composite_initialize(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_SST25
|
#ifdef HAVE_SST25
|
||||||
FAR struct spi_dev_s *spi;
|
FAR struct spi_dev_s *spi;
|
||||||
@ -284,18 +285,18 @@ static int do_composite_archinitialize(void)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: board_app_initialize
|
* Name: board_composite_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Perform architecture specific initialization
|
* Perform architecture specific initialization of a composite USB device.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int composite_archinitialize(void)
|
int board_composite_initialize(int port)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_LIB_BOARDCTL) && defined(CONFIG_NSH_BUILTIN_APPS)
|
#ifdef CONFIG_NSH_BUILTIN_APPS
|
||||||
return OK;
|
return OK;
|
||||||
#else
|
#else
|
||||||
return do_composite_archinitialize();
|
return stm32_composite_initialize();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* configs/stm3210e-eval/src/stm32_composite.c
|
* configs/stm3210e-eval/src/stm32_composite.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2009, 2011, 2016 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Configure and register the STM32 MMC/SD SDIO block driver.
|
* Configure and register the STM32 MMC/SD SDIO block driver.
|
||||||
@ -47,13 +47,14 @@
|
|||||||
|
|
||||||
#include <nuttx/sdio.h>
|
#include <nuttx/sdio.h>
|
||||||
#include <nuttx/mmcsd.h>
|
#include <nuttx/mmcsd.h>
|
||||||
|
#include <nuttx/board.h>
|
||||||
#include <nuttx/usb/composite.h>
|
#include <nuttx/usb/composite.h>
|
||||||
|
|
||||||
#include "stm32.h"
|
#include "stm32.h"
|
||||||
|
|
||||||
/* There is nothing to do here if SDIO support is not selected. */
|
/* There is nothing to do here if SDIO support is not selected. */
|
||||||
|
|
||||||
#ifdef CONFIG_STM32_SDIO
|
#if defined(CONFIG_STM32_SDIO) && defined(CONFIG_USBDEV_COMPOSITE)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
@ -80,14 +81,14 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: composite_archinitialize
|
* Name: board_composite_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Perform architecture specific initialization
|
* Perform architecture specific initialization of a composite USB device.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int composite_archinitialize(void)
|
int board_composite_initialize(int port)
|
||||||
{
|
{
|
||||||
/* If system/composite is built as an NSH command, then SD slot should
|
/* If system/composite is built as an NSH command, then SD slot should
|
||||||
* already have been initialized in board_app_initialize() (see
|
* already have been initialized in board_app_initialize() (see
|
||||||
@ -141,4 +142,4 @@ int composite_archinitialize(void)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_STM32_SDIO */
|
#endif /* CONFIG_STM32_SDIO && CONFIG_USBDEV_COMPOSITE */
|
||||||
|
Loading…
Reference in New Issue
Block a user