From 749d553fb6cbcd8fee4302f1e34e6e022faa4c05 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 12 Feb 2013 00:25:27 +0000 Subject: [PATCH] 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 --- configs/stm32f3discovery/README.txt | 10 ------ configs/stm32f3discovery/include/board.h | 1 - configs/stm32f3discovery/src/up_nsh.c | 42 ++++-------------------- configs/stm32f3discovery/src/up_usb.c | 1 - 4 files changed, 6 insertions(+), 48 deletions(-) diff --git a/configs/stm32f3discovery/README.txt b/configs/stm32f3discovery/README.txt index ed7817aad0..82d5efd1eb 100644 --- a/configs/stm32f3discovery/README.txt +++ b/configs/stm32f3discovery/README.txt @@ -652,16 +652,6 @@ STM32F3Discovery-specific Configuration Options CONFIG_STM32_SPI_DMA - Use DMA to improve SPI transfer performance. Cannot be used with CONFIG_STM32_SPI_INTERRUPT. - STM32F3Discovery DMA Configuration - - CONFIG_SDIO_DMA - Support DMA data transfers. Requires CONFIG_STM32_SDIO - and CONFIG_STM32_DMA2. - CONFIG_SDIO_PRI - Select SDIO interrupt prority. Default: 128 - CONFIG_SDIO_DMAPRIO - Select SDIO DMA interrupt priority. - Default: Medium - CONFIG_SDIO_WIDTH_D1_ONLY - Select 1-bit transfer mode. Default: - 4-bit transfer mode. - Configurations ============== diff --git a/configs/stm32f3discovery/include/board.h b/configs/stm32f3discovery/include/board.h index f4aedccdf6..ff1a049f53 100644 --- a/configs/stm32f3discovery/include/board.h +++ b/configs/stm32f3discovery/include/board.h @@ -48,7 +48,6 @@ #endif #include "stm32_rcc.h" -#include "stm32_sdio.h" #include "stm32.h" /************************************************************************************ diff --git a/configs/stm32f3discovery/src/up_nsh.c b/configs/stm32f3discovery/src/up_nsh.c index a7d2013580..08737a320a 100644 --- a/configs/stm32f3discovery/src/up_nsh.c +++ b/configs/stm32f3discovery/src/up_nsh.c @@ -45,19 +45,10 @@ #include #include -#ifdef CONFIG_STM32_SDIO -# include -# include -#endif - #ifdef CONFIG_SYSTEM_USBMONITOR # include #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) - 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 + int ret; + /* Start the USB Monitor */ ret = usbmonitor_start(0, NULL); diff --git a/configs/stm32f3discovery/src/up_usb.c b/configs/stm32f3discovery/src/up_usb.c index 9b735eed9f..79b41bf3a9 100644 --- a/configs/stm32f3discovery/src/up_usb.c +++ b/configs/stm32f3discovery/src/up_usb.c @@ -48,7 +48,6 @@ #include #include -#include #include #include "up_arch.h"