diff options
Diffstat (limited to 'apps/examples')
-rw-r--r-- | apps/examples/Kconfig | 2 | ||||
-rw-r--r-- | apps/examples/Makefile | 4 | ||||
-rw-r--r-- | apps/examples/README.txt | 6 | ||||
-rw-r--r-- | apps/examples/composite/composite_main.c | 2 | ||||
-rw-r--r-- | apps/examples/usbmsc/.gitignore (renamed from apps/examples/usbstorage/.gitignore) | 0 | ||||
-rw-r--r-- | apps/examples/usbmsc/Kconfig | 124 | ||||
-rw-r--r-- | apps/examples/usbmsc/Makefile (renamed from apps/examples/usbstorage/Makefile) | 2 | ||||
-rw-r--r-- | apps/examples/usbmsc/usbmsc.h (renamed from apps/examples/usbstorage/usbmsc.h) | 2 | ||||
-rw-r--r-- | apps/examples/usbmsc/usbmsc_main.c (renamed from apps/examples/usbstorage/usbmsc_main.c) | 2 |
9 files changed, 134 insertions, 10 deletions
diff --git a/apps/examples/Kconfig b/apps/examples/Kconfig index ad75af005..99785a155 100644 --- a/apps/examples/Kconfig +++ b/apps/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/apps/examples/Makefile b/apps/examples/Makefile index 4036bc325..a98fe5ebe 100644 --- a/apps/examples/Makefile +++ b/apps/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/apps/examples/README.txt b/apps/examples/README.txt index 016a04dd3..b8c270419 100644 --- a/apps/examples/README.txt +++ b/apps/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/apps/examples/composite/composite_main.c b/apps/examples/composite/composite_main.c index e1d8db675..744c64096 100644 --- a/apps/examples/composite/composite_main.c +++ b/apps/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 <gnutt@nuttx.org> diff --git a/apps/examples/usbstorage/.gitignore b/apps/examples/usbmsc/.gitignore index fa1ec7579..fa1ec7579 100644 --- a/apps/examples/usbstorage/.gitignore +++ b/apps/examples/usbmsc/.gitignore diff --git a/apps/examples/usbmsc/Kconfig b/apps/examples/usbmsc/Kconfig new file mode 100644 index 000000000..1681b181f --- /dev/null +++ b/apps/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/apps/examples/usbstorage/Makefile b/apps/examples/usbmsc/Makefile index 76198efa0..2dbf78260 100644 --- a/apps/examples/usbstorage/Makefile +++ b/apps/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 <gnutt@nuttx.org> diff --git a/apps/examples/usbstorage/usbmsc.h b/apps/examples/usbmsc/usbmsc.h index b3652ab0a..bd66a2927 100644 --- a/apps/examples/usbstorage/usbmsc.h +++ b/apps/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 <gnutt@nuttx.org> diff --git a/apps/examples/usbstorage/usbmsc_main.c b/apps/examples/usbmsc/usbmsc_main.c index 5c0ae232e..4ff59f9da 100644 --- a/apps/examples/usbstorage/usbmsc_main.c +++ b/apps/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 <gnutt@nuttx.org> |