summaryrefslogtreecommitdiff
path: root/nuttx/configs/stm32f3discovery/src/up_nsh.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-02-12 00:25:27 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-02-12 00:25:27 +0000
commite7a073d41bdcd9b7d0f15411d1671a5786a0aaed (patch)
tree04468d607d4f515ac8e8d7b522853a7b2162a166 /nuttx/configs/stm32f3discovery/src/up_nsh.c
parentfb8e18e23e3997e065de381bf9b6b54e0c6f331f (diff)
downloadpx4-nuttx-e7a073d41bdcd9b7d0f15411d1671a5786a0aaed.tar.gz
px4-nuttx-e7a073d41bdcd9b7d0f15411d1671a5786a0aaed.tar.bz2
px4-nuttx-e7a073d41bdcd9b7d0f15411d1671a5786a0aaed.zip
Fix start-up of USB monitor in STM32F3Discovery configuration; Back out back checkin of STM32 F1/F3 USB device driver
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5641 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/stm32f3discovery/src/up_nsh.c')
-rw-r--r--nuttx/configs/stm32f3discovery/src/up_nsh.c40
1 files changed, 5 insertions, 35 deletions
diff --git a/nuttx/configs/stm32f3discovery/src/up_nsh.c b/nuttx/configs/stm32f3discovery/src/up_nsh.c
index a7d201358..08737a320 100644
--- a/nuttx/configs/stm32f3discovery/src/up_nsh.c
+++ b/nuttx/configs/stm32f3discovery/src/up_nsh.c
@@ -45,19 +45,10 @@
#include <debug.h>
#include <errno.h>
-#ifdef CONFIG_STM32_SDIO
-# include <nuttx/sdio.h>
-# include <nuttx/mmcsd.h>
-#endif
-
#ifdef CONFIG_SYSTEM_USBMONITOR
# include <apps/usbmonitor.h>
#endif
-#ifdef CONFIG_STM32_OTGFS
-# include "stm32_usbhost.h"
-#endif
-
#include "stm32.h"
#include "stm32f3discovery-internal.h"
@@ -68,14 +59,14 @@
/* Configuration ************************************************************/
#define HAVE_USBDEV 1
-#define HAVE_USBHOST 1
#define HAVE_USBMONITOR 1
-/* Can't support USB host or device features if USB OTG FS is not enabled */
+/* Can't support USB device features if the STM32 USB peripheral is not
+ * enabled.
+ */
-#ifndef CONFIG_STM32_OTGFS
+#ifndef CONFIG_STM32_USB
# undef HAVE_USBDEV
-# undef HAVE_USBHOST
# undef HAVE_USBMONITOR
#endif
@@ -86,12 +77,6 @@
# undef HAVE_USBMONITOR
#endif
-/* Can't support USB host is USB host is not enabled */
-
-#ifndef CONFIG_USBHOST
-# undef HAVE_USBHOST
-#endif
-
/* Check if we should enable the USB monitor before starting NSH */
#if !defined(CONFIG_USBDEV_TRACE) || !defined(CONFIG_SYSTEM_USBMONITOR)
@@ -128,24 +113,9 @@
int nsh_archinitialize(void)
{
-#if defined(HAVE_USBHOST) || defined(HAVE_USBMONITOR)
+#ifdef HAVE_USBMONITOR
int ret;
-#endif
-
-#ifdef HAVE_USBHOST
- /* Initialize USB host operation. stm32_usbhost_initialize() starts a thread
- * will monitor for USB connection and disconnection events.
- */
-
- ret = stm32_usbhost_initialize();
- if (ret != OK)
- {
- message("nsh_archinitialize: Failed to initialize USB host: %d\n", ret);
- return ret;
- }
-#endif
-#ifdef HAVE_USBMONITOR
/* Start the USB Monitor */
ret = usbmonitor_start(0, NULL);