From fd039c0559629e355d072e34fb57a4395aace1d0 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 5 Sep 2013 08:07:03 -0600 Subject: [PATCH] Rename examples/usbstorage to examples/usbmsc. From CCTSAO --- ChangeLog.txt | 6 + examples/Kconfig | 2 +- examples/Makefile | 4 +- examples/README.txt | 6 +- examples/composite/composite_main.c | 2 +- examples/{usbstorage => usbmsc}/.gitignore | 0 examples/usbmsc/Kconfig | 124 ++++++++++++++++++ examples/{usbstorage => usbmsc}/Makefile | 2 +- examples/{usbstorage => usbmsc}/usbmsc.h | 2 +- examples/{usbstorage => usbmsc}/usbmsc_main.c | 2 +- 10 files changed, 140 insertions(+), 10 deletions(-) rename examples/{usbstorage => usbmsc}/.gitignore (100%) create mode 100644 examples/usbmsc/Kconfig rename examples/{usbstorage => usbmsc}/Makefile (98%) rename examples/{usbstorage => usbmsc}/usbmsc.h (99%) rename examples/{usbstorage => usbmsc}/usbmsc_main.c (99%) diff --git a/ChangeLog.txt b/ChangeLog.txt index 5d5998a5f..9bf2dff1e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -620,4 +620,10 @@ * apps/examples/composite/: SourceForge bug #19: Fix a typo that can cause a configuration error. From CCTSAO (2013-9-4). + * apps/examples/cc3000. Initial support for the TI CC3000 network module + on the Freescale Freedom-KL25Z board from Alan Carvalho de Assis. + Includes the test to verify the CC3000 (2013-9-3). + * apps/examples/usbmsc: apps/examples/usbstorage renamed usbmsc. + Change submitted by CCTSAO (2013-6-5). + diff --git a/examples/Kconfig b/examples/Kconfig index ad75af005..99785a155 100644 --- a/examples/Kconfig +++ b/examples/Kconfig @@ -62,7 +62,7 @@ source "$APPSDIR/examples/udp/Kconfig" source "$APPSDIR/examples/discover/Kconfig" source "$APPSDIR/examples/uip/Kconfig" source "$APPSDIR/examples/usbserial/Kconfig" -source "$APPSDIR/examples/usbstorage/Kconfig" +source "$APPSDIR/examples/usbmsc/Kconfig" source "$APPSDIR/examples/usbterm/Kconfig" source "$APPSDIR/examples/watchdog/Kconfig" source "$APPSDIR/examples/wget/Kconfig" diff --git a/examples/Makefile b/examples/Makefile index 4036bc325..a98fe5ebe 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -43,7 +43,7 @@ SUBDIRS += lcdrw mm modbus mount mtdpart nettest nrf24l01_term nsh null SUBDIRS += nx nxconsole nxffs nxflat nxhello nximage nxlines nxtext ostest SUBDIRS += pashello pipe poll posix_spawn pwm qencoder relays rgmp romfs SUBDIRS += sendmail serloop slcd smart smart_test tcpecho telnetd thttpd tiff -SUBDIRS += touchscreen udp uip usbserial usbstorage usbterm watchdog +SUBDIRS += touchscreen udp uip usbserial usbmsc usbterm watchdog SUBDIRS += wget wgetjson xmlrpc # Sub-directories that might need context setup. Directories may need @@ -57,7 +57,7 @@ CNTXTDIRS += adc can cc3000 cdcacm composite cxxtest dhcpd discover flash_test CNTXTDIRS += ftpd hello helloxx json keypadtestmodbus lcdrw mtdpart nettest CNTXTDIRS += nx nxhello nximage nxlines nxtext nrf24l01_term ostest relays CNTXTDIRS += qencoder slcd smart_test tcpecho telnetd tiff touchscreen -CNTXTDIRS += usbstorage usbterm watchdog wgetjson +CNTXTDIRS += usbmsc usbterm watchdog wgetjson endif all: nothing diff --git a/examples/README.txt b/examples/README.txt index 016a04dd3..b8c270419 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -1825,8 +1825,8 @@ examples/usbserial The host and target will exchange are variety of very small and very large serial messages. -examples/usbstorage -^^^^^^^^^^^^^^^^^^^ +examples/usbmsc +^^^^^^^^^^^^^^^ This example registers a block device driver, then exports the block the device using the USB storage class driver. In order to use this @@ -1834,7 +1834,7 @@ examples/usbstorage void usbmsc_archinitialize(void); - This function will be called by the example/usbstorage in order to + This function will be called by the example/usbmsc in order to do the actual registration of the block device drivers. For examples of the implementation of usbmsc_archinitialize() see configs/mcu123-lpc124x/src/up_usbmsc.c or diff --git a/examples/composite/composite_main.c b/examples/composite/composite_main.c index e1d8db675..744c64096 100644 --- a/examples/composite/composite_main.c +++ b/examples/composite/composite_main.c @@ -1,5 +1,5 @@ /**************************************************************************** - * examples/usbstorage/composite_main.c + * examples/composite/composite_main.c * * Copyright (C) 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/examples/usbstorage/.gitignore b/examples/usbmsc/.gitignore similarity index 100% rename from examples/usbstorage/.gitignore rename to examples/usbmsc/.gitignore diff --git a/examples/usbmsc/Kconfig b/examples/usbmsc/Kconfig new file mode 100644 index 000000000..1681b181f --- /dev/null +++ b/examples/usbmsc/Kconfig @@ -0,0 +1,124 @@ +# +# For a description of the syntax of this configuration file, +# see misc/tools/kconfig-language.txt. +# + +config EXAMPLES_USBMSC + bool "USB mass storage class example" + default n + ---help--- + Enable the USB mass storage class example + +if EXAMPLES_USBMSC + +config EXAMPLES_USBMSC_NLUNS + int "Number of LUNs" + default 1 + ---help--- + Defines the number of logical units (LUNs) exported by the USB + storage driver. Each LUN corresponds to one exported block driver + (or partition of a block driver). May be 1, 2, or 3. Default is 1. + +config EXAMPLES_USBMSC_DEVMINOR1 + int "LUN1 Minor Device Number" + default 0 + ---help--- + The minor device number of the block driver for the first LUN. For + example, N in /dev/mmcsdN. Used for registering the block driver. + Default is zero. + +config EXAMPLES_USBMSC_DEVPATH1 + string "LUN1 Device Path" + default "/dev/mmcsd0" + ---help--- + The full path to the registered block driver. Default is + "/dev/mmcsd0" + +config EXAMPLES_USBMSC_DEVMINOR2 + int "LUN2 Minor Device Number" + default 1 + ---help--- + The minor device number of the block driver for the second LUN. For + example, N in /dev/mmcsdN. Used for registering the block driver. + Ignored if EXAMPLES_USBMSC_NLUNS < 2. Default is one. + +config EXAMPLES_USBMSC_DEVPATH2 + string "LUN2 Device Path" + default "/dev/mmcsd1" + ---help--- + The full path to the registered block driver. Ignored if + EXAMPLES_USBMSC_NLUNS < 2. Default is "/dev/mmcsd1" + +config EXAMPLES_USBMSC_DEVMINOR3 + int "LUN3 Minor Device Number" + default 2 + ---help--- + The minor device number of the block driver for the third LUN. For + example, N in /dev/mmcsdN. Used for registering the block driver. + Ignored if EXAMPLES_USBMSC_NLUNS < 2. Default is two. + +config EXAMPLES_USBMSC_DEVPATH3 + string "LUN3 Device Path" + default "/dev/mmcsd2" + ---help--- + The full path to the registered block driver. Ignored if + EXAMPLES_USBMSC_NLUNS < 2. Default is "/dev/mmcsd2" + +config EXAMPLES_USBMSC_DEBUGMM + bool "USB MSC MM Debug" + default n + ---help--- + Enables some debug tests to check for memory usage and memory leaks. + +config EXAMPLES_USBMSC_TRACEINIT + bool "USB Trace Initialization" + default n + depends on USBDEV_TRACE || DEBUG_USB + ---help--- + If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + then the example code will also manage the USB trace output. The + amount of trace output can be controlled this configuration value: + This setting will show USB initialization events + +config EXAMPLES_USBMSC_TRACECLASS + bool "USB Trace Class" + default n + depends on USBDEV_TRACE || DEBUG_USB + ---help--- + If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + then the example code will also manage the USB trace output. The + amount of trace output can be controlled this configuration value: + This setting will show USB class driver events + +config EXAMPLES_USBMSC_TRACETRANSFERS + bool "USB Trace Transfers" + default n + depends on USBDEV_TRACE || DEBUG_USB + ---help--- + If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + then the example code will also manage the USB trace output. The + amount of trace output can be controlled this configuration value: + This setting will show USB data transfer events + +config EXAMPLES_USBMSC_TRACECONTROLLER + bool "USB Trace Device Controller Events" + default n + depends on USBDEV_TRACE || DEBUG_USB + ---help--- + If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + then the example code will also manage the USB trace output. The + amount of trace output can be controlled this configuration value: + This setting will show USB device controller events + +config EXAMPLES_USBMSC_TRACEINTERRUPTS + bool "USB Trace Device Controller Interrupt Events" + default n + depends on USBDEV_TRACE || DEBUG_USB + ---help--- + If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + then the example code will also manage the USB trace output. The + amount of trace output can be controlled this configuration value: + This setting will show USB device controller interrupt-related events. + +endif + diff --git a/examples/usbstorage/Makefile b/examples/usbmsc/Makefile similarity index 98% rename from examples/usbstorage/Makefile rename to examples/usbmsc/Makefile index 76198efa0..2dbf78260 100644 --- a/examples/usbstorage/Makefile +++ b/examples/usbmsc/Makefile @@ -1,5 +1,5 @@ ############################################################################ -# apps/examples/usbstorage/Makefile +# apps/examples/usbmsc/Makefile # # Copyright (C) 2008, 2010-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/examples/usbstorage/usbmsc.h b/examples/usbmsc/usbmsc.h similarity index 99% rename from examples/usbstorage/usbmsc.h rename to examples/usbmsc/usbmsc.h index b3652ab0a..bd66a2927 100644 --- a/examples/usbstorage/usbmsc.h +++ b/examples/usbmsc/usbmsc.h @@ -1,5 +1,5 @@ /**************************************************************************** - * examples/usbstorage/usbmsc.h + * examples/usbmsc/usbmsc.h * * Copyright (C) 2008-2009, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/examples/usbstorage/usbmsc_main.c b/examples/usbmsc/usbmsc_main.c similarity index 99% rename from examples/usbstorage/usbmsc_main.c rename to examples/usbmsc/usbmsc_main.c index 5c0ae232e..4ff59f9da 100644 --- a/examples/usbstorage/usbmsc_main.c +++ b/examples/usbmsc/usbmsc_main.c @@ -1,5 +1,5 @@ /**************************************************************************** - * examples/usbstorage/usbmsc_main.c + * examples/usbmsc/usbmsc_main.c * * Copyright (C) 2008-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt