summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/ChangeLog4
-rw-r--r--nuttx/Documentation/NuttxPortingGuide.html20
-rw-r--r--nuttx/configs/README.txt18
-rw-r--r--nuttx/configs/amber/hello/defconfig84
-rwxr-xr-xnuttx/configs/avr32dev1/nsh/defconfig44
-rwxr-xr-xnuttx/configs/avr32dev1/ostest/defconfig44
-rwxr-xr-xnuttx/configs/demo9s12ne64/ostest/defconfig44
-rw-r--r--nuttx/configs/ea3131/nsh/defconfig44
-rw-r--r--nuttx/configs/ea3131/ostest/defconfig44
-rw-r--r--nuttx/configs/ea3131/pgnsh/defconfig44
-rw-r--r--nuttx/configs/ea3131/src/Makefile4
-rw-r--r--nuttx/configs/ea3131/src/up_usbmsc.c (renamed from nuttx/configs/ea3131/src/up_usbstrg.c)30
-rw-r--r--nuttx/configs/ea3131/usbserial/defconfig84
-rw-r--r--nuttx/configs/ea3131/usbstorage/defconfig84
-rw-r--r--nuttx/configs/ea3152/ostest/defconfig44
-rw-r--r--nuttx/configs/ea3152/src/Makefile4
-rw-r--r--nuttx/configs/ea3152/src/up_usbmsc.c (renamed from nuttx/configs/ea3152/src/up_usbstrg.c)30
-rw-r--r--nuttx/configs/ez80f910200kitg/ostest/defconfig44
-rw-r--r--nuttx/configs/ez80f910200zco/dhcpd/defconfig44
-rw-r--r--nuttx/configs/ez80f910200zco/httpd/defconfig44
-rw-r--r--nuttx/configs/ez80f910200zco/nettest/defconfig44
-rw-r--r--nuttx/configs/ez80f910200zco/nsh/defconfig44
-rw-r--r--nuttx/configs/ez80f910200zco/ostest/defconfig44
-rw-r--r--nuttx/configs/ez80f910200zco/poll/defconfig44
-rwxr-xr-xnuttx/configs/hymini-stm32v/README.txt2
-rw-r--r--nuttx/configs/hymini-stm32v/buttons/defconfig44
-rwxr-xr-xnuttx/configs/hymini-stm32v/nsh/defconfig44
-rw-r--r--nuttx/configs/hymini-stm32v/nsh2/defconfig92
-rw-r--r--nuttx/configs/hymini-stm32v/nx/defconfig44
-rw-r--r--nuttx/configs/hymini-stm32v/nxlines/defconfig44
-rw-r--r--nuttx/configs/hymini-stm32v/src/Makefile4
-rw-r--r--nuttx/configs/hymini-stm32v/src/up_usbmsc.c (renamed from nuttx/configs/hymini-stm32v/src/up_usbstrg.c)30
-rwxr-xr-xnuttx/configs/hymini-stm32v/usbserial/defconfig44
-rwxr-xr-xnuttx/configs/hymini-stm32v/usbstorage/defconfig92
-rwxr-xr-xnuttx/configs/kwikstik-k40/ostest/defconfig44
-rwxr-xr-xnuttx/configs/kwikstik-k40/src/Makefile4
-rwxr-xr-xnuttx/configs/kwikstik-k40/src/up_usbmsc.c (renamed from nuttx/configs/kwikstik-k40/src/up_usbstrg.c)16
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig84
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/nsh/defconfig84
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/nx/defconfig84
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/ostest/defconfig84
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/src/Makefile4
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c (renamed from nuttx/configs/lpcxpresso-lpc1768/src/up_usbstrg.c)24
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig84
-rwxr-xr-xnuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig84
-rw-r--r--nuttx/configs/mbed/hidkbd/defconfig44
-rwxr-xr-xnuttx/configs/mbed/nsh/defconfig44
-rwxr-xr-xnuttx/configs/mbed/src/Makefile4
-rw-r--r--nuttx/configs/mcu123-lpc214x/nsh/defconfig44
-rw-r--r--nuttx/configs/mcu123-lpc214x/ostest/defconfig44
-rw-r--r--nuttx/configs/mcu123-lpc214x/src/Makefile4
-rwxr-xr-xnuttx/configs/mcu123-lpc214x/src/up_usbmsc.c (renamed from nuttx/configs/mcu123-lpc214x/src/up_usbstrg.c)24
-rw-r--r--nuttx/configs/mcu123-lpc214x/usbserial/defconfig44
-rw-r--r--nuttx/configs/mcu123-lpc214x/usbstorage/defconfig76
-rw-r--r--nuttx/configs/micropendous3/hello/defconfig84
-rw-r--r--nuttx/configs/mx1ads/ostest/defconfig40
-rwxr-xr-xnuttx/configs/ne64badge/ostest/defconfig44
-rw-r--r--nuttx/configs/ntosd-dm320/nettest/defconfig44
-rw-r--r--nuttx/configs/ntosd-dm320/nsh/defconfig44
-rw-r--r--nuttx/configs/ntosd-dm320/ostest/defconfig40
-rw-r--r--nuttx/configs/ntosd-dm320/poll/defconfig44
-rw-r--r--nuttx/configs/ntosd-dm320/thttpd/defconfig44
-rw-r--r--nuttx/configs/ntosd-dm320/udp/defconfig44
-rw-r--r--nuttx/configs/ntosd-dm320/uip/defconfig44
-rwxr-xr-xnuttx/configs/nucleus2g/nsh/defconfig44
-rwxr-xr-xnuttx/configs/nucleus2g/ostest/defconfig44
-rwxr-xr-xnuttx/configs/nucleus2g/src/Makefile4
-rwxr-xr-xnuttx/configs/nucleus2g/src/up_usbmsc.c (renamed from nuttx/configs/nucleus2g/src/up_usbstrg.c)24
-rwxr-xr-xnuttx/configs/nucleus2g/usbserial/defconfig84
-rwxr-xr-xnuttx/configs/nucleus2g/usbstorage/defconfig84
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/ftpc/defconfig44
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/hidkbd/defconfig44
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/nettest/defconfig44
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/nsh/defconfig44
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/nx/defconfig84
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/ostest/defconfig84
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig44
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/src/Makefile4
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/src/up_usbmsc.c (renamed from nuttx/configs/olimex-lpc1766stk/src/up_usbstrg.c)24
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/thttpd/defconfig44
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/usbserial/defconfig84
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/usbstorage/defconfig84
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/wlan/defconfig44
-rwxr-xr-xnuttx/configs/olimex-strp711/nettest/defconfig44
-rw-r--r--nuttx/configs/olimex-strp711/nsh/defconfig44
-rw-r--r--nuttx/configs/olimex-strp711/ostest/defconfig44
-rw-r--r--nuttx/configs/pcblogic-pic32mx/nsh/defconfig84
-rw-r--r--nuttx/configs/pcblogic-pic32mx/ostest/defconfig84
-rw-r--r--nuttx/configs/pic32-starterkit/ostest/defconfig84
-rwxr-xr-xnuttx/configs/sam3u-ek/knsh/defconfig44
-rwxr-xr-xnuttx/configs/sam3u-ek/nsh/defconfig44
-rwxr-xr-xnuttx/configs/sam3u-ek/nx/defconfig44
-rwxr-xr-xnuttx/configs/sam3u-ek/ostest/defconfig44
-rw-r--r--nuttx/configs/sam3u-ek/src/Makefile4
-rw-r--r--nuttx/configs/sam3u-ek/src/up_usbmsc.c (renamed from nuttx/configs/sam3u-ek/src/up_usbstrg.c)24
-rwxr-xr-xnuttx/configs/sam3u-ek/touchscreen/defconfig44
-rw-r--r--nuttx/configs/skp16c26/ostest/defconfig40
-rwxr-xr-xnuttx/configs/stm3210e-eval/README.txt2
-rwxr-xr-xnuttx/configs/stm3210e-eval/RIDE/defconfig44
-rw-r--r--nuttx/configs/stm3210e-eval/buttons/defconfig44
-rwxr-xr-xnuttx/configs/stm3210e-eval/nsh/defconfig44
-rw-r--r--nuttx/configs/stm3210e-eval/nsh2/defconfig96
-rw-r--r--nuttx/configs/stm3210e-eval/nx/defconfig44
-rw-r--r--nuttx/configs/stm3210e-eval/nxlines/defconfig44
-rw-r--r--nuttx/configs/stm3210e-eval/nxtext/defconfig44
-rwxr-xr-xnuttx/configs/stm3210e-eval/ostest/defconfig44
-rw-r--r--nuttx/configs/stm3210e-eval/src/Makefile4
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_usbmsc.c (renamed from nuttx/configs/stm3210e-eval/src/up_usbstrg.c)30
-rwxr-xr-xnuttx/configs/stm3210e-eval/usbserial/defconfig48
-rwxr-xr-xnuttx/configs/stm3210e-eval/usbstorage/defconfig92
-rwxr-xr-xnuttx/configs/stm3240g-eval/dhcpd/defconfig44
-rwxr-xr-xnuttx/configs/stm3240g-eval/nettest/defconfig44
-rwxr-xr-xnuttx/configs/stm3240g-eval/nsh/defconfig44
-rwxr-xr-xnuttx/configs/stm3240g-eval/ostest/defconfig92
-rwxr-xr-xnuttx/configs/stm32f4discovery/nsh/defconfig44
-rwxr-xr-xnuttx/configs/stm32f4discovery/ostest/defconfig92
-rw-r--r--nuttx/configs/sure-pic32mx/nsh/defconfig84
-rw-r--r--nuttx/configs/sure-pic32mx/ostest/defconfig84
-rw-r--r--nuttx/configs/teensy/hello/defconfig84
-rwxr-xr-xnuttx/configs/teensy/nsh/defconfig44
-rwxr-xr-xnuttx/configs/teensy/src/Makefile4
-rwxr-xr-xnuttx/configs/teensy/src/up_usbmsc.c (renamed from nuttx/configs/teensy/src/up_usbstrg.c)14
-rwxr-xr-xnuttx/configs/teensy/usbstorage/defconfig84
-rw-r--r--nuttx/configs/twr-k60n512/nsh/defconfig44
-rw-r--r--nuttx/configs/twr-k60n512/ostest/defconfig44
-rw-r--r--nuttx/configs/twr-k60n512/src/Makefile4
-rw-r--r--nuttx/configs/twr-k60n512/src/up_usbmsc.c (renamed from nuttx/configs/twr-k60n512/src/up_usbstrg.c)16
-rw-r--r--nuttx/configs/us7032evb1/nsh/defconfig44
-rw-r--r--nuttx/configs/us7032evb1/ostest/defconfig44
-rwxr-xr-xnuttx/configs/vsn/nsh/defconfig44
-rw-r--r--nuttx/configs/vsn/src/Makefile4
-rw-r--r--nuttx/configs/vsn/src/usbmsc.c (renamed from nuttx/configs/vsn/src/usbstrg.c)24
-rw-r--r--nuttx/drivers/usbdev/Make.defs2
-rw-r--r--nuttx/drivers/usbdev/composite.h54
-rw-r--r--nuttx/drivers/usbdev/composite_descriptors.c2
-rw-r--r--nuttx/drivers/usbdev/msc.c484
-rw-r--r--nuttx/drivers/usbdev/msc.h364
-rw-r--r--nuttx/drivers/usbdev/msc_descriptors.c156
-rw-r--r--nuttx/drivers/usbdev/msc_scsi.c864
-rw-r--r--nuttx/drivers/usbhost/usbhost_storage.c120
-rw-r--r--nuttx/include/nuttx/usb/storage.h50
-rw-r--r--nuttx/include/nuttx/usb/usbdev.h44
-rw-r--r--nuttx/include/nuttx/usb/usbdev_trace.h266
-rw-r--r--nuttx/include/nuttx/usb/usbhost.h4
-rw-r--r--nuttx/tools/mkconfig.c4
145 files changed, 4233 insertions, 4229 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 0f9018bf6..7f67fbc0f 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -2393,3 +2393,7 @@
for an upper and lower half battery driver. Add the implementation of the
common upper half battery driver.
* drivers/power/max1704x.c: Add a driver for MAX17040x battery "fuel guage"
+ * arch/arm/src/stm32/stm32_i2c.c: Add support for I2C3
+ * drivers/usbdev/: Lots of name changes: cdc_serial->cdcacm, usbstrg->usbmsc,
+ usbser->pl2303
+ * drivers/usbdev/composite*: Fleshed out support for a composite USB device.
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html
index d7cd3edde..6d45a4339 100644
--- a/nuttx/Documentation/NuttxPortingGuide.html
+++ b/nuttx/Documentation/NuttxPortingGuide.html
@@ -12,7 +12,7 @@
<h1><big><font color="#3c34ec">
<i>NuttX RTOS Porting Guide</i>
</font></big></h1>
- <p>Last Updated: January 24, 2011</p>
+ <p>Last Updated: January 25, 2011</p>
</td>
</tr>
</table>
@@ -4987,41 +4987,41 @@ build
<h3>USB Storage Device Configuration</h3>
<ul>
<li>
- <code>CONFIG_USBSTRG</code>:
+ <code>CONFIG_USBMSC</code>:
Enable compilation of the USB storage driver
</li>
<li>
- <code>CONFIG_USBSTRG_COMPOSITE</code>:
+ <code>CONFIG_USBMSC_COMPOSITE</code>:
Configure the mass storage driver as part of a composite driver
(only if <code>CONFIG_USBDEV_COMPOSITE</code> is also defined)
<li>
- <code>CONFIG_USBSTRG_EP0MAXPACKET</code>:
+ <code>CONFIG_USBMSC_EP0MAXPACKET</code>:
Max packet size for endpoint 0
</li>
<li>
- <code>CONFIG_USBSTRGEPBULKOUT</code> and <code>CONFIG_USBSTRG_EPBULKIN</code>:
+ <code>CONFIG_USBMSCEPBULKOUT</code> and <code>CONFIG_USBMSC_EPBULKIN</code>:
The logical 7-bit address of a hardware endpoints that support bulk OUT and IN operations
</li>
<li>
- <code>CONFIG_USBSTRG_NWRREQS</code> and <code>CONFIG_USBSTRG_NRDREQS</code>:
+ <code>CONFIG_USBMSC_NWRREQS</code> and <code>CONFIG_USBMSC_NRDREQS</code>:
The number of write/read requests that can be in flight
</li>
<li>
- <code>CONFIG_USBSTRG_BULKINREQLEN</code> and <code>CONFIG_USBSTRG_BULKOUTREQLEN</code>:
+ <code>CONFIG_USBMSC_BULKINREQLEN</code> and <code>CONFIG_USBMSC_BULKOUTREQLEN</code>:
The size of the buffer in each write/read request.
This value needs to be at least as large as the endpoint maxpacket and
ideally as large as a block device sector.
</li>
<li>
- <code>CONFIG_USBSTRG_VENDORID</code> and <code>CONFIG_USBSTRG_VENDORSTR</code>:
+ <code>CONFIG_USBMSC_VENDORID</code> and <code>CONFIG_USBMSC_VENDORSTR</code>:
The vendor ID code/string
</li>
<li>
- <code>CONFIG_USBSTRG_PRODUCTID</code> and <code>CONFIG_USBSTRG_PRODUCTSTR</code>:
+ <code>CONFIG_USBMSC_PRODUCTID</code> and <code>CONFIG_USBMSC_PRODUCTSTR</code>:
The product ID code/string
</li>
<li>
- <code>CONFIG_USBSTRG_REMOVABLE</code>:
+ <code>CONFIG_USBMSC_REMOVABLE</code>:
Select if the media is removable
</li>
</ul>
diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt
index adfd5e8ca..77946f7fd 100644
--- a/nuttx/configs/README.txt
+++ b/nuttx/configs/README.txt
@@ -1052,27 +1052,27 @@ defconfig -- This is a configuration file similar to the Linux
USB Storage Device Configuration
- CONFIG_USBSTRG
+ CONFIG_USBMSC
Enable compilation of the USB storage driver
- CONFIG_USBSTRG_COMPOSITE
+ CONFIG_USBMSC_COMPOSITE
Configure the mass storage driver as part of a composite driver
(only if CONFIG_USBDEV_COMPOSITE is also defined)
- CONFIG_USBSTRG_EP0MAXPACKET
+ CONFIG_USBMSC_EP0MAXPACKET
Max packet size for endpoint 0
- CONFIG_USBSTRGEPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+ CONFIG_USBMSCEPBULKOUT and CONFIG_USBMSC_EPBULKIN
The logical 7-bit address of a hardware endpoints that support
bulk OUT and IN operations
- CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+ CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
The number of write/read requests that can be in flight
- CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+ CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
The size of the buffer in each write/read request. This
value needs to be at least as large as the endpoint
maxpacket and ideally as large as a block device sector.
- CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+ CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
The vendor ID code/string
- CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+ CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
The product ID code/string
- CONFIG_USBSTRG_REMOVABLE
+ CONFIG_USBMSC_REMOVABLE
Select if the media is removable
Graphics related configuration settings
diff --git a/nuttx/configs/amber/hello/defconfig b/nuttx/configs/amber/hello/defconfig
index fd046d50d..400585f99 100644
--- a/nuttx/configs/amber/hello/defconfig
+++ b/nuttx/configs/amber/hello/defconfig
@@ -578,40 +578,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -745,46 +745,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/avr32dev1/nsh/defconfig b/nuttx/configs/avr32dev1/nsh/defconfig
index df7e285e3..505be57c9 100755
--- a/nuttx/configs/avr32dev1/nsh/defconfig
+++ b/nuttx/configs/avr32dev1/nsh/defconfig
@@ -606,40 +606,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/avr32dev1/ostest/defconfig b/nuttx/configs/avr32dev1/ostest/defconfig
index 77a668add..a2376daf3 100755
--- a/nuttx/configs/avr32dev1/ostest/defconfig
+++ b/nuttx/configs/avr32dev1/ostest/defconfig
@@ -606,40 +606,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/demo9s12ne64/ostest/defconfig b/nuttx/configs/demo9s12ne64/ostest/defconfig
index 3848c1a61..14430c3da 100755
--- a/nuttx/configs/demo9s12ne64/ostest/defconfig
+++ b/nuttx/configs/demo9s12ne64/ostest/defconfig
@@ -582,40 +582,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/ea3131/nsh/defconfig b/nuttx/configs/ea3131/nsh/defconfig
index 0c7193079..aea790047 100644
--- a/nuttx/configs/ea3131/nsh/defconfig
+++ b/nuttx/configs/ea3131/nsh/defconfig
@@ -589,40 +589,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=1
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=1
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/ea3131/ostest/defconfig b/nuttx/configs/ea3131/ostest/defconfig
index 0027aa242..8aa8672ab 100644
--- a/nuttx/configs/ea3131/ostest/defconfig
+++ b/nuttx/configs/ea3131/ostest/defconfig
@@ -589,40 +589,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=1
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=1
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/ea3131/pgnsh/defconfig b/nuttx/configs/ea3131/pgnsh/defconfig
index d6643a3f3..f8ffcecb4 100644
--- a/nuttx/configs/ea3131/pgnsh/defconfig
+++ b/nuttx/configs/ea3131/pgnsh/defconfig
@@ -740,40 +740,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=1
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=1
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/ea3131/src/Makefile b/nuttx/configs/ea3131/src/Makefile
index b49619440..685bfd997 100644
--- a/nuttx/configs/ea3131/src/Makefile
+++ b/nuttx/configs/ea3131/src/Makefile
@@ -59,8 +59,8 @@ endif
ifeq ($(CONFIG_PAGING),y)
CSRCS += up_fillpage.c
endif
-ifeq ($(CONFIG_USBSTRG),y)
-CSRCS += up_usbstrg.c
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += up_usbmsc.c
endif
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/nuttx/configs/ea3131/src/up_usbstrg.c b/nuttx/configs/ea3131/src/up_usbmsc.c
index 5aef28733..422ff3603 100644
--- a/nuttx/configs/ea3131/src/up_usbstrg.c
+++ b/nuttx/configs/ea3131/src/up_usbmsc.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * configs/ea3131/src/up_usbstrg.c
+ * configs/ea3131/src/up_usbmsc.c
*
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -56,34 +56,34 @@
/* Configuration ************************************************************/
-#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1
-# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0
+#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1
+# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0
#endif
-#ifndef CONFIG_EXAMPLES_USBSTRG_DEVPATH1
-# define CONFIG_EXAMPLES_USBSTRG_DEVPATH1 "/dev/ram"
+#ifndef CONFIG_EXAMPLES_USBMSC_DEVPATH1
+# define CONFIG_EXAMPLES_USBMSC_DEVPATH1 "/dev/ram"
#endif
-static const char g_source[] = CONFIG_EXAMPLES_USBSTRG_DEVPATH1;
+static const char g_source[] = CONFIG_EXAMPLES_USBMSC_DEVPATH1;
static struct fat_format_s g_fmt = FAT_FORMAT_INITIALIZER;
-#define USBSTRG_NSECTORS 64
-#define USBSTRG_SECTORSIZE 512
-#define BUFFER_SIZE (USBSTRG_NSECTORS*USBSTRG_SECTORSIZE)
+#define USBMSC_NSECTORS 64
+#define USBMSC_SECTORSIZE 512
+#define BUFFER_SIZE (USBMSC_NSECTORS*USBMSC_SECTORSIZE)
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_archinitialize
+ * Name: usbmsc_archinitialize
*
* Description:
* Perform architecture specific initialization
*
****************************************************************************/
-int usbstrg_archinitialize(void)
+int usbmsc_archinitialize(void)
{
uint8_t *pbuffer;
int ret;
@@ -91,17 +91,17 @@ int usbstrg_archinitialize(void)
pbuffer = (uint8_t *) malloc (BUFFER_SIZE);
if (!pbuffer)
{
- lib_lowprintf ("usbstrg_archinitialize: Failed to allocate ramdisk of size %d\n",
+ lib_lowprintf ("usbmsc_archinitialize: Failed to allocate ramdisk of size %d\n",
BUFFER_SIZE);
return -ENOMEM;
}
/* Register a RAMDISK device to manage this RAM image */
- ret = ramdisk_register(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1,
+ ret = ramdisk_register(CONFIG_EXAMPLES_USBMSC_DEVMINOR1,
pbuffer,
- USBSTRG_NSECTORS,
- USBSTRG_SECTORSIZE,
+ USBMSC_NSECTORS,
+ USBMSC_SECTORSIZE,
true);
if (ret < 0)
{
diff --git a/nuttx/configs/ea3131/usbserial/defconfig b/nuttx/configs/ea3131/usbserial/defconfig
index d06212649..5d1023570 100644
--- a/nuttx/configs/ea3131/usbserial/defconfig
+++ b/nuttx/configs/ea3131/usbserial/defconfig
@@ -592,40 +592,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=1
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=512
-CONFIG_USBSTRG_BULKOUTREQLEN=512
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=1
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=512
+CONFIG_USBMSC_BULKOUTREQLEN=512
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -746,45 +746,45 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/ram0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/ram0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/ea3131/usbstorage/defconfig b/nuttx/configs/ea3131/usbstorage/defconfig
index 5dc459316..210384a63 100644
--- a/nuttx/configs/ea3131/usbstorage/defconfig
+++ b/nuttx/configs/ea3131/usbstorage/defconfig
@@ -592,40 +592,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=y
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=1
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=512
-CONFIG_USBSTRG_BULKOUTREQLEN=512
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=y
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=1
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=512
+CONFIG_USBMSC_BULKOUTREQLEN=512
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -746,46 +746,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/ram0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/ram0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/ea3152/ostest/defconfig b/nuttx/configs/ea3152/ostest/defconfig
index 36b716d2b..14496b590 100644
--- a/nuttx/configs/ea3152/ostest/defconfig
+++ b/nuttx/configs/ea3152/ostest/defconfig
@@ -590,40 +590,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=1
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=1
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/ea3152/src/Makefile b/nuttx/configs/ea3152/src/Makefile
index 43b5edcc9..6393f3091 100644
--- a/nuttx/configs/ea3152/src/Makefile
+++ b/nuttx/configs/ea3152/src/Makefile
@@ -59,8 +59,8 @@ endif
ifeq ($(CONFIG_PAGING),y)
CSRCS += up_fillpage.c
endif
-ifeq ($(CONFIG_USBSTRG),y)
-CSRCS += up_usbstrg.c
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += up_usbmsc.c
endif
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/nuttx/configs/ea3152/src/up_usbstrg.c b/nuttx/configs/ea3152/src/up_usbmsc.c
index 9f3a9bf3f..db92e5b9e 100644
--- a/nuttx/configs/ea3152/src/up_usbstrg.c
+++ b/nuttx/configs/ea3152/src/up_usbmsc.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * configs/ea3152/src/up_usbstrg.c
+ * configs/ea3152/src/up_usbmsc.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -56,34 +56,34 @@
/* Configuration ************************************************************/
-#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1
-# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0
+#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1
+# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0
#endif
-#ifndef CONFIG_EXAMPLES_USBSTRG_DEVPATH1
-# define CONFIG_EXAMPLES_USBSTRG_DEVPATH1 "/dev/ram"
+#ifndef CONFIG_EXAMPLES_USBMSC_DEVPATH1
+# define CONFIG_EXAMPLES_USBMSC_DEVPATH1 "/dev/ram"
#endif
-static const char g_source[] = CONFIG_EXAMPLES_USBSTRG_DEVPATH1;
+static const char g_source[] = CONFIG_EXAMPLES_USBMSC_DEVPATH1;
static struct fat_format_s g_fmt = FAT_FORMAT_INITIALIZER;
-#define USBSTRG_NSECTORS 64
-#define USBSTRG_SECTORSIZE 512
-#define BUFFER_SIZE (USBSTRG_NSECTORS*USBSTRG_SECTORSIZE)
+#define USBMSC_NSECTORS 64
+#define USBMSC_SECTORSIZE 512
+#define BUFFER_SIZE (USBMSC_NSECTORS*USBMSC_SECTORSIZE)
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_archinitialize
+ * Name: usbmsc_archinitialize
*
* Description:
* Perform architecture specific initialization
*
****************************************************************************/
-int usbstrg_archinitialize(void)
+int usbmsc_archinitialize(void)
{
uint8_t *pbuffer;
int ret;
@@ -91,17 +91,17 @@ int usbstrg_archinitialize(void)
pbuffer = (uint8_t *) malloc (BUFFER_SIZE);
if (!pbuffer)
{
- lib_lowprintf ("usbstrg_archinitialize: Failed to allocate ramdisk of size %d\n",
+ lib_lowprintf ("usbmsc_archinitialize: Failed to allocate ramdisk of size %d\n",
BUFFER_SIZE);
return -ENOMEM;
}
/* Register a RAMDISK device to manage this RAM image */
- ret = ramdisk_register(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1,
+ ret = ramdisk_register(CONFIG_EXAMPLES_USBMSC_DEVMINOR1,
pbuffer,
- USBSTRG_NSECTORS,
- USBSTRG_SECTORSIZE,
+ USBMSC_NSECTORS,
+ USBMSC_SECTORSIZE,
true);
if (ret < 0)
{
diff --git a/nuttx/configs/ez80f910200kitg/ostest/defconfig b/nuttx/configs/ez80f910200kitg/ostest/defconfig
index 5fea9f7a4..73b289cb8 100644
--- a/nuttx/configs/ez80f910200kitg/ostest/defconfig
+++ b/nuttx/configs/ez80f910200kitg/ostest/defconfig
@@ -501,39 +501,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# CONFIG_NX
diff --git a/nuttx/configs/ez80f910200zco/dhcpd/defconfig b/nuttx/configs/ez80f910200zco/dhcpd/defconfig
index 40cbb674a..3127f86a6 100644
--- a/nuttx/configs/ez80f910200zco/dhcpd/defconfig
+++ b/nuttx/configs/ez80f910200zco/dhcpd/defconfig
@@ -509,39 +509,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# CONFIG_NX
diff --git a/nuttx/configs/ez80f910200zco/httpd/defconfig b/nuttx/configs/ez80f910200zco/httpd/defconfig
index 5e2801348..cf1926dbc 100644
--- a/nuttx/configs/ez80f910200zco/httpd/defconfig
+++ b/nuttx/configs/ez80f910200zco/httpd/defconfig
@@ -509,39 +509,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# CONFIG_NX
diff --git a/nuttx/configs/ez80f910200zco/nettest/defconfig b/nuttx/configs/ez80f910200zco/nettest/defconfig
index 9468c7b5b..6fa22d325 100644
--- a/nuttx/configs/ez80f910200zco/nettest/defconfig
+++ b/nuttx/configs/ez80f910200zco/nettest/defconfig
@@ -509,39 +509,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# CONFIG_NX
diff --git a/nuttx/configs/ez80f910200zco/nsh/defconfig b/nuttx/configs/ez80f910200zco/nsh/defconfig
index 60abb1e77..71f9f758a 100644
--- a/nuttx/configs/ez80f910200zco/nsh/defconfig
+++ b/nuttx/configs/ez80f910200zco/nsh/defconfig
@@ -509,39 +509,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# CONFIG_NX
diff --git a/nuttx/configs/ez80f910200zco/ostest/defconfig b/nuttx/configs/ez80f910200zco/ostest/defconfig
index 7649d22bd..50dec56ba 100644
--- a/nuttx/configs/ez80f910200zco/ostest/defconfig
+++ b/nuttx/configs/ez80f910200zco/ostest/defconfig
@@ -504,39 +504,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# CONFIG_NX
diff --git a/nuttx/configs/ez80f910200zco/poll/defconfig b/nuttx/configs/ez80f910200zco/poll/defconfig
index 133ef6a75..bac05b8a8 100644
--- a/nuttx/configs/ez80f910200zco/poll/defconfig
+++ b/nuttx/configs/ez80f910200zco/poll/defconfig
@@ -509,39 +509,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# CONFIG_NX
diff --git a/nuttx/configs/hymini-stm32v/README.txt b/nuttx/configs/hymini-stm32v/README.txt
index 6ed3bc452..a3241da72 100755
--- a/nuttx/configs/hymini-stm32v/README.txt
+++ b/nuttx/configs/hymini-stm32v/README.txt
@@ -580,7 +580,7 @@ Where <subdir> is one of the following:
long file names in the FAT file system. Please refer to the
details in the top-level COPYING file. Please do not use FAT
long file name unless you are familiar with these patent issues.
- (5) When built as an NSH add-on command (CONFIG_EXAMPLES_USBSTRG_BUILTIN=y),
+ (5) When built as an NSH add-on command (CONFIG_EXAMPLES_USBMSC_BUILTIN=y),
Caution should be used to assure that the SD drive is not in use when
the USB storage device is configured. Specifically, the SD driver
should be unmounted like:
diff --git a/nuttx/configs/hymini-stm32v/buttons/defconfig b/nuttx/configs/hymini-stm32v/buttons/defconfig
index ccfff5a11..908d9eebf 100644
--- a/nuttx/configs/hymini-stm32v/buttons/defconfig
+++ b/nuttx/configs/hymini-stm32v/buttons/defconfig
@@ -673,40 +673,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/hymini-stm32v/nsh/defconfig b/nuttx/configs/hymini-stm32v/nsh/defconfig
index 999cacfa4..d30c40a0b 100755
--- a/nuttx/configs/hymini-stm32v/nsh/defconfig
+++ b/nuttx/configs/hymini-stm32v/nsh/defconfig
@@ -676,40 +676,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/hymini-stm32v/nsh2/defconfig b/nuttx/configs/hymini-stm32v/nsh2/defconfig
index 240d77fc5..8e4963650 100644
--- a/nuttx/configs/hymini-stm32v/nsh2/defconfig
+++ b/nuttx/configs/hymini-stm32v/nsh2/defconfig
@@ -646,40 +646,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=y
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=y
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
@@ -1120,54 +1120,54 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_BUILTIN
+# CONFIG_EXAMPLES_USBMSC_BUILTIN
# This example can be built as two NSH "built-in" commands if this option
# is selection: 'msconn' will connect the USB mass storage device; 'msdis'
# will disconnect the USB storage device.
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEBUGMM
+# CONFIG_EXAMPLES_USBMSC_DEBUGMM
# Enables some debug tests to check for memory usage and memory leaks.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_BUILTIN=y
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_DEBUGMM=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_BUILTIN=y
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_DEBUGMM=n
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
CONFIG_EXAMPLES_LCDTEST_BUILTIN=y
diff --git a/nuttx/configs/hymini-stm32v/nx/defconfig b/nuttx/configs/hymini-stm32v/nx/defconfig
index a392b9461..ab7b9b2ac 100644
--- a/nuttx/configs/hymini-stm32v/nx/defconfig
+++ b/nuttx/configs/hymini-stm32v/nx/defconfig
@@ -692,40 +692,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
diff --git a/nuttx/configs/hymini-stm32v/nxlines/defconfig b/nuttx/configs/hymini-stm32v/nxlines/defconfig
index 1e88a048c..5e3a2e9b0 100644
--- a/nuttx/configs/hymini-stm32v/nxlines/defconfig
+++ b/nuttx/configs/hymini-stm32v/nxlines/defconfig
@@ -696,40 +696,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
diff --git a/nuttx/configs/hymini-stm32v/src/Makefile b/nuttx/configs/hymini-stm32v/src/Makefile
index d79260748..5bb03930a 100644
--- a/nuttx/configs/hymini-stm32v/src/Makefile
+++ b/nuttx/configs/hymini-stm32v/src/Makefile
@@ -55,8 +55,8 @@ ifeq ($(CONFIG_INPUT),y)
CSRCS += up_ts.c
endif
-ifeq ($(CONFIG_USBSTRG),y)
-CSRCS += up_usbstrg.c
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += up_usbmsc.c
endif
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/nuttx/configs/hymini-stm32v/src/up_usbstrg.c b/nuttx/configs/hymini-stm32v/src/up_usbmsc.c
index 8a309c270..1ce55adcc 100644
--- a/nuttx/configs/hymini-stm32v/src/up_usbstrg.c
+++ b/nuttx/configs/hymini-stm32v/src/up_usbmsc.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * configs/hymini-stm32v/src/up_usbstrg.c
+ * configs/hymini-stm32v/src/up_usbmsc.c
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -60,8 +60,8 @@
/* Configuration ************************************************************/
-#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1
-# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0
+#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1
+# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0
#endif
/* SLOT number(s) could depend on the board configuration */
@@ -100,53 +100,53 @@
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_archinitialize
+ * Name: usbmsc_archinitialize
*
* Description:
* Perform architecture specific initialization
*
****************************************************************************/
-int usbstrg_archinitialize(void)
+int usbmsc_archinitialize(void)
{
- /* If examples/usbstrg is built as an NSH command, then SD slot should
+ /* If examples/usbmsc is built as an NSH command, then SD slot should
* already have been initialized in nsh_archinitialize() (see up_nsh.c). In
* this case, there is nothing further to be done here.
*/
-#ifndef CONFIG_EXAMPLES_USBSTRG_BUILTIN
+#ifndef CONFIG_EXAMPLES_USBMSC_BUILTIN
FAR struct sdio_dev_s *sdio;
int ret;
/* First, get an instance of the SDIO interface */
- message("usbstrg_archinitialize: "
+ message("usbmsc_archinitialize: "
"Initializing SDIO slot %d\n",
STM32_MMCSDSLOTNO);
sdio = sdio_initialize(STM32_MMCSDSLOTNO);
if (!sdio)
{
- message("usbstrg_archinitialize: Failed to initialize SDIO slot %d\n",
+ message("usbmsc_archinitialize: Failed to initialize SDIO slot %d\n",
STM32_MMCSDSLOTNO);
return -ENODEV;
}
/* Now bind the SDIO interface to the MMC/SD driver */
- message("usbstrg_archinitialize: "
+ message("usbmsc_archinitialize: "
"Bind SDIO to the MMC/SD driver, minor=%d\n",
- CONFIG_EXAMPLES_USBSTRG_DEVMINOR1);
+ CONFIG_EXAMPLES_USBMSC_DEVMINOR1);
- ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, sdio);
+ ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, sdio);
if (ret != OK)
{
- message("usbstrg_archinitialize: "
+ message("usbmsc_archinitialize: "
"Failed to bind SDIO to the MMC/SD driver: %d\n",
ret);
return ret;
}
- message("usbstrg_archinitialize: "
+ message("usbmsc_archinitialize: "
"Successfully bound SDIO to the MMC/SD driver\n");
/* Then let's guess and say that there is a card in the slot. I need to check to
@@ -156,7 +156,7 @@ int usbstrg_archinitialize(void)
sdio_mediachange(sdio, true);
-#endif /* CONFIG_EXAMPLES_USBSTRG_BUILTIN */
+#endif /* CONFIG_EXAMPLES_USBMSC_BUILTIN */
return OK;
}
diff --git a/nuttx/configs/hymini-stm32v/usbserial/defconfig b/nuttx/configs/hymini-stm32v/usbserial/defconfig
index 33d4033f7..4f087671f 100755
--- a/nuttx/configs/hymini-stm32v/usbserial/defconfig
+++ b/nuttx/configs/hymini-stm32v/usbserial/defconfig
@@ -740,40 +740,40 @@ CONFIG_CDCSER=n
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/hymini-stm32v/usbstorage/defconfig b/nuttx/configs/hymini-stm32v/usbstorage/defconfig
index 43b2c1d8f..5e32895ff 100755
--- a/nuttx/configs/hymini-stm32v/usbstorage/defconfig
+++ b/nuttx/configs/hymini-stm32v/usbstorage/defconfig
@@ -684,40 +684,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=y
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=y
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -844,54 +844,54 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_BUILTIN
+# CONFIG_EXAMPLES_USBMSC_BUILTIN
# This example can be built as two NSH "built-in" commands if this option
# is selection: 'msconn' will connect the USB mass storage device; 'msdis'
# will disconnect the USB storage device.
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEBUGMM
+# CONFIG_EXAMPLES_USBMSC_DEBUGMM
# Enables some debug tests to check for memory usage and memory leaks.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_BUILTIN=n
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_DEBUGMM=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_BUILTIN=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_DEBUGMM=n
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/kwikstik-k40/ostest/defconfig b/nuttx/configs/kwikstik-k40/ostest/defconfig
index 3b0eb3ca0..57ffe91c0 100755
--- a/nuttx/configs/kwikstik-k40/ostest/defconfig
+++ b/nuttx/configs/kwikstik-k40/ostest/defconfig
@@ -733,40 +733,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/kwikstik-k40/src/Makefile b/nuttx/configs/kwikstik-k40/src/Makefile
index 9e0d72258..8c61af8af 100755
--- a/nuttx/configs/kwikstik-k40/src/Makefile
+++ b/nuttx/configs/kwikstik-k40/src/Makefile
@@ -58,8 +58,8 @@ ifeq ($(CONFIG_USBDEV),y)
CSRCS += up_usbdev.c
endif
-ifeq ($(CONFIG_USBSTRG),y)
-CSRCS += up_usbstrg.c
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += up_usbmsc.c
endif
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/nuttx/configs/kwikstik-k40/src/up_usbstrg.c b/nuttx/configs/kwikstik-k40/src/up_usbmsc.c
index d5dcebf7a..378295cfa 100755
--- a/nuttx/configs/kwikstik-k40/src/up_usbstrg.c
+++ b/nuttx/configs/kwikstik-k40/src/up_usbmsc.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * configs/kwikstik-k40/src/up_usbstrg.c
+ * configs/kwikstik-k40/src/up_usbmsc.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -56,8 +56,8 @@
/* Configuration ************************************************************/
-#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1
-# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0
+#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1
+# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0
#endif
/* SLOT number(s) could depend on the board configuration */
@@ -96,23 +96,23 @@
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_archinitialize
+ * Name: usbmsc_archinitialize
*
* Description:
* Perform architecture specific initialization
*
****************************************************************************/
-int usbstrg_archinitialize(void)
+int usbmsc_archinitialize(void)
{
- /* If examples/usbstrg is built as an NSH command, then SD slot should
+ /* If examples/usbmsc is built as an NSH command, then SD slot should
* already have been initized in nsh_archinitialize() (see up_nsh.c). In
* this case, there is nothing further to be done here.
*/
-#ifndef CONFIG_EXAMPLES_USBSTRG_BUILTIN
+#ifndef CONFIG_EXAMPLES_USBMSC_BUILTIN
# warning "Missing logic"
-#endif /* CONFIG_EXAMPLES_USBSTRG_BUILTIN */
+#endif /* CONFIG_EXAMPLES_USBMSC_BUILTIN */
return OK;
}
diff --git a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig
index e60c02c1b..d19ae4538 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig
@@ -668,40 +668,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -843,46 +843,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig
index 9884ec957..add5f015b 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig
@@ -708,40 +708,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -875,46 +875,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig
index c54eec489..043c96398 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/nx/defconfig
@@ -679,40 +679,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
@@ -963,46 +963,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Settings for examples/nx
diff --git a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig
index 0975342d9..9dfaf4c5e 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig
@@ -664,40 +664,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -831,46 +831,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/Makefile b/nuttx/configs/lpcxpresso-lpc1768/src/Makefile
index 6aec64fb6..abc43d41c 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/src/Makefile
+++ b/nuttx/configs/lpcxpresso-lpc1768/src/Makefile
@@ -48,8 +48,8 @@ ifeq ($(CONFIG_NX_LCDDRIVER),y)
CSRCS += up_oled.c
endif
-ifeq ($(CONFIG_USBSTRG),y)
-CSRCS += up_usbstrg.c
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += up_usbmsc.c
endif
AOBJS = $(ASRCS:.S=$(OBJEXT))
diff --git a/nuttx/configs/lpcxpresso-lpc1768/src/up_usbstrg.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c
index 04911d657..d36880122 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/src/up_usbstrg.c
+++ b/nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * configs/lpcxpresso-lpc1768/src/up_usbstrg.c
+ * configs/lpcxpresso-lpc1768/src/up_usbmsc.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -54,8 +54,8 @@
/* Configuration ************************************************************/
-#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1
-# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0
+#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1
+# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0
#endif
/* PORT and SLOT number probably depend on the board configuration */
@@ -96,48 +96,48 @@
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_archinitialize
+ * Name: usbmsc_archinitialize
*
* Description:
* Perform architecture specific initialization
*
****************************************************************************/
-int usbstrg_archinitialize(void)
+int usbmsc_archinitialize(void)
{
FAR struct spi_dev_s *spi;
int ret;
/* Get the SPI port */
- message("usbstrg_archinitialize: Initializing SPI port %d\n",
+ message("usbmsc_archinitialize: Initializing SPI port %d\n",
LPC17XX_MMCSDSPIPORTNO);
spi = up_spiinitialize(LPC17XX_MMCSDSPIPORTNO);
if (!spi)
{
- message("usbstrg_archinitialize: Failed to initialize SPI port %d\n",
+ message("usbmsc_archinitialize: Failed to initialize SPI port %d\n",
LPC17XX_MMCSDSPIPORTNO);
return -ENODEV;
}
- message("usbstrg_archinitialize: Successfully initialized SPI port %d\n",
+ message("usbmsc_archinitialize: Successfully initialized SPI port %d\n",
LPC17XX_MMCSDSPIPORTNO);
/* Bind the SPI port to the slot */
- message("usbstrg_archinitialize: Binding SPI port %d to MMC/SD slot %d\n",
+ message("usbmsc_archinitialize: Binding SPI port %d to MMC/SD slot %d\n",
LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO);
- ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi);
+ ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi);
if (ret < 0)
{
- message("usbstrg_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n",
+ message("usbmsc_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n",
LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO, ret);
return ret;
}
- message("usbstrg_archinitialize: Successfuly bound SPI port %d to MMC/SD slot %d\n",
+ message("usbmsc_archinitialize: Successfuly bound SPI port %d to MMC/SD slot %d\n",
LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO);
return OK;
}
diff --git a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig
index 2c4a25224..62ee77481 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig
@@ -673,40 +673,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# THTTPD settings
@@ -930,46 +930,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig
index 9df689f5c..c2221151a 100755
--- a/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig
+++ b/nuttx/configs/lpcxpresso-lpc1768/usbstorage/defconfig
@@ -653,40 +653,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=y
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=y
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -820,46 +820,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/mbed/hidkbd/defconfig b/nuttx/configs/mbed/hidkbd/defconfig
index ead1cbf3e..322780d84 100644
--- a/nuttx/configs/mbed/hidkbd/defconfig
+++ b/nuttx/configs/mbed/hidkbd/defconfig
@@ -696,40 +696,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/mbed/nsh/defconfig b/nuttx/configs/mbed/nsh/defconfig
index df99bb4ce..1e1b10b3a 100755
--- a/nuttx/configs/mbed/nsh/defconfig
+++ b/nuttx/configs/mbed/nsh/defconfig
@@ -638,40 +638,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/mbed/src/Makefile b/nuttx/configs/mbed/src/Makefile
index ef8c63710..9841a90a5 100755
--- a/nuttx/configs/mbed/src/Makefile
+++ b/nuttx/configs/mbed/src/Makefile
@@ -42,8 +42,8 @@ CSRCS = up_boot.c up_leds.c
ifeq ($(CONFIG_NSH_ARCHINIT),y)
CSRCS += up_nsh.c
endif
-ifeq ($(CONFIG_USBSTRG),y)
-CSRCS += up_usbstrg.c
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += up_usbmsc.c
endif
AOBJS = $(ASRCS:.S=$(OBJEXT))
diff --git a/nuttx/configs/mcu123-lpc214x/nsh/defconfig b/nuttx/configs/mcu123-lpc214x/nsh/defconfig
index 872f8df0a..cfe99367c 100644
--- a/nuttx/configs/mcu123-lpc214x/nsh/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/nsh/defconfig
@@ -500,39 +500,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/ostest
diff --git a/nuttx/configs/mcu123-lpc214x/ostest/defconfig b/nuttx/configs/mcu123-lpc214x/ostest/defconfig
index 06609469e..0d4d5010b 100644
--- a/nuttx/configs/mcu123-lpc214x/ostest/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/ostest/defconfig
@@ -490,39 +490,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/ostest
diff --git a/nuttx/configs/mcu123-lpc214x/src/Makefile b/nuttx/configs/mcu123-lpc214x/src/Makefile
index a69beca5a..93071038b 100644
--- a/nuttx/configs/mcu123-lpc214x/src/Makefile
+++ b/nuttx/configs/mcu123-lpc214x/src/Makefile
@@ -51,8 +51,8 @@ CSRCS = up_spi.c up_leds.c
ifeq ($(CONFIG_NSH_ARCHINIT),y)
CSRCS += up_nsh.c
endif
-ifeq ($(CONFIG_USBSTRG),y)
-CSRCS += up_usbstrg.c
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += up_usbmsc.c
endif
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/nuttx/configs/mcu123-lpc214x/src/up_usbstrg.c b/nuttx/configs/mcu123-lpc214x/src/up_usbmsc.c
index c34a76cc0..f25486d89 100755
--- a/nuttx/configs/mcu123-lpc214x/src/up_usbstrg.c
+++ b/nuttx/configs/mcu123-lpc214x/src/up_usbmsc.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * configs/mcu123-lpc214x/src/up_usbstrg.c
+ * configs/mcu123-lpc214x/src/up_usbmsc.c
*
* Copyright (C) 2008-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -54,8 +54,8 @@
/* Configuration ************************************************************/
-#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1
-# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0
+#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1
+# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0
#endif
/* PORT and SLOT number probably depend on the board configuration */
@@ -96,48 +96,48 @@
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_archinitialize
+ * Name: usbmsc_archinitialize
*
* Description:
* Perform architecture specific initialization
*
****************************************************************************/
-int usbstrg_archinitialize(void)
+int usbmsc_archinitialize(void)
{
FAR struct spi_dev_s *spi;
int ret;
/* Get the SPI port */
- message("usbstrg_archinitialize: Initializing SPI port %d\n",
+ message("usbmsc_archinitialize: Initializing SPI port %d\n",
LPC214X_MMCSDSPIPORTNO);
spi = up_spiinitialize(LPC214X_MMCSDSPIPORTNO);
if (!spi)
{
- message("usbstrg_archinitialize: Failed to initialize SPI port %d\n",
+ message("usbmsc_archinitialize: Failed to initialize SPI port %d\n",
LPC214X_MMCSDSPIPORTNO);
return -ENODEV;
}
- message("usbstrg_archinitialize: Successfully initialized SPI port %d\n",
+ message("usbmsc_archinitialize: Successfully initialized SPI port %d\n",
LPC214X_MMCSDSPIPORTNO);
/* Bind the SPI port to the slot */
- message("usbstrg_archinitialize: Binding SPI port %d to MMC/SD slot %d\n",
+ message("usbmsc_archinitialize: Binding SPI port %d to MMC/SD slot %d\n",
LPC214X_MMCSDSPIPORTNO, LPC214X_MMCSDSLOTNO);
- ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, LPC214X_MMCSDSLOTNO, spi);
+ ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, LPC214X_MMCSDSLOTNO, spi);
if (ret < 0)
{
- message("usbstrg_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n",
+ message("usbmsc_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n",
LPC214X_MMCSDSPIPORTNO, LPC214X_MMCSDSLOTNO, ret);
return ret;
}
- message("usbstrg_archinitialize: Successfuly bound SPI port %d to MMC/SD slot %d\n",
+ message("usbmsc_archinitialize: Successfuly bound SPI port %d to MMC/SD slot %d\n",
LPC214X_MMCSDSPIPORTNO, LPC214X_MMCSDSLOTNO);
return OK;
}
diff --git a/nuttx/configs/mcu123-lpc214x/usbserial/defconfig b/nuttx/configs/mcu123-lpc214x/usbserial/defconfig
index 3a6edf786..8d241576a 100644
--- a/nuttx/configs/mcu123-lpc214x/usbserial/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/usbserial/defconfig
@@ -491,39 +491,39 @@ CONFIG_NXFLAT=n
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/ostest
diff --git a/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig b/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig
index bf0eaba32..98cf9b343 100644
--- a/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/usbstorage/defconfig
@@ -491,16 +491,16 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
# CONFIG_USBSER_EPBULKOUT and CONFIG_USBSER_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
# CONFIG_USBSER_NWRREQS and CONFIG_USBSER_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
@@ -508,22 +508,22 @@ CONFIG_USBSER_TXBUFSIZE=512
# The vendor ID code/string
# CONFIG_USBSER_PRODUCTID and CONFIG_USBSER_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=y
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=y
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/ostest
@@ -615,46 +615,46 @@ CONFIG_EXAMPLES_USBSERIAL_ONLYBIG=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=y
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=y
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=y
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=y
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=y
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=y
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/micropendous3/hello/defconfig b/nuttx/configs/micropendous3/hello/defconfig
index 92d4f8993..818f7c5ad 100644
--- a/nuttx/configs/micropendous3/hello/defconfig
+++ b/nuttx/configs/micropendous3/hello/defconfig
@@ -572,40 +572,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -739,46 +739,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/mx1ads/ostest/defconfig b/nuttx/configs/mx1ads/ostest/defconfig
index 6c19b4a83..afc989ff4 100644
--- a/nuttx/configs/mx1ads/ostest/defconfig
+++ b/nuttx/configs/mx1ads/ostest/defconfig
@@ -471,36 +471,36 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=1
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=1
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/ne64badge/ostest/defconfig b/nuttx/configs/ne64badge/ostest/defconfig
index d7eae861b..aa6c255db 100755
--- a/nuttx/configs/ne64badge/ostest/defconfig
+++ b/nuttx/configs/ne64badge/ostest/defconfig
@@ -593,40 +593,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/ntosd-dm320/nettest/defconfig b/nuttx/configs/ntosd-dm320/nettest/defconfig
index d66cb8dd0..bd62fad04 100644
--- a/nuttx/configs/ntosd-dm320/nettest/defconfig
+++ b/nuttx/configs/ntosd-dm320/nettest/defconfig
@@ -464,39 +464,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=1
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=1
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/ntosd-dm320/nsh/defconfig b/nuttx/configs/ntosd-dm320/nsh/defconfig
index f1f581513..635fe82f5 100644
--- a/nuttx/configs/ntosd-dm320/nsh/defconfig
+++ b/nuttx/configs/ntosd-dm320/nsh/defconfig
@@ -471,39 +471,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=1
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=1
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/ntosd-dm320/ostest/defconfig b/nuttx/configs/ntosd-dm320/ostest/defconfig
index a50d13d09..7d60da4b3 100644
--- a/nuttx/configs/ntosd-dm320/ostest/defconfig
+++ b/nuttx/configs/ntosd-dm320/ostest/defconfig
@@ -459,36 +459,36 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=1
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=1
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/ntosd-dm320/poll/defconfig b/nuttx/configs/ntosd-dm320/poll/defconfig
index 6f82c44ea..55a158eeb 100644
--- a/nuttx/configs/ntosd-dm320/poll/defconfig
+++ b/nuttx/configs/ntosd-dm320/poll/defconfig
@@ -464,39 +464,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=1
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=1
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/poll
diff --git a/nuttx/configs/ntosd-dm320/thttpd/defconfig b/nuttx/configs/ntosd-dm320/thttpd/defconfig
index 9c614beaa..6236bb6f6 100644
--- a/nuttx/configs/ntosd-dm320/thttpd/defconfig
+++ b/nuttx/configs/ntosd-dm320/thttpd/defconfig
@@ -512,39 +512,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=1
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=1
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# THTTPD settings
diff --git a/nuttx/configs/ntosd-dm320/udp/defconfig b/nuttx/configs/ntosd-dm320/udp/defconfig
index 643531c75..b45658827 100644
--- a/nuttx/configs/ntosd-dm320/udp/defconfig
+++ b/nuttx/configs/ntosd-dm320/udp/defconfig
@@ -463,39 +463,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=1
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=1
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/ntosd-dm320/uip/defconfig b/nuttx/configs/ntosd-dm320/uip/defconfig
index 9a747ebde..7f3447798 100644
--- a/nuttx/configs/ntosd-dm320/uip/defconfig
+++ b/nuttx/configs/ntosd-dm320/uip/defconfig
@@ -464,39 +464,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=1
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=1
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for netutils/httpd
diff --git a/nuttx/configs/nucleus2g/nsh/defconfig b/nuttx/configs/nucleus2g/nsh/defconfig
index a5308fd3a..7ea8d34a5 100755
--- a/nuttx/configs/nucleus2g/nsh/defconfig
+++ b/nuttx/configs/nucleus2g/nsh/defconfig
@@ -690,40 +690,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/nucleus2g/ostest/defconfig b/nuttx/configs/nucleus2g/ostest/defconfig
index 16003686e..455a0d7f8 100755
--- a/nuttx/configs/nucleus2g/ostest/defconfig
+++ b/nuttx/configs/nucleus2g/ostest/defconfig
@@ -638,40 +638,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/nucleus2g/src/Makefile b/nuttx/configs/nucleus2g/src/Makefile
index 303bd2b94..42a8b5cd2 100755
--- a/nuttx/configs/nucleus2g/src/Makefile
+++ b/nuttx/configs/nucleus2g/src/Makefile
@@ -42,8 +42,8 @@ CSRCS = up_boot.c up_leds.c up_ssp.c up_outputs.c
ifeq ($(CONFIG_NSH_ARCHINIT),y)
CSRCS += up_nsh.c
endif
-ifeq ($(CONFIG_USBSTRG),y)
-CSRCS += up_usbstrg.c
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += up_usbmsc.c
endif
AOBJS = $(ASRCS:.S=$(OBJEXT))
diff --git a/nuttx/configs/nucleus2g/src/up_usbstrg.c b/nuttx/configs/nucleus2g/src/up_usbmsc.c
index 849611440..c3d074b54 100755
--- a/nuttx/configs/nucleus2g/src/up_usbstrg.c
+++ b/nuttx/configs/nucleus2g/src/up_usbmsc.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * configs/nucleus2g/src/up_usbstrg.c
+ * configs/nucleus2g/src/up_usbmsc.c
*
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -54,8 +54,8 @@
/* Configuration ************************************************************/
-#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1
-# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0
+#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1
+# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0
#endif
/* PORT and SLOT number probably depend on the board configuration */
@@ -96,48 +96,48 @@
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_archinitialize
+ * Name: usbmsc_archinitialize
*
* Description:
* Perform architecture specific initialization
*
****************************************************************************/
-int usbstrg_archinitialize(void)
+int usbmsc_archinitialize(void)
{
FAR struct spi_dev_s *spi;
int ret;
/* Get the SPI port */
- message("usbstrg_archinitialize: Initializing SPI port %d\n",
+ message("usbmsc_archinitialize: Initializing SPI port %d\n",
LPC17XX_MMCSDSPIPORTNO);
spi = up_spiinitialize(LPC17XX_MMCSDSPIPORTNO);
if (!spi)
{
- message("usbstrg_archinitialize: Failed to initialize SPI port %d\n",
+ message("usbmsc_archinitialize: Failed to initialize SPI port %d\n",
LPC17XX_MMCSDSPIPORTNO);
return -ENODEV;
}
- message("usbstrg_archinitialize: Successfully initialized SPI port %d\n",
+ message("usbmsc_archinitialize: Successfully initialized SPI port %d\n",
LPC17XX_MMCSDSPIPORTNO);
/* Bind the SPI port to the slot */
- message("usbstrg_archinitialize: Binding SPI port %d to MMC/SD slot %d\n",
+ message("usbmsc_archinitialize: Binding SPI port %d to MMC/SD slot %d\n",
LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO);
- ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi);
+ ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi);
if (ret < 0)
{
- message("usbstrg_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n",
+ message("usbmsc_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n",
LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO, ret);
return ret;
}
- message("usbstrg_archinitialize: Successfuly bound SPI port %d to MMC/SD slot %d\n",
+ message("usbmsc_archinitialize: Successfuly bound SPI port %d to MMC/SD slot %d\n",
LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO);
return OK;
}
diff --git a/nuttx/configs/nucleus2g/usbserial/defconfig b/nuttx/configs/nucleus2g/usbserial/defconfig
index 4a4d1926f..5be30ccdc 100755
--- a/nuttx/configs/nucleus2g/usbserial/defconfig
+++ b/nuttx/configs/nucleus2g/usbserial/defconfig
@@ -639,40 +639,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -792,45 +792,45 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/nucleus2g/usbstorage/defconfig b/nuttx/configs/nucleus2g/usbstorage/defconfig
index 2ef1c287d..20bfd0811 100755
--- a/nuttx/configs/nucleus2g/usbstorage/defconfig
+++ b/nuttx/configs/nucleus2g/usbstorage/defconfig
@@ -639,40 +639,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=y
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=y
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -792,46 +792,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig
index 5ea9ca17f..aacd2db69 100755
--- a/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/ftpc/defconfig
@@ -759,40 +759,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# THTTPD settings
diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig
index e26511fa8..6f6a50eb0 100755
--- a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig
@@ -742,40 +742,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig
index 5ba14173d..8d99b6a5c 100755
--- a/nuttx/configs/olimex-lpc1766stk/nettest/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/nettest/defconfig
@@ -695,40 +695,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig
index 8dc17a0e2..7c183c44c 100755
--- a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig
@@ -787,40 +787,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/olimex-lpc1766stk/nx/defconfig b/nuttx/configs/olimex-lpc1766stk/nx/defconfig
index 691d3a269..17bbfda44 100755
--- a/nuttx/configs/olimex-lpc1766stk/nx/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/nx/defconfig
@@ -705,40 +705,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
@@ -1039,46 +1039,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Settings for examples/nx
diff --git a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig
index 8a324c171..f6192207d 100755
--- a/nuttx/configs/olimex-lpc1766stk/ostest/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/ostest/defconfig
@@ -686,40 +686,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -875,46 +875,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig
index ef7f29707..1da53655e 100755
--- a/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/slip-httpd/defconfig
@@ -712,40 +712,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# THTTPD settings
diff --git a/nuttx/configs/olimex-lpc1766stk/src/Makefile b/nuttx/configs/olimex-lpc1766stk/src/Makefile
index a2bdab303..1d7e049c6 100755
--- a/nuttx/configs/olimex-lpc1766stk/src/Makefile
+++ b/nuttx/configs/olimex-lpc1766stk/src/Makefile
@@ -44,8 +44,8 @@ ifeq ($(CONFIG_NSH_ARCHINIT),y)
CSRCS += up_nsh.c
endif
-ifeq ($(CONFIG_USBSTRG),y)
-CSRCS += up_usbstrg.c
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += up_usbmsc.c
endif
ifeq ($(CONFIG_NX_LCDDRIVER),y)
diff --git a/nuttx/configs/olimex-lpc1766stk/src/up_usbstrg.c b/nuttx/configs/olimex-lpc1766stk/src/up_usbmsc.c
index c524831fb..b92a9dc9e 100755
--- a/nuttx/configs/olimex-lpc1766stk/src/up_usbstrg.c
+++ b/nuttx/configs/olimex-lpc1766stk/src/up_usbmsc.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * configs/olimex-lpc1766stk/src/up_usbstrg.c
+ * configs/olimex-lpc1766stk/src/up_usbmsc.c
*
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -57,8 +57,8 @@
/* Configuration ************************************************************/
-#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1
-# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0
+#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1
+# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0
#endif
/* PORT and SLOT number probably depend on the board configuration */
@@ -99,14 +99,14 @@
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_archinitialize
+ * Name: usbmsc_archinitialize
*
* Description:
* Perform architecture specific initialization
*
****************************************************************************/
-int usbstrg_archinitialize(void)
+int usbmsc_archinitialize(void)
{
FAR struct spi_dev_s *spi;
int ret;
@@ -117,35 +117,35 @@ int usbstrg_archinitialize(void)
/* Get the SPI port */
- message("usbstrg_archinitialize: Initializing SPI port %d\n",
+ message("usbmsc_archinitialize: Initializing SPI port %d\n",
LPC17XX_MMCSDSPIPORTNO);
spi = up_spiinitialize(LPC17XX_MMCSDSPIPORTNO);
if (!spi)
{
- message("usbstrg_archinitialize: Failed to initialize SPI port %d\n",
+ message("usbmsc_archinitialize: Failed to initialize SPI port %d\n",
LPC17XX_MMCSDSPIPORTNO);
ret = -ENODEV;
goto errout;
}
- message("usbstrg_archinitialize: Successfully initialized SPI port %d\n",
+ message("usbmsc_archinitialize: Successfully initialized SPI port %d\n",
LPC17XX_MMCSDSPIPORTNO);
/* Bind the SPI port to the slot */
- message("usbstrg_archinitialize: Binding SPI port %d to MMC/SD slot %d\n",
+ message("usbmsc_archinitialize: Binding SPI port %d to MMC/SD slot %d\n",
LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO);
- ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi);
+ ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi);
if (ret < 0)
{
- message("usbstrg_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n",
+ message("usbmsc_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n",
LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO, ret);
goto errout;
}
- message("usbstrg_archinitialize: Successfuly bound SPI port %d to MMC/SD slot %d\n",
+ message("usbmsc_archinitialize: Successfuly bound SPI port %d to MMC/SD slot %d\n",
LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO);
return OK;
diff --git a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig
index 46328bdd4..4c74d561f 100755
--- a/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/thttpd/defconfig
@@ -704,40 +704,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# THTTPD settings
diff --git a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig
index d880f0686..f644cc3ad 100755
--- a/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/usbserial/defconfig
@@ -687,40 +687,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -875,46 +875,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig
index d09a2576e..5b23fa431 100755
--- a/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/usbstorage/defconfig
@@ -687,40 +687,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=y
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=y
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -875,46 +875,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig
index 10068605e..203860ec1 100755
--- a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig
@@ -740,40 +740,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/olimex-strp711/nettest/defconfig b/nuttx/configs/olimex-strp711/nettest/defconfig
index 684f20b00..24d516288 100755
--- a/nuttx/configs/olimex-strp711/nettest/defconfig
+++ b/nuttx/configs/olimex-strp711/nettest/defconfig
@@ -596,39 +596,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/nettest
diff --git a/nuttx/configs/olimex-strp711/nsh/defconfig b/nuttx/configs/olimex-strp711/nsh/defconfig
index 6ef24e489..5608c84de 100644
--- a/nuttx/configs/olimex-strp711/nsh/defconfig
+++ b/nuttx/configs/olimex-strp711/nsh/defconfig
@@ -553,39 +553,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/ostest
diff --git a/nuttx/configs/olimex-strp711/ostest/defconfig b/nuttx/configs/olimex-strp711/ostest/defconfig
index d30994270..a3439eb3d 100644
--- a/nuttx/configs/olimex-strp711/ostest/defconfig
+++ b/nuttx/configs/olimex-strp711/ostest/defconfig
@@ -553,39 +553,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/ostest
diff --git a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig
index cb3735cd1..6592a3da2 100644
--- a/nuttx/configs/pcblogic-pic32mx/nsh/defconfig
+++ b/nuttx/configs/pcblogic-pic32mx/nsh/defconfig
@@ -705,40 +705,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -876,46 +876,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig
index 4a07a16d6..babad70e0 100644
--- a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig
+++ b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig
@@ -650,40 +650,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -817,46 +817,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/pic32-starterkit/ostest/defconfig b/nuttx/configs/pic32-starterkit/ostest/defconfig
index 44f28cb42..a9df26cb6 100644
--- a/nuttx/configs/pic32-starterkit/ostest/defconfig
+++ b/nuttx/configs/pic32-starterkit/ostest/defconfig
@@ -737,40 +737,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -904,46 +904,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/sam3u-ek/knsh/defconfig b/nuttx/configs/sam3u-ek/knsh/defconfig
index 5378ec024..20a443a8c 100755
--- a/nuttx/configs/sam3u-ek/knsh/defconfig
+++ b/nuttx/configs/sam3u-ek/knsh/defconfig
@@ -622,40 +622,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
diff --git a/nuttx/configs/sam3u-ek/nsh/defconfig b/nuttx/configs/sam3u-ek/nsh/defconfig
index 8cbbbdcb1..1843829be 100755
--- a/nuttx/configs/sam3u-ek/nsh/defconfig
+++ b/nuttx/configs/sam3u-ek/nsh/defconfig
@@ -592,40 +592,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
diff --git a/nuttx/configs/sam3u-ek/nx/defconfig b/nuttx/configs/sam3u-ek/nx/defconfig
index c50d242e1..a1bd142ee 100755
--- a/nuttx/configs/sam3u-ek/nx/defconfig
+++ b/nuttx/configs/sam3u-ek/nx/defconfig
@@ -601,40 +601,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
diff --git a/nuttx/configs/sam3u-ek/ostest/defconfig b/nuttx/configs/sam3u-ek/ostest/defconfig
index cf4f15024..9be22a3d0 100755
--- a/nuttx/configs/sam3u-ek/ostest/defconfig
+++ b/nuttx/configs/sam3u-ek/ostest/defconfig
@@ -590,40 +590,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
diff --git a/nuttx/configs/sam3u-ek/src/Makefile b/nuttx/configs/sam3u-ek/src/Makefile
index 6c575e2f3..61826cc4a 100644
--- a/nuttx/configs/sam3u-ek/src/Makefile
+++ b/nuttx/configs/sam3u-ek/src/Makefile
@@ -47,8 +47,8 @@ endif
ifeq ($(CONFIG_SAM3U_HSMCI),y)
CSRCS += up_mmcsd.c
endif
-ifeq ($(CONFIG_USBSTRG),y)
-CSRCS += up_usbstrg.c
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += up_usbmsc.c
endif
ifeq ($(CONFIG_INPUT_ADS7843E),y)
CSRCS += up_touchscreen.c
diff --git a/nuttx/configs/sam3u-ek/src/up_usbstrg.c b/nuttx/configs/sam3u-ek/src/up_usbmsc.c
index e758e3b91..8f2e4b254 100644
--- a/nuttx/configs/sam3u-ek/src/up_usbstrg.c
+++ b/nuttx/configs/sam3u-ek/src/up_usbmsc.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * configs/sam3u-ek/src/up_usbstrg.c
+ * configs/sam3u-ek/src/up_usbmsc.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -58,8 +58,8 @@
/* Configuration ************************************************************/
-#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1
-# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0
+#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1
+# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0
#endif
/* SLOT number(s) could depend on the board configuration */
@@ -97,47 +97,47 @@
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_archinitialize
+ * Name: usbmsc_archinitialize
*
* Description:
* Perform architecture specific initialization
*
****************************************************************************/
-int usbstrg_archinitialize(void)
+int usbmsc_archinitialize(void)
{
FAR struct sdio_dev_s *sdio;
int ret;
/* First, get an instance of the SDIO interface */
- message("usbstrg_archinitialize: "
+ message("usbmsc_archinitialize: "
"Initializing SDIO slot %d\n",
SAM3U_MMCSDSLOTNO);
sdio = sdio_initialize(SAM3U_MMCSDSLOTNO);
if (!sdio)
{
- message("usbstrg_archinitialize: Failed to initialize SDIO slot %d\n",
+ message("usbmsc_archinitialize: Failed to initialize SDIO slot %d\n",
SAM3U_MMCSDSLOTNO);
return -ENODEV;
}
/* Now bind the SPI interface to the MMC/SD driver */
- message("usbstrg_archinitialize: "
+ message("usbmsc_archinitialize: "
"Bind SDIO to the MMC/SD driver, minor=%d\n",
- CONFIG_EXAMPLES_USBSTRG_DEVMINOR1);
+ CONFIG_EXAMPLES_USBMSC_DEVMINOR1);
- ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, sdio);
+ ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, sdio);
if (ret != OK)
{
- message("usbstrg_archinitialize: "
+ message("usbmsc_archinitialize: "
"Failed to bind SDIO to the MMC/SD driver: %d\n",
ret);
return ret;
}
- message("usbstrg_archinitialize: "
+ message("usbmsc_archinitialize: "
"Successfully bound SDIO to the MMC/SD driver\n");
/* Then let's guess and say that there is a card in the slot. I need to check to
diff --git a/nuttx/configs/sam3u-ek/touchscreen/defconfig b/nuttx/configs/sam3u-ek/touchscreen/defconfig
index fb5868f58..1ccd55531 100755
--- a/nuttx/configs/sam3u-ek/touchscreen/defconfig
+++ b/nuttx/configs/sam3u-ek/touchscreen/defconfig
@@ -633,40 +633,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
diff --git a/nuttx/configs/skp16c26/ostest/defconfig b/nuttx/configs/skp16c26/ostest/defconfig
index cef59192b..dd3690bf8 100644
--- a/nuttx/configs/skp16c26/ostest/defconfig
+++ b/nuttx/configs/skp16c26/ostest/defconfig
@@ -462,36 +462,36 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=1
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=1
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/stm3210e-eval/README.txt b/nuttx/configs/stm3210e-eval/README.txt
index c9dab1737..1a38bac82 100755
--- a/nuttx/configs/stm3210e-eval/README.txt
+++ b/nuttx/configs/stm3210e-eval/README.txt
@@ -676,7 +676,7 @@ Where <subdir> is one of the following:
long file names in the FAT file system. Please refer to the
details in the top-level COPYING file. Please do not use FAT
long file name unless you are familiar with these patent issues.
- (5) When built as an NSH add-on command (CONFIG_EXAMPLES_USBSTRG_BUILTIN=y),
+ (5) When built as an NSH add-on command (CONFIG_EXAMPLES_USBMSC_BUILTIN=y),
Caution should be used to assure that the SD drive is not in use when
the USB storage device is configured. Specifically, the SD driver
should be unmounted like:
diff --git a/nuttx/configs/stm3210e-eval/RIDE/defconfig b/nuttx/configs/stm3210e-eval/RIDE/defconfig
index f47f40bf3..8922e584e 100755
--- a/nuttx/configs/stm3210e-eval/RIDE/defconfig
+++ b/nuttx/configs/stm3210e-eval/RIDE/defconfig
@@ -685,40 +685,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/stm3210e-eval/buttons/defconfig b/nuttx/configs/stm3210e-eval/buttons/defconfig
index 7a1e4d78d..d311435e3 100644
--- a/nuttx/configs/stm3210e-eval/buttons/defconfig
+++ b/nuttx/configs/stm3210e-eval/buttons/defconfig
@@ -698,40 +698,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/stm3210e-eval/nsh/defconfig b/nuttx/configs/stm3210e-eval/nsh/defconfig
index 8e1e1f848..6b32d2094 100755
--- a/nuttx/configs/stm3210e-eval/nsh/defconfig
+++ b/nuttx/configs/stm3210e-eval/nsh/defconfig
@@ -701,40 +701,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/stm3210e-eval/nsh2/defconfig b/nuttx/configs/stm3210e-eval/nsh2/defconfig
index 9a3c62ecc..48081b0d3 100644
--- a/nuttx/configs/stm3210e-eval/nsh2/defconfig
+++ b/nuttx/configs/stm3210e-eval/nsh2/defconfig
@@ -805,44 +805,44 @@ CONFIG_CDCSER_COMPOSITE=y
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_COMPOSITE
+# CONFIG_USBMSC_COMPOSITE
# Configure the mass storage driver as part of a composite driver
# (only if CONFIG_USBDEV_COMPOSITE is also defined)
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=y
-CONFIG_USBSTRG_COMPOSITE=y
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=y
+CONFIG_USBMSC_COMPOSITE=y
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
@@ -1293,54 +1293,54 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_BUILTIN
+# CONFIG_EXAMPLES_USBMSC_BUILTIN
# This example can be built as two NSH "built-in" commands if this option
# is selection: 'msconn' will connect the USB mass storage device; 'msdis'
# will disconnect the USB storage device.
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEBUGMM
+# CONFIG_EXAMPLES_USBMSC_DEBUGMM
# Enables some debug tests to check for memory usage and memory leaks.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_BUILTIN=y
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_DEBUGMM=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_BUILTIN=y
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_DEBUGMM=n
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/stm3210e-eval/nx/defconfig b/nuttx/configs/stm3210e-eval/nx/defconfig
index 94d843fb9..9970b27a5 100644
--- a/nuttx/configs/stm3210e-eval/nx/defconfig
+++ b/nuttx/configs/stm3210e-eval/nx/defconfig
@@ -717,40 +717,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
diff --git a/nuttx/configs/stm3210e-eval/nxlines/defconfig b/nuttx/configs/stm3210e-eval/nxlines/defconfig
index 0ed46b6ad..f21b4fbef 100644
--- a/nuttx/configs/stm3210e-eval/nxlines/defconfig
+++ b/nuttx/configs/stm3210e-eval/nxlines/defconfig
@@ -717,40 +717,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
diff --git a/nuttx/configs/stm3210e-eval/nxtext/defconfig b/nuttx/configs/stm3210e-eval/nxtext/defconfig
index e48a147c9..036c73ac3 100644
--- a/nuttx/configs/stm3210e-eval/nxtext/defconfig
+++ b/nuttx/configs/stm3210e-eval/nxtext/defconfig
@@ -717,40 +717,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
diff --git a/nuttx/configs/stm3210e-eval/ostest/defconfig b/nuttx/configs/stm3210e-eval/ostest/defconfig
index 14a3542db..ca1ea021a 100755
--- a/nuttx/configs/stm3210e-eval/ostest/defconfig
+++ b/nuttx/configs/stm3210e-eval/ostest/defconfig
@@ -721,40 +721,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/stm3210e-eval/src/Makefile b/nuttx/configs/stm3210e-eval/src/Makefile
index e949e7208..7c93a2d32 100644
--- a/nuttx/configs/stm3210e-eval/src/Makefile
+++ b/nuttx/configs/stm3210e-eval/src/Makefile
@@ -56,8 +56,8 @@ ifeq ($(CONFIG_ADC),y)
CSRCS += up_adc.c
endif
-ifeq ($(CONFIG_USBSTRG),y)
-CSRCS += up_usbstrg.c
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += up_usbmsc.c
endif
ifeq ($(CONFIG_I2C_LM75),y)
diff --git a/nuttx/configs/stm3210e-eval/src/up_usbstrg.c b/nuttx/configs/stm3210e-eval/src/up_usbmsc.c
index f7ba205cc..4f788579c 100644
--- a/nuttx/configs/stm3210e-eval/src/up_usbstrg.c
+++ b/nuttx/configs/stm3210e-eval/src/up_usbmsc.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * configs/stm3210e-eval/src/up_usbstrg.c
+ * configs/stm3210e-eval/src/up_usbmsc.c
*
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -60,8 +60,8 @@
/* Configuration ************************************************************/
-#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1
-# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0
+#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1
+# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0
#endif
/* SLOT number(s) could depend on the board configuration */
@@ -100,53 +100,53 @@
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_archinitialize
+ * Name: usbmsc_archinitialize
*
* Description:
* Perform architecture specific initialization
*
****************************************************************************/
-int usbstrg_archinitialize(void)
+int usbmsc_archinitialize(void)
{
- /* If examples/usbstrg is built as an NSH command, then SD slot should
+ /* If examples/usbmsc is built as an NSH command, then SD slot should
* already have been initized in nsh_archinitialize() (see up_nsh.c). In
* this case, there is nothing further to be done here.
*/
-#ifndef CONFIG_EXAMPLES_USBSTRG_BUILTIN
+#ifndef CONFIG_EXAMPLES_USBMSC_BUILTIN
FAR struct sdio_dev_s *sdio;
int ret;
/* First, get an instance of the SDIO interface */
- message("usbstrg_archinitialize: "
+ message("usbmsc_archinitialize: "
"Initializing SDIO slot %d\n",
STM32_MMCSDSLOTNO);
sdio = sdio_initialize(STM32_MMCSDSLOTNO);
if (!sdio)
{
- message("usbstrg_archinitialize: Failed to initialize SDIO slot %d\n",
+ message("usbmsc_archinitialize: Failed to initialize SDIO slot %d\n",
STM32_MMCSDSLOTNO);
return -ENODEV;
}
/* Now bind the SDIO interface to the MMC/SD driver */
- message("usbstrg_archinitialize: "
+ message("usbmsc_archinitialize: "
"Bind SDIO to the MMC/SD driver, minor=%d\n",
- CONFIG_EXAMPLES_USBSTRG_DEVMINOR1);
+ CONFIG_EXAMPLES_USBMSC_DEVMINOR1);
- ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, sdio);
+ ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, sdio);
if (ret != OK)
{
- message("usbstrg_archinitialize: "
+ message("usbmsc_archinitialize: "
"Failed to bind SDIO to the MMC/SD driver: %d\n",
ret);
return ret;
}
- message("usbstrg_archinitialize: "
+ message("usbmsc_archinitialize: "
"Successfully bound SDIO to the MMC/SD driver\n");
/* Then let's guess and say that there is a card in the slot. I need to check to
@@ -156,7 +156,7 @@ int usbstrg_archinitialize(void)
sdio_mediachange(sdio, true);
-#endif /* CONFIG_EXAMPLES_USBSTRG_BUILTIN */
+#endif /* CONFIG_EXAMPLES_USBMSC_BUILTIN */
return OK;
}
diff --git a/nuttx/configs/stm3210e-eval/usbserial/defconfig b/nuttx/configs/stm3210e-eval/usbserial/defconfig
index 02ff773ad..a6ebfe756 100755
--- a/nuttx/configs/stm3210e-eval/usbserial/defconfig
+++ b/nuttx/configs/stm3210e-eval/usbserial/defconfig
@@ -771,44 +771,44 @@ CONFIG_CDCSER_COMPOSITE=y
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_COMPOSITE
+# CONFIG_USBMSC_COMPOSITE
# Configure the mass storage driver as part of a composite driver
# (only if CONFIG_USBDEV_COMPOSITE is also defined)
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_COMPOSITE=y
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_COMPOSITE=y
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/stm3210e-eval/usbstorage/defconfig b/nuttx/configs/stm3210e-eval/usbstorage/defconfig
index 9d4557ab9..ad082b9d6 100755
--- a/nuttx/configs/stm3210e-eval/usbstorage/defconfig
+++ b/nuttx/configs/stm3210e-eval/usbstorage/defconfig
@@ -708,40 +708,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=y
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=y
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -868,54 +868,54 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_BUILTIN
+# CONFIG_EXAMPLES_USBMSC_BUILTIN
# This example can be built as two NSH "built-in" commands if this option
# is selection: 'msconn' will connect the USB mass storage device; 'msdis'
# will disconnect the USB storage device.
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEBUGMM
+# CONFIG_EXAMPLES_USBMSC_DEBUGMM
# Enables some debug tests to check for memory usage and memory leaks.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_BUILTIN=n
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_DEBUGMM=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_BUILTIN=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_DEBUGMM=n
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/stm3240g-eval/dhcpd/defconfig b/nuttx/configs/stm3240g-eval/dhcpd/defconfig
index f42eed44e..0a54d9bfb 100755
--- a/nuttx/configs/stm3240g-eval/dhcpd/defconfig
+++ b/nuttx/configs/stm3240g-eval/dhcpd/defconfig
@@ -893,40 +893,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
diff --git a/nuttx/configs/stm3240g-eval/nettest/defconfig b/nuttx/configs/stm3240g-eval/nettest/defconfig
index c608c7743..4c1e89205 100755
--- a/nuttx/configs/stm3240g-eval/nettest/defconfig
+++ b/nuttx/configs/stm3240g-eval/nettest/defconfig
@@ -893,40 +893,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig
index c44ac4165..202d3e34c 100755
--- a/nuttx/configs/stm3240g-eval/nsh/defconfig
+++ b/nuttx/configs/stm3240g-eval/nsh/defconfig
@@ -938,40 +938,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
diff --git a/nuttx/configs/stm3240g-eval/ostest/defconfig b/nuttx/configs/stm3240g-eval/ostest/defconfig
index 32e64d7d8..502dacde7 100755
--- a/nuttx/configs/stm3240g-eval/ostest/defconfig
+++ b/nuttx/configs/stm3240g-eval/ostest/defconfig
@@ -855,40 +855,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
@@ -1421,54 +1421,54 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_BUILTIN
+# CONFIG_EXAMPLES_USBMSC_BUILTIN
# This example can be built as two NSH "built-in" commands if this option
# is selection: 'msconn' will connect the USB mass storage device; 'msdis'
# will disconnect the USB storage device.
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEBUGMM
+# CONFIG_EXAMPLES_USBMSC_DEBUGMM
# Enables some debug tests to check for memory usage and memory leaks.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_BUILTIN=y
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_DEBUGMM=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_BUILTIN=y
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_DEBUGMM=n
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/stm32f4discovery/nsh/defconfig b/nuttx/configs/stm32f4discovery/nsh/defconfig
index abf1b8bbc..6b46e992e 100755
--- a/nuttx/configs/stm32f4discovery/nsh/defconfig
+++ b/nuttx/configs/stm32f4discovery/nsh/defconfig
@@ -892,40 +892,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
diff --git a/nuttx/configs/stm32f4discovery/ostest/defconfig b/nuttx/configs/stm32f4discovery/ostest/defconfig
index 57cd9129f..2aed2d640 100755
--- a/nuttx/configs/stm32f4discovery/ostest/defconfig
+++ b/nuttx/configs/stm32f4discovery/ostest/defconfig
@@ -845,40 +845,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Graphics related configuration settings
@@ -1392,54 +1392,54 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_BUILTIN
+# CONFIG_EXAMPLES_USBMSC_BUILTIN
# This example can be built as two NSH "built-in" commands if this option
# is selection: 'msconn' will connect the USB mass storage device; 'msdis'
# will disconnect the USB storage device.
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEBUGMM
+# CONFIG_EXAMPLES_USBMSC_DEBUGMM
# Enables some debug tests to check for memory usage and memory leaks.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_BUILTIN=n
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_DEBUGMM=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_BUILTIN=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_DEBUGMM=n
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/sure-pic32mx/nsh/defconfig b/nuttx/configs/sure-pic32mx/nsh/defconfig
index c4608022b..1b214cee6 100644
--- a/nuttx/configs/sure-pic32mx/nsh/defconfig
+++ b/nuttx/configs/sure-pic32mx/nsh/defconfig
@@ -778,40 +778,40 @@ CONFIG_CDCSER=n
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -949,46 +949,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Settings for examples/usbterm
diff --git a/nuttx/configs/sure-pic32mx/ostest/defconfig b/nuttx/configs/sure-pic32mx/ostest/defconfig
index 0f9a6335c..3e9682100 100644
--- a/nuttx/configs/sure-pic32mx/ostest/defconfig
+++ b/nuttx/configs/sure-pic32mx/ostest/defconfig
@@ -650,40 +650,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -817,46 +817,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/teensy/hello/defconfig b/nuttx/configs/teensy/hello/defconfig
index de820d7fb..22eb080c4 100644
--- a/nuttx/configs/teensy/hello/defconfig
+++ b/nuttx/configs/teensy/hello/defconfig
@@ -572,40 +572,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -739,46 +739,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/teensy/nsh/defconfig b/nuttx/configs/teensy/nsh/defconfig
index 259186552..40bd7d721 100755
--- a/nuttx/configs/teensy/nsh/defconfig
+++ b/nuttx/configs/teensy/nsh/defconfig
@@ -601,40 +601,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/teensy/src/Makefile b/nuttx/configs/teensy/src/Makefile
index e27f02663..36e887b74 100755
--- a/nuttx/configs/teensy/src/Makefile
+++ b/nuttx/configs/teensy/src/Makefile
@@ -41,8 +41,8 @@ CSRCS = up_boot.c
ifeq ($(CONFIG_ARCH_LEDS),y)
CSRCS += up_leds.c
endif
-ifeq ($(CONFIG_USBSTRG),y)
-CSRCS += up_usbstrg.c
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += up_usbmsc.c
endif
ifeq ($(CONFIG_AVR_SPI),y)
CSRCS += up_spi.c
diff --git a/nuttx/configs/teensy/src/up_usbstrg.c b/nuttx/configs/teensy/src/up_usbmsc.c
index acc8cb071..7eb3307c6 100755
--- a/nuttx/configs/teensy/src/up_usbstrg.c
+++ b/nuttx/configs/teensy/src/up_usbmsc.c
@@ -1,6 +1,6 @@
/****************************************************************************
- * configs/teensy/src/up_usbstrg.c
- * arch/arm/src/board/up_usbstrg.c
+ * configs/teensy/src/up_usbmsc.c
+ * arch/arm/src/board/up_usbmsc.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -58,8 +58,8 @@
/* Configuration ************************************************************/
-#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1
-# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0
+#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1
+# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0
#endif
/* PORT and SLOT number probably depend on the board configuration */
@@ -99,14 +99,14 @@
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_archinitialize
+ * Name: usbmsc_archinitialize
*
* Description:
* Perform architecture specific initialization
*
****************************************************************************/
-int usbstrg_archinitialize(void)
+int usbmsc_archinitialize(void)
{
FAR struct spi_dev_s *spi;
int ret;
@@ -126,7 +126,7 @@ int usbstrg_archinitialize(void)
message("Binding SPI port to MMC/SD slot\n");
- ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, AVR_MMCSDSLOTNO, spi);
+ ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, AVR_MMCSDSLOTNO, spi);
if (ret < 0)
{
message("mmcsd_spislotinitialize failed: %d\n", ret);
diff --git a/nuttx/configs/teensy/usbstorage/defconfig b/nuttx/configs/teensy/usbstorage/defconfig
index 591eaf191..75d92a06c 100755
--- a/nuttx/configs/teensy/usbstorage/defconfig
+++ b/nuttx/configs/teensy/usbstorage/defconfig
@@ -605,40 +605,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=y
-CONFIG_USBSTRG_EP0MAXPACKET=8
-CONFIG_USBSTRG_EPBULKOUT=1
-CONFIG_USBSTRG_EPBULKIN=2
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=64
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=y
+CONFIG_USBMSC_EP0MAXPACKET=8
+CONFIG_USBMSC_EPBULKOUT=1
+CONFIG_USBMSC_EPBULKIN=2
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=64
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
@@ -771,46 +771,46 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-# CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_NLUNS
# 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_USBSTRG_DEVMINOR1
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR1
# 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_USBSTRG_DEVPATH1
+# CONFIG_EXAMPLES_USBMSC_DEVPATH1
# The full path to the registered block driver. Default is "/dev/mmcsd0"
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR2 and CONFIG_EXAMPLES_USBSTRG_DEVPATH2
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR2 and CONFIG_EXAMPLES_USBMSC_DEVPATH2
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 2 or 3. No defaults.
-# CONFIG_EXAMPLES_USBSTRG_DEVMINOR3 and CONFIG_EXAMPLES_USBSTRG_DEVPATH3
-# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBSTRG_NLUNS
+# CONFIG_EXAMPLES_USBMSC_DEVMINOR3 and CONFIG_EXAMPLES_USBMSC_DEVPATH3
+# Similar parameters that would have to be provided if CONFIG_EXAMPLES_USBMSC_NLUNS
# is 3. No defaults.
#
# If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then
# the example code will also manage the USB trace output. The amount of trace output
# can be controlled using:
#
-# CONFIG_EXAMPLES_USBSTRG_TRACEINIT
+# CONFIG_EXAMPLES_USBMSC_TRACEINIT
# Show initialization events
-# CONFIG_EXAMPLES_USBSTRG_TRACECLASS
+# CONFIG_EXAMPLES_USBMSC_TRACECLASS
# Show class driver events
-# CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS
+# CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS
# Show data transfer events
-# CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER
+# CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER
# Show controller events
-# CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS
+# CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS
# Show interrupt-related events.
#
-CONFIG_EXAMPLES_USBSTRG_NLUNS=1
-CONFIG_EXAMPLES_USBSTRG_DEVMINOR1=0
-CONFIG_EXAMPLES_USBSTRG_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBSTRG_TRACEINIT=n
-CONFIG_EXAMPLES_USBSTRG_TRACECLASS=n
-CONFIG_EXAMPLES_USBSTRG_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSTRG_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSTRG_TRACEINTERRUPTS=n
+CONFIG_EXAMPLES_USBMSC_NLUNS=1
+CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
+CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
+CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
+CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
+CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
+CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
+CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Stack and heap information
diff --git a/nuttx/configs/twr-k60n512/nsh/defconfig b/nuttx/configs/twr-k60n512/nsh/defconfig
index dda77f50f..c5fcce6c6 100644
--- a/nuttx/configs/twr-k60n512/nsh/defconfig
+++ b/nuttx/configs/twr-k60n512/nsh/defconfig
@@ -735,40 +735,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/twr-k60n512/ostest/defconfig b/nuttx/configs/twr-k60n512/ostest/defconfig
index 2c3f84536..7b1008172 100644
--- a/nuttx/configs/twr-k60n512/ostest/defconfig
+++ b/nuttx/configs/twr-k60n512/ostest/defconfig
@@ -733,40 +733,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/twr-k60n512/src/Makefile b/nuttx/configs/twr-k60n512/src/Makefile
index 4a5e743b7..18a9c118f 100644
--- a/nuttx/configs/twr-k60n512/src/Makefile
+++ b/nuttx/configs/twr-k60n512/src/Makefile
@@ -58,8 +58,8 @@ ifeq ($(CONFIG_USBDEV),y)
CSRCS += up_usbdev.c
endif
-ifeq ($(CONFIG_USBSTRG),y)
-CSRCS += up_usbstrg.c
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += up_usbmsc.c
endif
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/nuttx/configs/twr-k60n512/src/up_usbstrg.c b/nuttx/configs/twr-k60n512/src/up_usbmsc.c
index cdc373205..bebedd02f 100644
--- a/nuttx/configs/twr-k60n512/src/up_usbstrg.c
+++ b/nuttx/configs/twr-k60n512/src/up_usbmsc.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * configs/twr-k60n512/src/up_usbstrg.c
+ * configs/twr-k60n512/src/up_usbmsc.c
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -56,8 +56,8 @@
/* Configuration ************************************************************/
-#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1
-# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0
+#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1
+# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0
#endif
/* SLOT number(s) could depend on the board configuration */
@@ -96,23 +96,23 @@
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_archinitialize
+ * Name: usbmsc_archinitialize
*
* Description:
* Perform architecture specific initialization
*
****************************************************************************/
-int usbstrg_archinitialize(void)
+int usbmsc_archinitialize(void)
{
- /* If examples/usbstrg is built as an NSH command, then SD slot should
+ /* If examples/usbmsc is built as an NSH command, then SD slot should
* already have been initized in nsh_archinitialize() (see up_nsh.c). In
* this case, there is nothing further to be done here.
*/
-#ifndef CONFIG_EXAMPLES_USBSTRG_BUILTIN
+#ifndef CONFIG_EXAMPLES_USBMSC_BUILTIN
# warning "Missing logic"
-#endif /* CONFIG_EXAMPLES_USBSTRG_BUILTIN */
+#endif /* CONFIG_EXAMPLES_USBMSC_BUILTIN */
return OK;
}
diff --git a/nuttx/configs/us7032evb1/nsh/defconfig b/nuttx/configs/us7032evb1/nsh/defconfig
index eab7e1ca6..31ac3ecca 100644
--- a/nuttx/configs/us7032evb1/nsh/defconfig
+++ b/nuttx/configs/us7032evb1/nsh/defconfig
@@ -474,39 +474,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/ostest
diff --git a/nuttx/configs/us7032evb1/ostest/defconfig b/nuttx/configs/us7032evb1/ostest/defconfig
index 81f205372..bc9c20525 100644
--- a/nuttx/configs/us7032evb1/ostest/defconfig
+++ b/nuttx/configs/us7032evb1/ostest/defconfig
@@ -474,39 +474,39 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/ostest
diff --git a/nuttx/configs/vsn/nsh/defconfig b/nuttx/configs/vsn/nsh/defconfig
index 7c9a4ce68..9d21c4b86 100755
--- a/nuttx/configs/vsn/nsh/defconfig
+++ b/nuttx/configs/vsn/nsh/defconfig
@@ -699,40 +699,40 @@ CONFIG_USBSER_TXBUFSIZE=512
#
# USB Storage Device Configuration
#
-# CONFIG_USBSTRG
+# CONFIG_USBMSC
# Enable compilation of the USB storage driver
-# CONFIG_USBSTRG_EP0MAXPACKET
+# CONFIG_USBMSC_EP0MAXPACKET
# Max packet size for endpoint 0
-# CONFIG_USBSTRG_EPBULKOUT and CONFIG_USBSTRG_EPBULKIN
+# CONFIG_USBMSC_EPBULKOUT and CONFIG_USBMSC_EPBULKIN
# The logical 7-bit address of a hardware endpoints that support
# bulk OUT and IN operations
-# CONFIG_USBSTRG_NWRREQS and CONFIG_USBSTRG_NRDREQS
+# CONFIG_USBMSC_NWRREQS and CONFIG_USBMSC_NRDREQS
# The number of write/read requests that can be in flight
-# CONFIG_USBSTRG_BULKINREQLEN and CONFIG_USBSTRG_BULKOUTREQLEN
+# CONFIG_USBMSC_BULKINREQLEN and CONFIG_USBMSC_BULKOUTREQLEN
# The size of the buffer in each write/read request. This
# value needs to be at least as large as the endpoint
# maxpacket and ideally as large as a block device sector.
-# CONFIG_USBSTRG_VENDORID and CONFIG_USBSTRG_VENDORSTR
+# CONFIG_USBMSC_VENDORID and CONFIG_USBMSC_VENDORSTR
# The vendor ID code/string
-# CONFIG_USBSTRG_PRODUCTID and CONFIG_USBSTRG_PRODUCTSTR
+# CONFIG_USBMSC_PRODUCTID and CONFIG_USBMSC_PRODUCTSTR
# The product ID code/string
-# CONFIG_USBSTRG_REMOVABLE
+# CONFIG_USBMSC_REMOVABLE
# Select if the media is removable
#
-CONFIG_USBSTRG=n
-CONFIG_USBSTRG_EP0MAXPACKET=64
-CONFIG_USBSTRG_EPBULKOUT=2
-CONFIG_USBSTRG_EPBULKIN=5
-CONFIG_USBSTRG_NRDREQS=2
-CONFIG_USBSTRG_NWRREQS=2
-CONFIG_USBSTRG_BULKINREQLEN=256
-CONFIG_USBSTRG_BULKOUTREQLEN=256
-CONFIG_USBSTRG_VENDORID=0x584e
-CONFIG_USBSTRG_VENDORSTR="NuttX"
-CONFIG_USBSTRG_PRODUCTID=0x5342
-CONFIG_USBSTRG_PRODUCTSTR="USBdev Storage"
-CONFIG_USBSTRG_VERSIONNO=0x0399
-CONFIG_USBSTRG_REMOVABLE=y
+CONFIG_USBMSC=n
+CONFIG_USBMSC_EP0MAXPACKET=64
+CONFIG_USBMSC_EPBULKOUT=2
+CONFIG_USBMSC_EPBULKIN=5
+CONFIG_USBMSC_NRDREQS=2
+CONFIG_USBMSC_NWRREQS=2
+CONFIG_USBMSC_BULKINREQLEN=256
+CONFIG_USBMSC_BULKOUTREQLEN=256
+CONFIG_USBMSC_VENDORID=0x584e
+CONFIG_USBMSC_VENDORSTR="NuttX"
+CONFIG_USBMSC_PRODUCTID=0x5342
+CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
+CONFIG_USBMSC_VERSIONNO=0x0399
+CONFIG_USBMSC_REMOVABLE=y
#
# Settings for examples/uip
diff --git a/nuttx/configs/vsn/src/Makefile b/nuttx/configs/vsn/src/Makefile
index ec360f8f6..03559cb4a 100644
--- a/nuttx/configs/vsn/src/Makefile
+++ b/nuttx/configs/vsn/src/Makefile
@@ -55,8 +55,8 @@ AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = sysclock.c boot.c leds.c buttons.c spi.c \
usbdev.c power.c muxbus.c sif.c
-ifeq ($(CONFIG_USBSTRG),y)
-CSRCS += usbstrg.c
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += usbmsc.c
endif
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/nuttx/configs/vsn/src/usbstrg.c b/nuttx/configs/vsn/src/usbmsc.c
index 0942ae8e5..264ae77a6 100644
--- a/nuttx/configs/vsn/src/usbstrg.c
+++ b/nuttx/configs/vsn/src/usbmsc.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * configs/vsn/src/usbstrg.c
+ * configs/vsn/src/usbmsc.c
*
* Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Copyright (c) 2011 Uros Platise. All rights reserved.
@@ -61,8 +61,8 @@
/* Configuration ************************************************************/
-#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1
-# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0
+#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1
+# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0
#endif
/* SLOT number(s) could depend on the board configuration */
@@ -101,47 +101,47 @@
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_archinitialize
+ * Name: usbmsc_archinitialize
*
* Description:
* Perform architecture specific initialization
*
****************************************************************************/
-int usbstrg_archinitialize(void)
+int usbmsc_archinitialize(void)
{
FAR struct sdio_dev_s *sdio;
int ret;
/* First, get an instance of the SDIO interface */
- message("usbstrg_archinitialize: "
+ message("usbmsc_archinitialize: "
"Initializing SDIO slot %d\n",
STM32_MMCSDSLOTNO);
sdio = sdio_initialize(STM32_MMCSDSLOTNO);
if (!sdio)
{
- message("usbstrg_archinitialize: Failed to initialize SDIO slot %d\n",
+ message("usbmsc_archinitialize: Failed to initialize SDIO slot %d\n",
STM32_MMCSDSLOTNO);
return -ENODEV;
}
/* Now bind the SPI interface to the MMC/SD driver */
- message("usbstrg_archinitialize: "
+ message("usbmsc_archinitialize: "
"Bind SDIO to the MMC/SD driver, minor=%d\n",
- CONFIG_EXAMPLES_USBSTRG_DEVMINOR1);
+ CONFIG_EXAMPLES_USBMSC_DEVMINOR1);
- ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, sdio);
+ ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, sdio);
if (ret != OK)
{
- message("usbstrg_archinitialize: "
+ message("usbmsc_archinitialize: "
"Failed to bind SDIO to the MMC/SD driver: %d\n",
ret);
return ret;
}
- message("usbstrg_archinitialize: "
+ message("usbmsc_archinitialize: "
"Successfully bound SDIO to the MMC/SD driver\n");
/* Then let's guess and say that there is a card in the slot. I need to check to
diff --git a/nuttx/drivers/usbdev/Make.defs b/nuttx/drivers/usbdev/Make.defs
index 348799849..66c3b3dd5 100644
--- a/nuttx/drivers/usbdev/Make.defs
+++ b/nuttx/drivers/usbdev/Make.defs
@@ -45,7 +45,7 @@ ifeq ($(CONFIG_CDCSER),y)
CSRCS += cdcacm.c cdcacm_descriptors.c
endif
-ifeq ($(CONFIG_USBSTRG),y)
+ifeq ($(CONFIG_USBMSC),y)
CSRCS += msc.c msc_descriptors.c msc_scsi.c
endif
diff --git a/nuttx/drivers/usbdev/composite.h b/nuttx/drivers/usbdev/composite.h
index 14cbd9db8..93f91f180 100644
--- a/nuttx/drivers/usbdev/composite.h
+++ b/nuttx/drivers/usbdev/composite.h
@@ -55,7 +55,7 @@
# include "cdcacm.h"
#endif
-#ifdef CONFIG_USBSTRG_COMPOSITE
+#ifdef CONFIG_USBMSC_COMPOSITE
# include "msc.h"
#endif
@@ -114,18 +114,18 @@
/* Constituent devices ******************************************************/
-#undef DEV1_IS_CDCSERIAL
-#undef DEV1_IS_USBSTRG
+#undef DEV1_IS_CDCACM
+#undef DEV1_IS_USBMSC
-#undef DEV2_IS_CDCSERIAL
-#undef DEV2_IS_USBSTRG
+#undef DEV2_IS_CDCACM
+#undef DEV2_IS_USBMSC
/* Pick the first device in the composite. At present, this may only be
* the CDC serial device or the mass storage device.
*/
#if defined(CONFIG_CDCSER_COMPOSITE)
-# define DEV1_IS_CDCSERIAL 1
+# define DEV1_IS_CDCACM 1
# define DEV1_MKCFGDESC cdcser_mkcfgdesc
# define DEV1_CLASSOBJECT board_cdcclassobject
# define DEV1_NCONFIGS CDCSER_NCONFIGS
@@ -136,16 +136,16 @@
# define DEV1_NSTRIDS (CDCSER_LASTSTRID-CONFIG_CDCSER_STRBASE)
# define DEV1_CFGDESCSIZE SIZEOF_CDCSER_CFGDESC
#elif defined(CONFIG_CDCSER_COMPOSITE)
-# define DEV1_IS_USBSTRG 1
-# define DEV1_MKCFGDESC usbstrg_mkcfgdesc
+# define DEV1_IS_USBMSC 1
+# define DEV1_MKCFGDESC usbmsc_mkcfgdesc
# define DEV1_CLASSOBJECT board_mscclassobject
-# define DEV1_NCONFIGS USBSTRG_NCONFIGS
-# define DEV1_CONFIGID USBSTRG_CONFIGID
-# define DEV1_FIRSTINTERFACE CONFIG_USBSTRG_IFNOBASE
-# define DEV1_NINTERFACES USBSTRG_NINTERFACES
-# define DEV1_FIRSTSTRID CONFIG_USBSTRG_IFNOBASE
-# define DEV1_NSTRIDS (USBSTRG_LASTSTRID-CONFIG_USBSTRG_STRBASE)
-# define DEV1_CFGDESCSIZE SIZEOF_USBSTRG_CFGDESC
+# define DEV1_NCONFIGS USBMSC_NCONFIGS
+# define DEV1_CONFIGID USBMSC_CONFIGID
+# define DEV1_FIRSTINTERFACE CONFIG_USBMSC_IFNOBASE
+# define DEV1_NINTERFACES USBMSC_NINTERFACES
+# define DEV1_FIRSTSTRID CONFIG_USBMSC_IFNOBASE
+# define DEV1_NSTRIDS (USBMSC_LASTSTRID-CONFIG_USBMSC_STRBASE)
+# define DEV1_CFGDESCSIZE SIZEOF_USBMSC_CFGDESC
#else
# error "No members of the composite defined"
#endif
@@ -154,8 +154,8 @@
* the CDC serial device or the mass storage device.
*/
-#if defined(CONFIG_CDCSER_COMPOSITE) && !defined(DEV1_IS_CDCSERIAL)
-# define DEV2_IS_CDCSERIAL 1
+#if defined(CONFIG_CDCSER_COMPOSITE) && !defined(DEV1_IS_CDCACM)
+# define DEV2_IS_CDCACM 1
# define DEV2_MKCFGDESC cdcser_mkcfgdesc
# define DEV2_CLASSOBJECT board_cdcclassobject
# define DEV2_NCONFIGS CDCSER_NCONFIGS
@@ -165,17 +165,17 @@
# define DEV2_FIRSTSTRID CONFIG_CDCSER_STRBASE
# define DEV2_NSTRIDS (CDCSER_LASTSTRID-CONFIG_CDCSER_STRBASE)
# define DEV2_CFGDESCSIZE SIZEOF_CDCSER_CFGDESC
-#elif defined(CONFIG_CDCSER_COMPOSITE) && !defined(DEV1_IS_USBSTRG)
-# define DEV2_IS_USBSTRG 1
-# define DEV2_MKCFGDESC usbstrg_mkcfgdesc
+#elif defined(CONFIG_CDCSER_COMPOSITE) && !defined(DEV1_IS_USBMSC)
+# define DEV2_IS_USBMSC 1
+# define DEV2_MKCFGDESC usbmsc_mkcfgdesc
# define DEV2_CLASSOBJECT board_mscclassobject
-# define DEV2_NCONFIGS USBSTRG_NCONFIGS
-# define DEV2_CONFIGID USBSTRG_CONFIGID
-# define DEV2_FIRSTINTERFACE CONFIG_USBSTRG_IFNOBASE
-# define DEV2_NINTERFACES USBSTRG_NINTERFACES
+# define DEV2_NCONFIGS USBMSC_NCONFIGS
+# define DEV2_CONFIGID USBMSC_CONFIGID
+# define DEV2_FIRSTINTERFACE CONFIG_USBMSC_IFNOBASE
+# define DEV2_NINTERFACES USBMSC_NINTERFACES
# define DEV2_FIRSTSTRID CONFIG_CDCSER_STRBASE
-# define DEV2_NSTRIDS (USBSTRG_LASTSTRID-CONFIG_USBSTRG_STRBASE)
-# define DEV2_CFGDESCSIZE SIZEOF_USBSTRG_CFGDESC
+# define DEV2_NSTRIDS (USBMSC_LASTSTRID-CONFIG_USBMSC_STRBASE)
+# define DEV2_CFGDESCSIZE SIZEOF_USBMSC_CFGDESC
#else
# error "Insufficient members of the composite defined"
#endif
@@ -253,7 +253,7 @@ extern const char g_compserialstr[];
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_mkstrdesc
+ * Name: usbmsc_mkstrdesc
*
* Description:
* Construct a string descriptor
diff --git a/nuttx/drivers/usbdev/composite_descriptors.c b/nuttx/drivers/usbdev/composite_descriptors.c
index e49631b5b..349a54c6c 100644
--- a/nuttx/drivers/usbdev/composite_descriptors.c
+++ b/nuttx/drivers/usbdev/composite_descriptors.c
@@ -150,7 +150,7 @@ static const struct usb_qualdesc_s g_qualdesc =
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_mkstrdesc
+ * Name: composite_mkstrdesc
*
* Description:
* Construct a string descriptor
diff --git a/nuttx/drivers/usbdev/msc.c b/nuttx/drivers/usbdev/msc.c
index 63d6a1f5b..b70d89d44 100644
--- a/nuttx/drivers/usbdev/msc.c
+++ b/nuttx/drivers/usbdev/msc.c
@@ -92,18 +92,18 @@
/* The internal version of the class driver */
-struct usbstrg_driver_s
+struct usbmsc_driver_s
{
struct usbdevclass_driver_s drvr;
- FAR struct usbstrg_dev_s *dev;
+ FAR struct usbmsc_dev_s *dev;
};
/* This is what is allocated */
-struct usbstrg_alloc_s
+struct usbmsc_alloc_s
{
- struct usbstrg_dev_s dev;
- struct usbstrg_driver_s drvr;
+ struct usbmsc_dev_s dev;
+ struct usbmsc_driver_s drvr;
};
/****************************************************************************
@@ -112,25 +112,25 @@ struct usbstrg_alloc_s
/* Class Driver Support *****************************************************/
-static void usbstrg_ep0incomplete(FAR struct usbdev_ep_s *ep,
+static void usbmsc_ep0incomplete(FAR struct usbdev_ep_s *ep,
FAR struct usbdev_req_s *req);
-static struct usbdev_req_s *usbstrg_allocreq(FAR struct usbdev_ep_s *ep,
+static struct usbdev_req_s *usbmsc_allocreq(FAR struct usbdev_ep_s *ep,
uint16_t len);
-static void usbstrg_freereq(FAR struct usbdev_ep_s *ep,
+static void usbmsc_freereq(FAR struct usbdev_ep_s *ep,
FAR struct usbdev_req_s *req);
/* Class Driver Operations (most at interrupt level) ************************/
-static int usbstrg_bind(FAR struct usbdev_s *dev,
+static int usbmsc_bind(FAR struct usbdev_s *dev,
FAR struct usbdevclass_driver_s *driver);
-static void usbstrg_unbind(FAR struct usbdev_s *dev);
-static int usbstrg_setup(FAR struct usbdev_s *dev,
+static void usbmsc_unbind(FAR struct usbdev_s *dev);
+static int usbmsc_setup(FAR struct usbdev_s *dev,
FAR const struct usb_ctrlreq_s *ctrl);
-static void usbstrg_disconnect(FAR struct usbdev_s *dev);
+static void usbmsc_disconnect(FAR struct usbdev_s *dev);
/* Initialization/Uninitialization ******************************************/
-static void usbstrg_lununinitialize(struct usbstrg_lun_s *lun);
+static void usbmsc_lununinitialize(struct usbmsc_lun_s *lun);
/****************************************************************************
* Private Data
@@ -140,12 +140,12 @@ static void usbstrg_lununinitialize(struct usbstrg_lun_s *lun);
static struct usbdevclass_driverops_s g_driverops =
{
- usbstrg_bind, /* bind */
- usbstrg_unbind, /* unbind */
- usbstrg_setup, /* setup */
- usbstrg_disconnect, /* disconnect */
- NULL, /* suspend */
- NULL /* resume */
+ usbmsc_bind, /* bind */
+ usbmsc_unbind, /* unbind */
+ usbmsc_setup, /* setup */
+ usbmsc_disconnect, /* disconnect */
+ NULL, /* suspend */
+ NULL /* resume */
};
/****************************************************************************
@@ -160,33 +160,33 @@ static struct usbdevclass_driverops_s g_driverops =
* Class Driver Support
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_ep0incomplete
+ * Name: usbmsc_ep0incomplete
*
* Description:
* Handle completion of EP0 control operations
*
****************************************************************************/
-static void usbstrg_ep0incomplete(FAR struct usbdev_ep_s *ep,
- FAR struct usbdev_req_s *req)
+static void usbmsc_ep0incomplete(FAR struct usbdev_ep_s *ep,
+ FAR struct usbdev_req_s *req)
{
if (req->result || req->xfrd != req->len)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_REQRESULT),
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_REQRESULT),
(uint16_t)-req->result);
}
}
/****************************************************************************
- * Name: usbstrg_allocreq
+ * Name: usbmsc_allocreq
*
* Description:
* Allocate a request instance along with its buffer
*
****************************************************************************/
-static struct usbdev_req_s *usbstrg_allocreq(FAR struct usbdev_ep_s *ep,
- uint16_t len)
+static struct usbdev_req_s *usbmsc_allocreq(FAR struct usbdev_ep_s *ep,
+ uint16_t len)
{
FAR struct usbdev_req_s *req;
@@ -205,14 +205,14 @@ static struct usbdev_req_s *usbstrg_allocreq(FAR struct usbdev_ep_s *ep,
}
/****************************************************************************
- * Name: usbstrg_freereq
+ * Name: usbmsc_freereq
*
* Description:
* Free a request instance along with its buffer
*
****************************************************************************/
-static void usbstrg_freereq(FAR struct usbdev_ep_s *ep, struct usbdev_req_s *req)
+static void usbmsc_freereq(FAR struct usbdev_ep_s *ep, struct usbdev_req_s *req)
{
if (ep != NULL && req != NULL)
{
@@ -228,17 +228,17 @@ static void usbstrg_freereq(FAR struct usbdev_ep_s *ep, struct usbdev_req_s *req
* Class Driver Interfaces
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_bind
+ * Name: usbmsc_bind
*
* Description:
* Invoked when the driver is bound to a USB device driver
*
****************************************************************************/
-static int usbstrg_bind(FAR struct usbdev_s *dev, FAR struct usbdevclass_driver_s *driver)
+static int usbmsc_bind(FAR struct usbdev_s *dev, FAR struct usbdevclass_driver_s *driver)
{
- FAR struct usbstrg_dev_s *priv = ((struct usbstrg_driver_s*)driver)->dev;
- FAR struct usbstrg_req_s *reqcontainer;
+ FAR struct usbmsc_dev_s *priv = ((struct usbmsc_driver_s*)driver)->dev;
+ FAR struct usbmsc_req_s *reqcontainer;
irqstate_t flags;
int ret = OK;
int i;
@@ -255,21 +255,21 @@ static int usbstrg_bind(FAR struct usbdev_s *dev, FAR struct usbdevclass_driver_
* const, canned descriptors.
*/
- DEBUGASSERT(CONFIG_USBSTRG_EP0MAXPACKET == dev->ep0->maxpacket);
+ DEBUGASSERT(CONFIG_USBMSC_EP0MAXPACKET == dev->ep0->maxpacket);
/* Preallocate control request */
- priv->ctrlreq = usbstrg_allocreq(dev->ep0, USBSTRG_MXDESCLEN);
+ priv->ctrlreq = usbmsc_allocreq(dev->ep0, USBMSC_MXDESCLEN);
if (priv->ctrlreq == NULL)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_ALLOCCTRLREQ), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_ALLOCCTRLREQ), 0);
ret = -ENOMEM;
goto errout;
}
- priv->ctrlreq->callback = usbstrg_ep0incomplete;
+ priv->ctrlreq->callback = usbmsc_ep0incomplete;
/* Pre-allocate all endpoints... the endpoints will not be functional
- * until the SET CONFIGURATION request is processed in usbstrg_setconfig.
+ * until the SET CONFIGURATION request is processed in usbmsc_setconfig.
* This is done here because there may be calls to kmalloc and the SET
* CONFIGURATION processing probably occurrs within interrupt handling
* logic where kmalloc calls will fail.
@@ -277,10 +277,10 @@ static int usbstrg_bind(FAR struct usbdev_s *dev, FAR struct usbdevclass_driver_
/* Pre-allocate the IN bulk endpoint */
- priv->epbulkin = DEV_ALLOCEP(dev, USBSTRG_EPINBULK_ADDR, true, USB_EP_ATTR_XFER_BULK);
+ priv->epbulkin = DEV_ALLOCEP(dev, USBMSC_EPINBULK_ADDR, true, USB_EP_ATTR_XFER_BULK);
if (!priv->epbulkin)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_EPBULKINALLOCFAIL), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_EPBULKINALLOCFAIL), 0);
ret = -ENODEV;
goto errout;
}
@@ -288,10 +288,10 @@ static int usbstrg_bind(FAR struct usbdev_s *dev, FAR struct usbdevclass_driver_
/* Pre-allocate the OUT bulk endpoint */
- priv->epbulkout = DEV_ALLOCEP(dev, USBSTRG_EPOUTBULK_ADDR, false, USB_EP_ATTR_XFER_BULK);
+ priv->epbulkout = DEV_ALLOCEP(dev, USBMSC_EPOUTBULK_ADDR, false, USB_EP_ATTR_XFER_BULK);
if (!priv->epbulkout)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_EPBULKOUTALLOCFAIL), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_EPBULKOUTALLOCFAIL), 0);
ret = -ENODEV;
goto errout;
}
@@ -299,36 +299,36 @@ static int usbstrg_bind(FAR struct usbdev_s *dev, FAR struct usbdevclass_driver_
/* Pre-allocate read requests */
- for (i = 0; i < CONFIG_USBSTRG_NRDREQS; i++)
+ for (i = 0; i < CONFIG_USBMSC_NRDREQS; i++)
{
reqcontainer = &priv->rdreqs[i];
- reqcontainer->req = usbstrg_allocreq(priv->epbulkout, CONFIG_USBSTRG_BULKOUTREQLEN);
+ reqcontainer->req = usbmsc_allocreq(priv->epbulkout, CONFIG_USBMSC_BULKOUTREQLEN);
if (reqcontainer->req == NULL)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_RDALLOCREQ),
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_RDALLOCREQ),
(uint16_t)-ret);
ret = -ENOMEM;
goto errout;
}
reqcontainer->req->priv = reqcontainer;
- reqcontainer->req->callback = usbstrg_rdcomplete;
+ reqcontainer->req->callback = usbmsc_rdcomplete;
}
/* Pre-allocate write request containers and put in a free list */
- for (i = 0; i < CONFIG_USBSTRG_NWRREQS; i++)
+ for (i = 0; i < CONFIG_USBMSC_NWRREQS; i++)
{
reqcontainer = &priv->wrreqs[i];
- reqcontainer->req = usbstrg_allocreq(priv->epbulkin, CONFIG_USBSTRG_BULKINREQLEN);
+ reqcontainer->req = usbmsc_allocreq(priv->epbulkin, CONFIG_USBMSC_BULKINREQLEN);
if (reqcontainer->req == NULL)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_WRALLOCREQ),
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_WRALLOCREQ),
(uint16_t)-ret);
ret = -ENOMEM;
goto errout;
}
reqcontainer->req->priv = reqcontainer;
- reqcontainer->req->callback = usbstrg_wrcomplete;
+ reqcontainer->req->callback = usbmsc_wrcomplete;
flags = irqsave();
sq_addlast((sq_entry_t*)reqcontainer, &priv->wrreqlist);
@@ -337,7 +337,7 @@ static int usbstrg_bind(FAR struct usbdev_s *dev, FAR struct usbdevclass_driver_
/* Report if we are selfpowered (unless we are part of a composite device) */
-#ifndef CONFIG_USBSTRG_COMPOSITE
+#ifndef CONFIG_USBMSC_COMPOSITE
#ifdef CONFIG_USBDEV_SELFPOWERED
DEV_SETSELFPOWERED(dev);
#endif
@@ -351,22 +351,22 @@ static int usbstrg_bind(FAR struct usbdev_s *dev, FAR struct usbdevclass_driver_
return OK;
errout:
- usbstrg_unbind(dev);
+ usbmsc_unbind(dev);
return ret;
}
/****************************************************************************
- * Name: usbstrg_unbind
+ * Name: usbmsc_unbind
*
* Description:
* Invoked when the driver is unbound from a USB device driver
*
****************************************************************************/
-static void usbstrg_unbind(FAR struct usbdev_s *dev)
+static void usbmsc_unbind(FAR struct usbdev_s *dev)
{
- FAR struct usbstrg_dev_s *priv;
- FAR struct usbstrg_req_s *reqcontainer;
+ FAR struct usbmsc_dev_s *priv;
+ FAR struct usbmsc_req_s *reqcontainer;
irqstate_t flags;
int i;
@@ -375,19 +375,19 @@ static void usbstrg_unbind(FAR struct usbdev_s *dev)
#ifdef CONFIG_DEBUG
if (!dev || !dev->ep0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_UNBINDINVALIDARGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_UNBINDINVALIDARGS), 0);
return;
}
#endif
/* Extract reference to private data */
- priv = (FAR struct usbstrg_dev_s *)dev->ep0->priv;
+ priv = (FAR struct usbmsc_dev_s *)dev->ep0->priv;
#ifdef CONFIG_DEBUG
if (!priv)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_EP0NOTBOUND1), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_EP0NOTBOUND1), 0);
return;
}
#endif
@@ -396,7 +396,7 @@ static void usbstrg_unbind(FAR struct usbdev_s *dev)
* driver un-initialize logic.
*/
- DEBUGASSERT(priv->thstate == USBSTRG_STATE_TERMINATED);
+ DEBUGASSERT(priv->thstate == USBMSC_STATE_TERMINATED);
/* Make sure that we are not already unbound */
@@ -404,19 +404,19 @@ static void usbstrg_unbind(FAR struct usbdev_s *dev)
{
/* Make sure that the endpoints have been unconfigured. If
* we were terminated gracefully, then the configuration should
- * already have been reset. If not, then calling usbstrg_resetconfig
+ * already have been reset. If not, then calling usbmsc_resetconfig
* should cause the endpoints to immediately terminate all
* transfers and return the requests to us (with result == -ESHUTDOWN)
*/
- usbstrg_resetconfig(priv);
+ usbmsc_resetconfig(priv);
up_mdelay(50);
/* Free the pre-allocated control request */
if (priv->ctrlreq != NULL)
{
- usbstrg_freereq(dev->ep0, priv->ctrlreq);
+ usbmsc_freereq(dev->ep0, priv->ctrlreq);
priv->ctrlreq = NULL;
}
@@ -424,12 +424,12 @@ static void usbstrg_unbind(FAR struct usbdev_s *dev)
* been returned to the free list at this time -- we don't check)
*/
- for (i = 0; i < CONFIG_USBSTRG_NRDREQS; i++)
+ for (i = 0; i < CONFIG_USBMSC_NRDREQS; i++)
{
reqcontainer = &priv->rdreqs[i];
if (reqcontainer->req)
{
- usbstrg_freereq(priv->epbulkout, reqcontainer->req);
+ usbmsc_freereq(priv->epbulkout, reqcontainer->req);
reqcontainer->req = NULL;
}
}
@@ -449,10 +449,10 @@ static void usbstrg_unbind(FAR struct usbdev_s *dev)
flags = irqsave();
while (!sq_empty(&priv->wrreqlist))
{
- reqcontainer = (struct usbstrg_req_s *)sq_remfirst(&priv->wrreqlist);
+ reqcontainer = (struct usbmsc_req_s *)sq_remfirst(&priv->wrreqlist);
if (reqcontainer->req != NULL)
{
- usbstrg_freereq(priv->epbulkin, reqcontainer->req);
+ usbmsc_freereq(priv->epbulkin, reqcontainer->req);
}
}
@@ -469,7 +469,7 @@ static void usbstrg_unbind(FAR struct usbdev_s *dev)
}
/****************************************************************************
- * Name: usbstrg_setup
+ * Name: usbmsc_setup
*
* Description:
* Invoked for ep0 control requests. This function probably executes
@@ -477,10 +477,10 @@ static void usbstrg_unbind(FAR struct usbdev_s *dev)
*
****************************************************************************/
-static int usbstrg_setup(FAR struct usbdev_s *dev,
- FAR const struct usb_ctrlreq_s *ctrl)
+static int usbmsc_setup(FAR struct usbdev_s *dev,
+ FAR const struct usb_ctrlreq_s *ctrl)
{
- FAR struct usbstrg_dev_s *priv;
+ FAR struct usbmsc_dev_s *priv;
FAR struct usbdev_req_s *ctrlreq;
uint16_t value;
uint16_t index;
@@ -490,7 +490,7 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
#ifdef CONFIG_DEBUG
if (!dev || !dev->ep0 || !ctrl)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_SETUPINVALIDARGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_SETUPINVALIDARGS), 0);
return -EIO;
}
#endif
@@ -498,12 +498,12 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
/* Extract reference to private data */
usbtrace(TRACE_CLASSSETUP, ctrl->req);
- priv = (FAR struct usbstrg_dev_s *)dev->ep0->priv;
+ priv = (FAR struct usbmsc_dev_s *)dev->ep0->priv;
#ifdef CONFIG_DEBUG
if (!priv || !priv->ctrlreq)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_EP0NOTBOUND2), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_EP0NOTBOUND2), 0);
return -ENODEV;
}
#endif
@@ -539,11 +539,11 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
* in the composite device implementation.
*/
-#ifndef CONFIG_USBSTRG_COMPOSITE
+#ifndef CONFIG_USBMSC_COMPOSITE
case USB_DESC_TYPE_DEVICE:
{
ret = USB_SIZEOF_DEVDESC;
- memcpy(ctrlreq->buf, usbstrg_getdevdesc(), ret);
+ memcpy(ctrlreq->buf, usbmsc_getdevdesc(), ret);
}
break;
#endif
@@ -553,11 +553,11 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
* composite device implementation.
*/
-#if !defined(CONFIG_USBSTRG_COMPOSITE) && defined(CONFIG_USBDEV_DUALSPEED)
+#if !defined(CONFIG_USBMSC_COMPOSITE) && defined(CONFIG_USBDEV_DUALSPEED)
case USB_DESC_TYPE_DEVICEQUALIFIER:
{
ret = USB_SIZEOF_QUALDESC;
- memcpy(ctrlreq->buf, usbstrg_getqualdesc(), ret);
+ memcpy(ctrlreq->buf, usbmsc_getqualdesc(), ret);
}
break;
@@ -569,13 +569,13 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
* composite device implementation.
*/
-#ifndef CONFIG_USBSTRG_COMPOSITE
+#ifndef CONFIG_USBMSC_COMPOSITE
case USB_DESC_TYPE_CONFIG:
{
#ifdef CONFIG_USBDEV_DUALSPEED
- ret = usbstrg_mkcfgdesc(ctrlreq->buf, dev->speed, ctrl->value[1]);
+ ret = usbmsc_mkcfgdesc(ctrlreq->buf, dev->speed, ctrl->value[1]);
#else
- ret = usbstrg_mkcfgdesc(ctrlreq->buf);
+ ret = usbmsc_mkcfgdesc(ctrlreq->buf);
#endif
}
break;
@@ -586,19 +586,19 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
* composite device implementation.
*/
-#ifndef CONFIG_USBSTRG_COMPOSITE
+#ifndef CONFIG_USBMSC_COMPOSITE
case USB_DESC_TYPE_STRING:
{
/* index == language code. */
- ret = usbstrg_mkstrdesc(ctrl->value[0], (struct usb_strdesc_s *)ctrlreq->buf);
+ ret = usbmsc_mkstrdesc(ctrl->value[0], (struct usb_strdesc_s *)ctrlreq->buf);
}
break;
#endif
default:
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_GETUNKNOWNDESC), value);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_GETUNKNOWNDESC), value);
}
break;
}
@@ -611,7 +611,7 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
{
/* Signal the worker thread to instantiate the new configuration */
- priv->theventset |= USBSTRG_EVENT_CFGCHANGE;
+ priv->theventset |= USBMSC_EVENT_CFGCHANGE;
priv->thvalue = value;
pthread_cond_signal(&priv->cond);
@@ -629,7 +629,7 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
* in the composite device implementation.
*/
-#ifndef CONFIG_USBSTRG_COMPOSITE
+#ifndef CONFIG_USBMSC_COMPOSITE
case USB_REQ_GETCONFIGURATION:
{
if (ctrl->type == USB_DIR_IN)
@@ -645,13 +645,13 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
{
if (ctrl->type == USB_REQ_RECIPIENT_INTERFACE)
{
- if (priv->config == USBSTRG_CONFIGID &&
- index == USBSTRG_INTERFACEID &&
- value == USBSTRG_ALTINTERFACEID)
+ if (priv->config == USBMSC_CONFIGID &&
+ index == USBMSC_INTERFACEID &&
+ value == USBMSC_ALTINTERFACEID)
{
/* Signal to instantiate the interface change */
- priv->theventset |= USBSTRG_EVENT_IFCHANGE;
+ priv->theventset |= USBMSC_EVENT_IFCHANGE;
pthread_cond_signal(&priv->cond);
/* Return here... the response will be provided later by the
@@ -667,15 +667,15 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
case USB_REQ_GETINTERFACE:
{
if (ctrl->type == (USB_DIR_IN|USB_REQ_RECIPIENT_INTERFACE) &&
- priv->config == USBSTRG_CONFIGIDNONE)
+ priv->config == USBMSC_CONFIGIDNONE)
{
- if (index != USBSTRG_INTERFACEID)
+ if (index != USBMSC_INTERFACEID)
{
ret = -EDOM;
}
else
{
- ctrlreq->buf[0] = USBSTRG_ALTINTERFACEID;
+ ctrlreq->buf[0] = USBMSC_ALTINTERFACEID;
ret = 1;
}
}
@@ -683,7 +683,7 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
break;
default:
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_UNSUPPORTEDSTDREQ), ctrl->req);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_UNSUPPORTEDSTDREQ), ctrl->req);
break;
}
}
@@ -697,28 +697,28 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
if (!priv->config)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_NOTCONFIGURED), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_NOTCONFIGURED), 0);
return ret;
}
switch (ctrl->req)
{
- case USBSTRG_REQ_MSRESET: /* Reset mass storage device and interface */
+ case USBMSC_REQ_MSRESET: /* Reset mass storage device and interface */
{
- if (ctrl->type == USBSTRG_TYPE_SETUPOUT && value == 0 && len == 0)
+ if (ctrl->type == USBMSC_TYPE_SETUPOUT && value == 0 && len == 0)
{
/* Only one interface is supported */
- if (index != USBSTRG_INTERFACEID)
+ if (index != USBMSC_INTERFACEID)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_MSRESETNDX), index);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_MSRESETNDX), index);
ret = -EDOM;
}
else
{
/* Signal to stop the current operation and reinitialize state */
- priv->theventset |= USBSTRG_EVENT_RESET;
+ priv->theventset |= USBMSC_EVENT_RESET;
pthread_cond_signal(&priv->cond);
/* Return here... the response will be provided later by the
@@ -731,15 +731,15 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
}
break;
- case USBSTRG_REQ_GETMAXLUN: /* Return number LUNs supported */
+ case USBMSC_REQ_GETMAXLUN: /* Return number LUNs supported */
{
- if (ctrl->type == USBSTRG_TYPE_SETUPIN && value == 0 && len == 1)
+ if (ctrl->type == USBMSC_TYPE_SETUPIN && value == 0 && len == 1)
{
/* Only one interface is supported */
- if (index != USBSTRG_INTERFACEID)
+ if (index != USBMSC_INTERFACEID)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_GETMAXLUNNDX), index);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_GETMAXLUNNDX), index);
ret = -EDOM;
}
else
@@ -752,7 +752,7 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
break;
default:
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_BADREQUEST), index);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_BADREQUEST), index);
break;
}
}
@@ -768,10 +768,10 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
ret = EP_SUBMIT(dev->ep0, ctrlreq);
if (ret < 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_EPRESPQ), (uint16_t)-ret);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_EPRESPQ), (uint16_t)-ret);
#if 0 /* Not necessary */
ctrlreq->result = OK;
- usbstrg_ep0incomplete(dev->ep0, ctrlreq);
+ usbmsc_ep0incomplete(dev->ep0, ctrlreq);
#endif
}
}
@@ -780,7 +780,7 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
}
/****************************************************************************
- * Name: usbstrg_disconnect
+ * Name: usbmsc_disconnect
*
* Description:
* Invoked after all transfers have been stopped, when the host is
@@ -789,9 +789,9 @@ static int usbstrg_setup(FAR struct usbdev_s *dev,
*
****************************************************************************/
-static void usbstrg_disconnect(FAR struct usbdev_s *dev)
+static void usbmsc_disconnect(FAR struct usbdev_s *dev)
{
- struct usbstrg_dev_s *priv;
+ struct usbmsc_dev_s *priv;
irqstate_t flags;
usbtrace(TRACE_CLASSDISCONNECT, 0);
@@ -799,19 +799,19 @@ static void usbstrg_disconnect(FAR struct usbdev_s *dev)
#ifdef CONFIG_DEBUG
if (!dev || !dev->ep0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_DISCONNECTINVALIDARGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_DISCONNECTINVALIDARGS), 0);
return;
}
#endif
/* Extract reference to private data */
- priv = (FAR struct usbstrg_dev_s *)dev->ep0->priv;
+ priv = (FAR struct usbmsc_dev_s *)dev->ep0->priv;
#ifdef CONFIG_DEBUG
if (!priv)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_EP0NOTBOUND3), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_EP0NOTBOUND3), 0);
return;
}
#endif
@@ -819,11 +819,11 @@ static void usbstrg_disconnect(FAR struct usbdev_s *dev)
/* Reset the configuration */
flags = irqsave();
- usbstrg_resetconfig(priv);
+ usbmsc_resetconfig(priv);
/* Signal the worker thread */
- priv->theventset |= USBSTRG_EVENT_DISCONNECT;
+ priv->theventset |= USBMSC_EVENT_DISCONNECT;
pthread_cond_signal(&priv->cond);
irqrestore(flags);
@@ -831,7 +831,7 @@ static void usbstrg_disconnect(FAR struct usbdev_s *dev)
* re-enumerated (unless we are part of a composite device)
*/
-#ifndef CONFIG_USBSTRG_COMPOSITE
+#ifndef CONFIG_USBMSC_COMPOSITE
DEV_CONNECT(dev);
#endif
}
@@ -840,10 +840,10 @@ static void usbstrg_disconnect(FAR struct usbdev_s *dev)
* Initialization/Un-Initialization
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_lununinitialize
+ * Name: usbmsc_lununinitialize
****************************************************************************/
-static void usbstrg_lununinitialize(struct usbstrg_lun_s *lun)
+static void usbmsc_lununinitialize(struct usbmsc_lun_s *lun)
{
/* Has a block driver has been bound to the LUN? */
@@ -854,7 +854,7 @@ static void usbstrg_lununinitialize(struct usbstrg_lun_s *lun)
(void)close_blockdriver(lun->inode);
}
- memset(lun, 0, sizeof(struct usbstrg_lun_s *));
+ memset(lun, 0, sizeof(struct usbmsc_lun_s *));
}
/****************************************************************************
@@ -865,7 +865,7 @@ static void usbstrg_lununinitialize(struct usbstrg_lun_s *lun)
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_setconfig
+ * Name: usbmsc_setconfig
*
* Description:
* Set the device configuration by allocating and configuring endpoints and
@@ -873,9 +873,9 @@ static void usbstrg_lununinitialize(struct usbstrg_lun_s *lun)
*
****************************************************************************/
-int usbstrg_setconfig(FAR struct usbstrg_dev_s *priv, uint8_t config)
+int usbmsc_setconfig(FAR struct usbmsc_dev_s *priv, uint8_t config)
{
- FAR struct usbstrg_req_s *privreq;
+ FAR struct usbmsc_req_s *privreq;
FAR struct usbdev_req_s *req;
#ifdef CONFIG_USBDEV_DUALSPEED
FAR const struct usb_epdesc_s *epdesc;
@@ -888,7 +888,7 @@ int usbstrg_setconfig(FAR struct usbstrg_dev_s *priv, uint8_t config)
#if CONFIG_DEBUG
if (priv == NULL)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_SETCONFIGINVALIDARGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_SETCONFIGINVALIDARGS), 0);
return -EIO;
}
#endif
@@ -897,43 +897,43 @@ int usbstrg_setconfig(FAR struct usbstrg_dev_s *priv, uint8_t config)
{
/* Already configured -- Do nothing */
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_ALREADYCONFIGURED), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_ALREADYCONFIGURED), 0);
return OK;
}
/* Discard the previous configuration data */
- usbstrg_resetconfig(priv);
+ usbmsc_resetconfig(priv);
/* Was this a request to simply discard the current configuration? */
- if (config == USBSTRG_CONFIGIDNONE)
+ if (config == USBMSC_CONFIGIDNONE)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CONFIGNONE), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CONFIGNONE), 0);
return OK;
}
/* We only accept one configuration */
- if (config != USBSTRG_CONFIGID)
+ if (config != USBMSC_CONFIGID)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CONFIGIDBAD), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CONFIGIDBAD), 0);
return -EINVAL;
}
/* Configure the IN bulk endpoint */
#ifdef CONFIG_USBDEV_DUALSPEED
- bulkmxpacket = USBSTRG_BULKMAXPACKET(hispeed);
- epdesc = USBSTRG_EPBULKINDESC(hispeed);
+ bulkmxpacket = USBMSC_BULKMAXPACKET(hispeed);
+ epdesc = USBMSC_EPBULKINDESC(hispeed);
ret = EP_CONFIGURE(priv->epbulkin, epdesc, false);
#else
ret = EP_CONFIGURE(priv->epbulkin,
- usbstrg_getepdesc(USBSTRG_EPFSBULKIN), false);
+ usbmsc_getepdesc(USBMSC_EPFSBULKIN), false);
#endif
if (ret < 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_EPBULKINCONFIGFAIL), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_EPBULKINCONFIGFAIL), 0);
goto errout;
}
@@ -942,15 +942,15 @@ int usbstrg_setconfig(FAR struct usbstrg_dev_s *priv, uint8_t config)
/* Configure the OUT bulk endpoint */
#ifdef CONFIG_USBDEV_DUALSPEED
- epdesc = USBSTRG_EPBULKOUTDESC(hispeed);
+ epdesc = USBMSC_EPBULKOUTDESC(hispeed);
ret = EP_CONFIGURE(priv->epbulkout, epdesc, true);
#else
ret = EP_CONFIGURE(priv->epbulkout,
- usbstrg_getepdesc(USBSTRG_EPFSBULKOUT), true);
+ usbmsc_getepdesc(USBMSC_EPFSBULKOUT), true);
#endif
if (ret < 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_EPBULKOUTCONFIGFAIL), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_EPBULKOUTCONFIGFAIL), 0);
goto errout;
}
@@ -958,17 +958,17 @@ int usbstrg_setconfig(FAR struct usbstrg_dev_s *priv, uint8_t config)
/* Queue read requests in the bulk OUT endpoint */
- for (i = 0; i < CONFIG_USBSTRG_NRDREQS; i++)
+ for (i = 0; i < CONFIG_USBMSC_NRDREQS; i++)
{
privreq = &priv->rdreqs[i];
req = privreq->req;
- req->len = CONFIG_USBSTRG_BULKOUTREQLEN;
+ req->len = CONFIG_USBMSC_BULKOUTREQLEN;
req->priv = privreq;
- req->callback = usbstrg_rdcomplete;
+ req->callback = usbmsc_rdcomplete;
ret = EP_SUBMIT(priv->epbulkout, req);
if (ret < 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_RDSUBMIT), (uint16_t)-ret);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_RDSUBMIT), (uint16_t)-ret);
goto errout;
}
}
@@ -977,27 +977,27 @@ int usbstrg_setconfig(FAR struct usbstrg_dev_s *priv, uint8_t config)
return OK;
errout:
- usbstrg_resetconfig(priv);
+ usbmsc_resetconfig(priv);
return ret;
}
/****************************************************************************
- * Name: usbstrg_resetconfig
+ * Name: usbmsc_resetconfig
*
* Description:
* Mark the device as not configured and disable all endpoints.
*
****************************************************************************/
-void usbstrg_resetconfig(FAR struct usbstrg_dev_s *priv)
+void usbmsc_resetconfig(FAR struct usbmsc_dev_s *priv)
{
/* Are we configured? */
- if (priv->config != USBSTRG_CONFIGIDNONE)
+ if (priv->config != USBMSC_CONFIGIDNONE)
{
/* Yes.. but not anymore */
- priv->config = USBSTRG_CONFIGIDNONE;
+ priv->config = USBMSC_CONFIGIDNONE;
/* Disable endpoints. This should force completion of all pending
* transfers.
@@ -1009,7 +1009,7 @@ void usbstrg_resetconfig(FAR struct usbstrg_dev_s *priv)
}
/****************************************************************************
- * Name: usbstrg_wrcomplete
+ * Name: usbmsc_wrcomplete
*
* Description:
* Handle completion of write request. This function probably executes
@@ -1017,10 +1017,10 @@ void usbstrg_resetconfig(FAR struct usbstrg_dev_s *priv)
*
****************************************************************************/
-void usbstrg_wrcomplete(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req)
+void usbmsc_wrcomplete(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req)
{
- FAR struct usbstrg_dev_s *priv;
- FAR struct usbstrg_req_s *privreq;
+ FAR struct usbmsc_dev_s *priv;
+ FAR struct usbmsc_req_s *privreq;
irqstate_t flags;
/* Sanity check */
@@ -1028,15 +1028,15 @@ void usbstrg_wrcomplete(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req
#ifdef CONFIG_DEBUG
if (!ep || !ep->priv || !req || !req->priv)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_WRCOMPLETEINVALIDARGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_WRCOMPLETEINVALIDARGS), 0);
return;
}
#endif
/* Extract references to private data */
- priv = (FAR struct usbstrg_dev_s*)ep->priv;
- privreq = (FAR struct usbstrg_req_s *)req->priv;
+ priv = (FAR struct usbmsc_dev_s*)ep->priv;
+ privreq = (FAR struct usbmsc_req_s *)req->priv;
/* Return the write request to the free list */
@@ -1053,23 +1053,23 @@ void usbstrg_wrcomplete(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req
break;
case -ESHUTDOWN: /* Disconnection */
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_WRSHUTDOWN), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_WRSHUTDOWN), 0);
break;
default: /* Some other error occurred */
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_WRUNEXPECTED),
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_WRUNEXPECTED),
(uint16_t)-req->result);
break;
};
/* Inform the worker thread that a write request has been returned */
- priv->theventset |= USBSTRG_EVENT_WRCOMPLETE;
+ priv->theventset |= USBMSC_EVENT_WRCOMPLETE;
pthread_cond_signal(&priv->cond);
}
/****************************************************************************
- * Name: usbstrg_rdcomplete
+ * Name: usbmsc_rdcomplete
*
* Description:
* Handle completion of read request on the bulk OUT endpoint. This
@@ -1077,10 +1077,10 @@ void usbstrg_wrcomplete(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req
*
****************************************************************************/
-void usbstrg_rdcomplete(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req)
+void usbmsc_rdcomplete(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req)
{
- FAR struct usbstrg_dev_s *priv;
- FAR struct usbstrg_req_s *privreq;
+ FAR struct usbmsc_dev_s *priv;
+ FAR struct usbmsc_req_s *privreq;
irqstate_t flags;
int ret;
@@ -1089,15 +1089,15 @@ void usbstrg_rdcomplete(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req
#ifdef CONFIG_DEBUG
if (!ep || !ep->priv || !req || !req->priv)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_RDCOMPLETEINVALIDARGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_RDCOMPLETEINVALIDARGS), 0);
return;
}
#endif
/* Extract references to private data */
- priv = (FAR struct usbstrg_dev_s*)ep->priv;
- privreq = (FAR struct usbstrg_req_s *)req->priv;
+ priv = (FAR struct usbmsc_dev_s*)ep->priv;
+ privreq = (FAR struct usbmsc_req_s *)req->priv;
/* Process the received data unless this is some unusual condition */
@@ -1115,14 +1115,14 @@ void usbstrg_rdcomplete(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req
/* Signal the worker thread that there is received data to be processed */
- priv->theventset |= USBSTRG_EVENT_RDCOMPLETE;
+ priv->theventset |= USBMSC_EVENT_RDCOMPLETE;
pthread_cond_signal(&priv->cond);
}
break;
case -ESHUTDOWN: /* Disconnection */
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_RDSHUTDOWN), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_RDSHUTDOWN), 0);
/* Drop the read request... it will be cleaned up later */
}
@@ -1130,19 +1130,19 @@ void usbstrg_rdcomplete(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req
default: /* Some other error occurred */
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_RDUNEXPECTED),
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_RDUNEXPECTED),
(uint16_t)-req->result);
/* Return the read request to the bulk out endpoint for re-filling */
req = privreq->req;
req->priv = privreq;
- req->callback = usbstrg_rdcomplete;
+ req->callback = usbmsc_rdcomplete;
ret = EP_SUBMIT(priv->epbulkout, req);
if (ret != OK)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_RDCOMPLETERDSUBMIT),
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_RDCOMPLETERDSUBMIT),
(uint16_t)-ret);
}
}
@@ -1151,7 +1151,7 @@ void usbstrg_rdcomplete(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req
}
/****************************************************************************
- * Name: usbstrg_deferredresponse
+ * Name: usbmsc_deferredresponse
*
* Description:
* Some EP0 setup request cannot be responded to immediately becuase they
@@ -1161,7 +1161,7 @@ void usbstrg_rdcomplete(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req
*
* 1. USB_REQ_SETCONFIGURATION,
* 2. USB_REQ_SETINTERFACE, or
- * 3. USBSTRG_REQ_MSRESET
+ * 3. USBMSC_REQ_MSRESET
*
* In all cases, the success reponse is a zero-length packet; the failure
* response is an EP0 stall.
@@ -1172,7 +1172,7 @@ void usbstrg_rdcomplete(FAR struct usbdev_ep_s *ep, FAR struct usbdev_req_s *req
*
****************************************************************************/
-void usbstrg_deferredresponse(FAR struct usbstrg_dev_s *priv, bool failed)
+void usbmsc_deferredresponse(FAR struct usbmsc_dev_s *priv, bool failed)
{
FAR struct usbdev_s *dev;
FAR struct usbdev_req_s *ctrlreq;
@@ -1181,7 +1181,7 @@ void usbstrg_deferredresponse(FAR struct usbstrg_dev_s *priv, bool failed)
#ifdef CONFIG_DEBUG
if (!priv || !priv->usbdev || !priv->ctrlreq)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_DEFERREDRESPINVALIDARGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_DEFERREDRESPINVALIDARGS), 0);
return;
}
#endif
@@ -1200,11 +1200,11 @@ void usbstrg_deferredresponse(FAR struct usbstrg_dev_s *priv, bool failed)
ret = EP_SUBMIT(dev->ep0, ctrlreq);
if (ret < 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_DEFERREDRESPSUBMIT),
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_DEFERREDRESPSUBMIT),
(uint16_t)-ret);
#if 0 /* Not necessary */
ctrlreq->result = OK;
- usbstrg_ep0incomplete(dev->ep0, ctrlreq);
+ usbmsc_ep0incomplete(dev->ep0, ctrlreq);
#endif
}
}
@@ -1212,7 +1212,7 @@ void usbstrg_deferredresponse(FAR struct usbstrg_dev_s *priv, bool failed)
{
/* On a failure, the USB driver will stall. */
- usbtrace(TRACE_DEVERROR(USBSTRG_TRACEERR_DEFERREDRESPSTALLED), 0);
+ usbtrace(TRACE_DEVERROR(USBMSC_TRACEERR_DEFERREDRESPSTALLED), 0);
EP_STALL(dev->ep0);
}
}
@@ -1221,16 +1221,16 @@ void usbstrg_deferredresponse(FAR struct usbstrg_dev_s *priv, bool failed)
* User Interfaces
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_configure
+ * Name: usbmsc_configure
*
* Description:
* One-time initialization of the USB storage driver. The initialization
* sequence is as follows:
*
- * 1. Call usbstrg_configure to perform one-time initialization specifying
+ * 1. Call usbmsc_configure to perform one-time initialization specifying
* the number of luns.
- * 2. Call usbstrg_bindlun to configure each supported LUN
- * 3. Call usbstrg_exportluns when all LUNs are configured
+ * 2. Call usbmsc_bindlun to configure each supported LUN
+ * 3. Call usbmsc_exportluns when all LUNs are configured
*
* Input Parameters:
* nluns - the number of LUNs that will be registered
@@ -1241,34 +1241,34 @@ void usbstrg_deferredresponse(FAR struct usbstrg_dev_s *priv, bool failed)
*
****************************************************************************/
-int usbstrg_configure(unsigned int nluns, void **handle)
+int usbmsc_configure(unsigned int nluns, void **handle)
{
- FAR struct usbstrg_alloc_s *alloc;
- FAR struct usbstrg_dev_s *priv;
- FAR struct usbstrg_driver_s *drvr;
+ FAR struct usbmsc_alloc_s *alloc;
+ FAR struct usbmsc_dev_s *priv;
+ FAR struct usbmsc_driver_s *drvr;
int ret;
#ifdef CONFIG_DEBUG
if (nluns > 15)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_TOOMANYLUNS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_TOOMANYLUNS), 0);
return -EDOM;
}
#endif
/* Allocate the structures needed */
- alloc = (FAR struct usbstrg_alloc_s*)kmalloc(sizeof(struct usbstrg_alloc_s));
+ alloc = (FAR struct usbmsc_alloc_s*)kmalloc(sizeof(struct usbmsc_alloc_s));
if (!alloc)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_ALLOCDEVSTRUCT), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_ALLOCDEVSTRUCT), 0);
return -ENOMEM;
}
/* Initialize the USB storage driver structure */
priv = &alloc->dev;
- memset(priv, 0, sizeof(struct usbstrg_dev_s));
+ memset(priv, 0, sizeof(struct usbmsc_dev_s));
pthread_mutex_init(&priv->mutex, NULL);
pthread_cond_init(&priv->cond, NULL);
@@ -1278,13 +1278,13 @@ int usbstrg_configure(unsigned int nluns, void **handle)
/* Allocate the LUN table */
- priv->luntab = (struct usbstrg_lun_s*)kmalloc(priv->nluns*sizeof(struct usbstrg_lun_s));
+ priv->luntab = (struct usbmsc_lun_s*)kmalloc(priv->nluns*sizeof(struct usbmsc_lun_s));
if (!priv->luntab)
{
ret = -ENOMEM;
goto errout;
}
- memset(priv->luntab, 0, priv->nluns * sizeof(struct usbstrg_lun_s));
+ memset(priv->luntab, 0, priv->nluns * sizeof(struct usbmsc_lun_s));
/* Initialize the USB class driver structure */
@@ -1303,18 +1303,18 @@ int usbstrg_configure(unsigned int nluns, void **handle)
return OK;
errout:
- usbstrg_uninitialize(alloc);
+ usbmsc_uninitialize(alloc);
return ret;
}
/****************************************************************************
- * Name: usbstrg_bindlun
+ * Name: usbmsc_bindlun
*
* Description:
* Bind the block driver specified by drvrpath to a USB storage LUN.
*
* Input Parameters:
- * handle - The handle returned by a previous call to usbstrg_configure().
+ * handle - The handle returned by a previous call to usbmsc_configure().
* drvrpath - the full path to the block driver
* startsector - A sector offset into the block driver to the start of the
* partition on drvrpath (0 if no partitions)
@@ -1327,13 +1327,13 @@ errout:
*
****************************************************************************/
-int usbstrg_bindlun(FAR void *handle, FAR const char *drvrpath,
- unsigned int lunno, off_t startsector, size_t nsectors,
- bool readonly)
+int usbmsc_bindlun(FAR void *handle, FAR const char *drvrpath,
+ unsigned int lunno, off_t startsector, size_t nsectors,
+ bool readonly)
{
- FAR struct usbstrg_alloc_s *alloc = (FAR struct usbstrg_alloc_s *)handle;
- FAR struct usbstrg_dev_s *priv;
- FAR struct usbstrg_lun_s *lun;
+ FAR struct usbmsc_alloc_s *alloc = (FAR struct usbmsc_alloc_s *)handle;
+ FAR struct usbmsc_dev_s *priv;
+ FAR struct usbmsc_lun_s *lun;
FAR struct inode *inode;
struct geometry geo;
int ret;
@@ -1341,7 +1341,7 @@ int usbstrg_bindlun(FAR void *handle, FAR const char *drvrpath,
#ifdef CONFIG_DEBUG
if (!alloc || !drvrpath || startsector < 0 || nsectors < 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_BINLUNINVALIDARGS1), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_BINLUNINVALIDARGS1), 0);
return -EINVAL;
}
#endif
@@ -1351,13 +1351,13 @@ int usbstrg_bindlun(FAR void *handle, FAR const char *drvrpath,
#ifdef CONFIG_DEBUG
if (!priv->luntab)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_INTERNALCONFUSION1), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_INTERNALCONFUSION1), 0);
return -EIO;
}
if (lunno > priv->nluns)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_BINDLUNINVALIDARGS2), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_BINDLUNINVALIDARGS2), 0);
return -EINVAL;
}
#endif
@@ -1367,7 +1367,7 @@ int usbstrg_bindlun(FAR void *handle, FAR const char *drvrpath,
#ifdef CONFIG_DEBUG
if (lun->inode != NULL)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_LUNALREADYBOUND), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_LUNALREADYBOUND), 0);
return -EBUSY;
}
#endif
@@ -1377,7 +1377,7 @@ int usbstrg_bindlun(FAR void *handle, FAR const char *drvrpath,
ret = open_blockdriver(drvrpath, 0, &inode);
if (ret < 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_BLKDRVEOPEN), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_BLKDRVEOPEN), 0);
return ret;
}
@@ -1386,7 +1386,7 @@ int usbstrg_bindlun(FAR void *handle, FAR const char *drvrpath,
if (!inode || !inode->u.i_bops || !inode->u.i_bops->geometry ||
inode->u.i_bops->geometry(inode, &geo) != OK || !geo.geo_available)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_NOGEOMETRY), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_NOGEOMETRY), 0);
return -ENODEV;
}
@@ -1394,7 +1394,7 @@ int usbstrg_bindlun(FAR void *handle, FAR const char *drvrpath,
if (startsector >= geo.geo_nsectors)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_BINDLUNINVALIDARGS3), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_BINDLUNINVALIDARGS3), 0);
return -EDOM;
}
else if (nsectors == 0)
@@ -1403,13 +1403,13 @@ int usbstrg_bindlun(FAR void *handle, FAR const char *drvrpath,
}
else if (startsector + nsectors >= geo.geo_nsectors)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_BINDLUNINVALIDARGS4), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_BINDLUNINVALIDARGS4), 0);
return -EDOM;
}
/* Initialize the LUN structure */
- memset(lun, 0, sizeof(struct usbstrg_lun_s *));
+ memset(lun, 0, sizeof(struct usbmsc_lun_s *));
/* Allocate an I/O buffer big enough to hold one hardware sector. SCSI commands
* are processed one at a time so all LUNs may share a single I/O buffer. The
@@ -1422,7 +1422,7 @@ int usbstrg_bindlun(FAR void *handle, FAR const char *drvrpath,
priv->iobuffer = (uint8_t*)kmalloc(geo.geo_sectorsize);
if (!priv->iobuffer)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_ALLOCIOBUFFER), geo.geo_sectorsize);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_ALLOCIOBUFFER), geo.geo_sectorsize);
return -ENOMEM;
}
priv->iosize = geo.geo_sectorsize;
@@ -1433,7 +1433,7 @@ int usbstrg_bindlun(FAR void *handle, FAR const char *drvrpath,
tmp = (uint8_t*)realloc(priv->iobuffer, geo.geo_sectorsize);
if (!tmp)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_REALLOCIOBUFFER), geo.geo_sectorsize);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_REALLOCIOBUFFER), geo.geo_sectorsize);
return -ENOMEM;
}
@@ -1456,13 +1456,13 @@ int usbstrg_bindlun(FAR void *handle, FAR const char *drvrpath,
}
/****************************************************************************
- * Name: usbstrg_unbindlun
+ * Name: usbmsc_unbindlun
*
* Description:
* Un-bind the block driver for the specified LUN
*
* Input Parameters:
- * handle - The handle returned by a previous call to usbstrg_configure().
+ * handle - The handle returned by a previous call to usbmsc_configure().
* lun - the LUN to unbind from
*
* Returned Value:
@@ -1470,17 +1470,17 @@ int usbstrg_bindlun(FAR void *handle, FAR const char *drvrpath,
*
****************************************************************************/
-int usbstrg_unbindlun(FAR void *handle, unsigned int lunno)
+int usbmsc_unbindlun(FAR void *handle, unsigned int lunno)
{
- FAR struct usbstrg_alloc_s *alloc = (FAR struct usbstrg_alloc_s *)handle;
- FAR struct usbstrg_dev_s *priv;
- FAR struct usbstrg_lun_s *lun;
+ FAR struct usbmsc_alloc_s *alloc = (FAR struct usbmsc_alloc_s *)handle;
+ FAR struct usbmsc_dev_s *priv;
+ FAR struct usbmsc_lun_s *lun;
int ret;
#ifdef CONFIG_DEBUG
if (!alloc)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_UNBINDLUNINVALIDARGS1), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_UNBINDLUNINVALIDARGS1), 0);
return -EINVAL;
}
#endif
@@ -1490,13 +1490,13 @@ int usbstrg_unbindlun(FAR void *handle, unsigned int lunno)
#ifdef CONFIG_DEBUG
if (!priv->luntab)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_INTERNALCONFUSION2), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_INTERNALCONFUSION2), 0);
return -EIO;
}
if (lunno > priv->nluns)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_UNBINDLUNINVALIDARGS2), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_UNBINDLUNINVALIDARGS2), 0);
return -EINVAL;
}
#endif
@@ -1507,7 +1507,7 @@ int usbstrg_unbindlun(FAR void *handle, unsigned int lunno)
#ifdef CONFIG_DEBUG
if (lun->inode == NULL)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_LUNNOTBOUND), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_LUNNOTBOUND), 0);
ret = -EBUSY;
}
else
@@ -1515,7 +1515,7 @@ int usbstrg_unbindlun(FAR void *handle, unsigned int lunno)
{
/* Close the block driver */
- usbstrg_lununinitialize(lun);
+ usbmsc_lununinitialize(lun);
ret = OK;
}
@@ -1524,25 +1524,25 @@ int usbstrg_unbindlun(FAR void *handle, unsigned int lunno)
}
/****************************************************************************
- * Name: usbstrg_exportluns
+ * Name: usbmsc_exportluns
*
* Description:
* After all of the LUNs have been bound, this function may be called
* in order to export those LUNs in the USB storage device.
*
* Input Parameters:
- * handle - The handle returned by a previous call to usbstrg_configure().
+ * handle - The handle returned by a previous call to usbmsc_configure().
*
* Returned Value:
* 0 on success; a negated errno on failure
*
****************************************************************************/
-int usbstrg_exportluns(FAR void *handle)
+int usbmsc_exportluns(FAR void *handle)
{
- FAR struct usbstrg_alloc_s *alloc = (FAR struct usbstrg_alloc_s *)handle;
- FAR struct usbstrg_dev_s *priv;
- FAR struct usbstrg_driver_s *drvr;
+ FAR struct usbmsc_alloc_s *alloc = (FAR struct usbmsc_alloc_s *)handle;
+ FAR struct usbmsc_dev_s *priv;
+ FAR struct usbmsc_driver_s *drvr;
irqstate_t flags;
#ifdef SDCC
pthread_attr_t attr;
@@ -1552,7 +1552,7 @@ int usbstrg_exportluns(FAR void *handle)
#ifdef CONFIG_DEBUG
if (!alloc)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_EXPORTLUNSINVALIDARGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_EXPORTLUNSINVALIDARGS), 0);
return -ENXIO;
}
#endif
@@ -1563,18 +1563,18 @@ int usbstrg_exportluns(FAR void *handle)
/* Start the worker thread */
pthread_mutex_lock(&priv->mutex);
- priv->thstate = USBSTRG_STATE_NOTSTARTED;
- priv->theventset = USBSTRG_EVENT_NOEVENTS;
+ priv->thstate = USBMSC_STATE_NOTSTARTED;
+ priv->theventset = USBMSC_EVENT_NOEVENTS;
#ifdef SDCC
(void)pthread_attr_init(&attr);
- ret = pthread_create(&priv->thread, &attr, usbstrg_workerthread, (pthread_addr_t)priv);
+ ret = pthread_create(&priv->thread, &attr, usbmsc_workerthread, (pthread_addr_t)priv);
#else
- ret = pthread_create(&priv->thread, NULL, usbstrg_workerthread, (pthread_addr_t)priv);
+ ret = pthread_create(&priv->thread, NULL, usbmsc_workerthread, (pthread_addr_t)priv);
#endif
if (ret != OK)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_THREADCREATE), (uint16_t)-ret);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_THREADCREATE), (uint16_t)-ret);
goto errout_with_mutex;
}
@@ -1584,7 +1584,7 @@ int usbstrg_exportluns(FAR void *handle)
ret = usbdev_register(&drvr->drvr);
if (ret != OK)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_DEVREGISTER), (uint16_t)-ret);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_DEVREGISTER), (uint16_t)-ret);
goto errout_with_mutex;
}
#endif
@@ -1592,7 +1592,7 @@ int usbstrg_exportluns(FAR void *handle)
/* Signal to start the thread */
flags = irqsave();
- priv->theventset |= USBSTRG_EVENT_READY;
+ priv->theventset |= USBMSC_EVENT_READY;
pthread_cond_signal(&priv->cond);
irqrestore(flags);
@@ -1602,23 +1602,23 @@ errout_with_mutex:
}
/****************************************************************************
- * Name: usbstrg_uninitialize
+ * Name: usbmsc_uninitialize
*
* Description:
* Un-initialize the USB storage class driver
*
* Input Parameters:
- * handle - The handle returned by a previous call to usbstrg_configure().
+ * handle - The handle returned by a previous call to usbmsc_configure().
*
* Returned Value:
* None
*
****************************************************************************/
-void usbstrg_uninitialize(FAR void *handle)
+void usbmsc_uninitialize(FAR void *handle)
{
- FAR struct usbstrg_alloc_s *alloc = (FAR struct usbstrg_alloc_s *)handle;
- FAR struct usbstrg_dev_s *priv;
+ FAR struct usbmsc_alloc_s *alloc = (FAR struct usbmsc_alloc_s *)handle;
+ FAR struct usbmsc_dev_s *priv;
irqstate_t flags;
#ifdef SDCC
pthread_addr_t result1, result2;
@@ -1631,7 +1631,7 @@ void usbstrg_uninitialize(FAR void *handle)
#ifdef CONFIG_DEBUG
if (!handle)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_UNINITIALIZEINVALIDARGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_UNINITIALIZEINVALIDARGS), 0);
return;
}
#endif
@@ -1639,17 +1639,17 @@ void usbstrg_uninitialize(FAR void *handle)
/* If the thread hasn't already exitted, tell it to exit now */
- if (priv->thstate != USBSTRG_STATE_NOTSTARTED)
+ if (priv->thstate != USBMSC_STATE_NOTSTARTED)
{
/* The thread was started.. Is it still running? */
pthread_mutex_lock(&priv->mutex);
- if (priv->thstate != USBSTRG_STATE_TERMINATED)
+ if (priv->thstate != USBMSC_STATE_TERMINATED)
{
/* Yes.. Ask the thread to stop */
flags = irqsave();
- priv->theventset |= USBSTRG_EVENT_TERMINATEREQUEST;
+ priv->theventset |= USBMSC_EVENT_TERMINATEREQUEST;
pthread_cond_signal(&priv->cond);
irqrestore(flags);
}
@@ -1674,7 +1674,7 @@ void usbstrg_uninitialize(FAR void *handle)
for (i = 0; i < priv->nluns; ++i)
{
- usbstrg_lununinitialize(&priv->luntab[i]);
+ usbmsc_lununinitialize(&priv->luntab[i]);
}
kfree(priv->luntab);
diff --git a/nuttx/drivers/usbdev/msc.h b/nuttx/drivers/usbdev/msc.h
index 1c23f50fd..47cca0e8a 100644
--- a/nuttx/drivers/usbdev/msc.h
+++ b/nuttx/drivers/usbdev/msc.h
@@ -59,140 +59,140 @@
****************************************************************************/
/* Configuration ************************************************************/
/* If the USB mass storage device is configured as part of a composite device
- * then both CONFIG_USBDEV_COMPOSITE and CONFIG_USBSTRG_COMPOSITE must be
+ * then both CONFIG_USBDEV_COMPOSITE and CONFIG_USBMSC_COMPOSITE must be
* defined.
*/
#ifndef CONFIG_USBDEV_COMPOSITE
-# undef CONFIG_USBSTRG_COMPOSITE
+# undef CONFIG_USBMSC_COMPOSITE
#endif
-#if defined(CONFIG_USBSTRG_COMPOSITE) && !defined(CONFIG_USBSTRG_STRBASE)
-# define CONFIG_USBSTRG_STRBASE (4)
+#if defined(CONFIG_USBMSC_COMPOSITE) && !defined(CONFIG_USBMSC_STRBASE)
+# define CONFIG_USBMSC_STRBASE (4)
#endif
/* Interface IDs. If the mass storage driver is built as a component of a
* composite device, then the interface IDs may need to be offset.
*/
-#ifndef CONFIG_USBSTRG_COMPOSITE
-# undef CONFIG_USBSTRG_IFNOBASE
-# define CONFIG_USBSTRG_IFNOBASE 0
+#ifndef CONFIG_USBMSC_COMPOSITE
+# undef CONFIG_USBMSC_IFNOBASE
+# define CONFIG_USBMSC_IFNOBASE 0
#endif
-#ifndef CONFIG_USBSTRG_IFNOBASE
-# define CONFIG_USBSTRG_IFNOBASE 0
+#ifndef CONFIG_USBMSC_IFNOBASE
+# define CONFIG_USBMSC_IFNOBASE 0
#endif
/* Number of requests in the write queue */
-#ifndef CONFIG_USBSTRG_NWRREQS
-# define CONFIG_USBSTRG_NWRREQS 4
+#ifndef CONFIG_USBMSC_NWRREQS
+# define CONFIG_USBMSC_NWRREQS 4
#endif
/* Number of requests in the read queue */
-#ifndef CONFIG_USBSTRG_NRDREQS
-# define CONFIG_USBSTRG_NRDREQS 4
+#ifndef CONFIG_USBMSC_NRDREQS
+# define CONFIG_USBMSC_NRDREQS 4
#endif
/* Logical endpoint numbers / max packet sizes */
-#ifndef CONFIG_USBSTRG_EPBULKOUT
+#ifndef CONFIG_USBMSC_EPBULKOUT
# warning "EPBULKOUT not defined in the configuration"
-# define CONFIG_USBSTRG_EPBULKOUT 2
+# define CONFIG_USBMSC_EPBULKOUT 2
#endif
-#ifndef CONFIG_USBSTRG_EPBULKIN
+#ifndef CONFIG_USBMSC_EPBULKIN
# warning "EPBULKIN not defined in the configuration"
-# define CONFIG_USBSTRG_EPBULKIN 3
+# define CONFIG_USBMSC_EPBULKIN 3
#endif
/* Packet and request buffer sizes */
#ifndef CONFIG_CDCSER_COMPOSITE
-# ifndef CONFIG_USBSTRG_EP0MAXPACKET
-# define CONFIG_USBSTRG_EP0MAXPACKET 64
+# ifndef CONFIG_USBMSC_EP0MAXPACKET
+# define CONFIG_USBMSC_EP0MAXPACKET 64
# endif
#endif
-#ifndef CONFIG_USBSTRG_BULKINREQLEN
+#ifndef CONFIG_USBMSC_BULKINREQLEN
# ifdef CONFIG_USBDEV_DUALSPEED
-# define CONFIG_USBSTRG_BULKINREQLEN 512
+# define CONFIG_USBMSC_BULKINREQLEN 512
# else
-# define CONFIG_USBSTRG_BULKINREQLEN 64
+# define CONFIG_USBMSC_BULKINREQLEN 64
# endif
#else
# ifdef CONFIG_USBDEV_DUALSPEED
-# if CONFIG_USBSTRG_BULKINREQLEN < 512
+# if CONFIG_USBMSC_BULKINREQLEN < 512
# warning "Bulk in buffer size smaller than max packet"
-# undef CONFIG_USBSTRG_BULKINREQLEN
-# define CONFIG_USBSTRG_BULKINREQLEN 512
+# undef CONFIG_USBMSC_BULKINREQLEN
+# define CONFIG_USBMSC_BULKINREQLEN 512
# endif
# else
-# if CONFIG_USBSTRG_BULKINREQLEN < 64
+# if CONFIG_USBMSC_BULKINREQLEN < 64
# warning "Bulk in buffer size smaller than max packet"
-# undef CONFIG_USBSTRG_BULKINREQLEN
-# define CONFIG_USBSTRG_BULKINREQLEN 64
+# undef CONFIG_USBMSC_BULKINREQLEN
+# define CONFIG_USBMSC_BULKINREQLEN 64
# endif
# endif
#endif
-#ifndef CONFIG_USBSTRG_BULKOUTREQLEN
+#ifndef CONFIG_USBMSC_BULKOUTREQLEN
# ifdef CONFIG_USBDEV_DUALSPEED
-# define CONFIG_USBSTRG_BULKOUTREQLEN 512
+# define CONFIG_USBMSC_BULKOUTREQLEN 512
# else
-# define CONFIG_USBSTRG_BULKOUTREQLEN 64
+# define CONFIG_USBMSC_BULKOUTREQLEN 64
# endif
#else
# ifdef CONFIG_USBDEV_DUALSPEED
-# if CONFIG_USBSTRG_BULKOUTREQLEN < 512
+# if CONFIG_USBMSC_BULKOUTREQLEN < 512
# warning "Bulk in buffer size smaller than max packet"
-# undef CONFIG_USBSTRG_BULKOUTREQLEN
-# define CONFIG_USBSTRG_BULKOUTREQLEN 512
+# undef CONFIG_USBMSC_BULKOUTREQLEN
+# define CONFIG_USBMSC_BULKOUTREQLEN 512
# endif
# else
-# if CONFIG_USBSTRG_BULKOUTREQLEN < 64
+# if CONFIG_USBMSC_BULKOUTREQLEN < 64
# warning "Bulk in buffer size smaller than max packet"
-# undef CONFIG_USBSTRG_BULKOUTREQLEN
-# define CONFIG_USBSTRG_BULKOUTREQLEN 64
+# undef CONFIG_USBMSC_BULKOUTREQLEN
+# define CONFIG_USBMSC_BULKOUTREQLEN 64
# endif
# endif
#endif
/* Vendor and product IDs and strings */
-#ifndef CONFIG_USBSTRG_COMPOSITE
-# ifndef CONFIG_USBSTRG_VENDORID
-# warning "CONFIG_USBSTRG_VENDORID not defined"
-# define CONFIG_USBSTRG_VENDORID 0x584e
+#ifndef CONFIG_USBMSC_COMPOSITE
+# ifndef CONFIG_USBMSC_VENDORID
+# warning "CONFIG_USBMSC_VENDORID not defined"
+# define CONFIG_USBMSC_VENDORID 0x584e
# endif
-# ifndef CONFIG_USBSTRG_PRODUCTID
-# warning "CONFIG_USBSTRG_PRODUCTID not defined"
-# define CONFIG_USBSTRG_PRODUCTID 0x5342
+# ifndef CONFIG_USBMSC_PRODUCTID
+# warning "CONFIG_USBMSC_PRODUCTID not defined"
+# define CONFIG_USBMSC_PRODUCTID 0x5342
# endif
-# ifndef CONFIG_USBSTRG_VERSIONNO
-# define CONFIG_USBSTRG_VERSIONNO (0x0399)
+# ifndef CONFIG_USBMSC_VERSIONNO
+# define CONFIG_USBMSC_VERSIONNO (0x0399)
# endif
-# ifndef CONFIG_USBSTRG_VENDORSTR
+# ifndef CONFIG_USBMSC_VENDORSTR
# warning "No Vendor string specified"
-# define CONFIG_USBSTRG_VENDORSTR "NuttX"
+# define CONFIG_USBMSC_VENDORSTR "NuttX"
# endif
-# ifndef CONFIG_USBSTRG_PRODUCTSTR
+# ifndef CONFIG_USBMSC_PRODUCTSTR
# warning "No Product string specified"
-# define CONFIG_USBSTRG_PRODUCTSTR "USBdev Storage"
+# define CONFIG_USBMSC_PRODUCTSTR "USBdev Storage"
# endif
-# undef CONFIG_USBSTRG_SERIALSTR
-# define CONFIG_USBSTRG_SERIALSTR "0101"
+# undef CONFIG_USBMSC_SERIALSTR
+# define CONFIG_USBMSC_SERIALSTR "0101"
#endif
-#undef CONFIG_USBSTRG_CONFIGSTR
-#define CONFIG_USBSTRG_CONFIGSTR "Bulk"
+#undef CONFIG_USBMSC_CONFIGSTR
+#define CONFIG_USBMSC_CONFIGSTR "Bulk"
/* Debug -- must be consistent with include/debug.h */
@@ -220,8 +220,8 @@
/* Packet and request buffer sizes */
-#ifndef CONFIG_USBSTRG_EP0MAXPACKET
-# define CONFIG_USBSTRG_EP0MAXPACKET 64
+#ifndef CONFIG_USBMSC_EP0MAXPACKET
+# define CONFIG_USBMSC_EP0MAXPACKET 64
#endif
/* USB Controller */
@@ -244,131 +244,131 @@
/* Current state of the worker thread */
-#define USBSTRG_STATE_NOTSTARTED (0) /* Thread has not yet been started */
-#define USBSTRG_STATE_STARTED (1) /* Started, but is not yet initialized */
-#define USBSTRG_STATE_IDLE (2) /* Started and waiting for commands */
-#define USBSTRG_STATE_CMDPARSE (3) /* Processing a received command */
-#define USBSTRG_STATE_CMDREAD (4) /* Processing a SCSI read command */
-#define USBSTRG_STATE_CMDWRITE (5) /* Processing a SCSI write command */
-#define USBSTRG_STATE_CMDFINISH (6) /* Finish command processing */
-#define USBSTRG_STATE_CMDSTATUS (7) /* Processing the final status of the command */
-#define USBSTRG_STATE_TERMINATED (8) /* Thread has exitted */
+#define USBMSC_STATE_NOTSTARTED (0) /* Thread has not yet been started */
+#define USBMSC_STATE_STARTED (1) /* Started, but is not yet initialized */
+#define USBMSC_STATE_IDLE (2) /* Started and waiting for commands */
+#define USBMSC_STATE_CMDPARSE (3) /* Processing a received command */
+#define USBMSC_STATE_CMDREAD (4) /* Processing a SCSI read command */
+#define USBMSC_STATE_CMDWRITE (5) /* Processing a SCSI write command */
+#define USBMSC_STATE_CMDFINISH (6) /* Finish command processing */
+#define USBMSC_STATE_CMDSTATUS (7) /* Processing the final status of the command */
+#define USBMSC_STATE_TERMINATED (8) /* Thread has exitted */
/* Event communicated to worker thread */
-#define USBSTRG_EVENT_NOEVENTS (0) /* There are no outstanding events */
-#define USBSTRG_EVENT_READY (1 << 0) /* Initialization is complete */
-#define USBSTRG_EVENT_RDCOMPLETE (1 << 1) /* A read has completed there is data to be processed */
-#define USBSTRG_EVENT_WRCOMPLETE (1 << 2) /* A write has completed and a request is available */
-#define USBSTRG_EVENT_TERMINATEREQUEST (1 << 3) /* Shutdown requested */
-#define USBSTRG_EVENT_DISCONNECT (1 << 4) /* USB disconnect received */
-#define USBSTRG_EVENT_RESET (1 << 5) /* USB storage setup reset received */
-#define USBSTRG_EVENT_CFGCHANGE (1 << 6) /* USB setup configuration change received */
-#define USBSTRG_EVENT_IFCHANGE (1 << 7) /* USB setup interface change received */
-#define USBSTRG_EVENT_ABORTBULKOUT (1 << 8) /* SCSI receive failure */
-
-/* SCSI command flags (passed to usbstrg_setupcmd()) */
-
-#define USBSTRG_FLAGS_DIRMASK (0x03) /* Bits 0-1: Data direction */
-#define USBSTRG_FLAGS_DIRNONE (0x00) /* No data to send */
-#define USBSTRG_FLAGS_DIRHOST2DEVICE (0x01) /* Host-to-device */
-#define USBSTRG_FLAGS_DIRDEVICE2HOST (0x02) /* Device-to-host */
-#define USBSTRG_FLAGS_BLOCKXFR (0x04) /* Bit 2: Command is a block transfer request */
-#define USBSTRG_FLAGS_LUNNOTNEEDED (0x08) /* Bit 3: Command does not require a valid LUN */
-#define USBSTRG_FLAGS_UACOKAY (0x10) /* Bit 4: Command OK if unit attention condition */
-#define USBSTRG_FLAGS_RETAINSENSEDATA (0x20) /* Bit 5: Do not clear sense data */
+#define USBMSC_EVENT_NOEVENTS (0) /* There are no outstanding events */
+#define USBMSC_EVENT_READY (1 << 0) /* Initialization is complete */
+#define USBMSC_EVENT_RDCOMPLETE (1 << 1) /* A read has completed there is data to be processed */
+#define USBMSC_EVENT_WRCOMPLETE (1 << 2) /* A write has completed and a request is available */
+#define USBMSC_EVENT_TERMINATEREQUEST (1 << 3) /* Shutdown requested */
+#define USBMSC_EVENT_DISCONNECT (1 << 4) /* USB disconnect received */
+#define USBMSC_EVENT_RESET (1 << 5) /* USB storage setup reset received */
+#define USBMSC_EVENT_CFGCHANGE (1 << 6) /* USB setup configuration change received */
+#define USBMSC_EVENT_IFCHANGE (1 << 7) /* USB setup interface change received */
+#define USBMSC_EVENT_ABORTBULKOUT (1 << 8) /* SCSI receive failure */
+
+/* SCSI command flags (passed to usbmsc_setupcmd()) */
+
+#define USBMSC_FLAGS_DIRMASK (0x03) /* Bits 0-1: Data direction */
+#define USBMSC_FLAGS_DIRNONE (0x00) /* No data to send */
+#define USBMSC_FLAGS_DIRHOST2DEVICE (0x01) /* Host-to-device */
+#define USBMSC_FLAGS_DIRDEVICE2HOST (0x02) /* Device-to-host */
+#define USBMSC_FLAGS_BLOCKXFR (0x04) /* Bit 2: Command is a block transfer request */
+#define USBMSC_FLAGS_LUNNOTNEEDED (0x08) /* Bit 3: Command does not require a valid LUN */
+#define USBMSC_FLAGS_UACOKAY (0x10) /* Bit 4: Command OK if unit attention condition */
+#define USBMSC_FLAGS_RETAINSENSEDATA (0x20) /* Bit 5: Do not clear sense data */
/* Descriptors **************************************************************/
/* Big enough to hold our biggest descriptor */
-#define USBSTRG_MXDESCLEN (64)
+#define USBMSC_MXDESCLEN (64)
/* String language */
-#define USBSTRG_STR_LANGUAGE (0x0409) /* en-us */
+#define USBMSC_STR_LANGUAGE (0x0409) /* en-us */
/* Descriptor strings */
-#ifndef CONFIG_USBSTRG_COMPOSITE
-# define USBSTRG_MANUFACTURERSTRID (1)
-# define USBSTRG_PRODUCTSTRID (2)
-# define USBSTRG_SERIALSTRID (3)
-# define USBSTRG_CONFIGSTRID (4)
-# define USBSTRG_INTERFACESTRID USBSTRG_CONFIGSTRID
+#ifndef CONFIG_USBMSC_COMPOSITE
+# define USBMSC_MANUFACTURERSTRID (1)
+# define USBMSC_PRODUCTSTRID (2)
+# define USBMSC_SERIALSTRID (3)
+# define USBMSC_CONFIGSTRID (4)
+# define USBMSC_INTERFACESTRID USBMSC_CONFIGSTRID
-# undef CONFIG_USBSTRG_STRBASE
-# define CONFIG_USBSTRG_STRBASE (4)
+# undef CONFIG_USBMSC_STRBASE
+# define CONFIG_USBMSC_STRBASE (4)
#else
-# define USBSTRG_INTERFACESTRID (CONFIG_USBSTRG_STRBASE+1)
+# define USBMSC_INTERFACESTRID (CONFIG_USBMSC_STRBASE+1)
#endif
-#define USBSTRG_LASTSTRID USBSTRG_INTERFACESTRID
+#define USBMSC_LASTSTRID USBMSC_INTERFACESTRID
-#define USBSTRG_NCONFIGS (1) /* Number of configurations supported */
+#define USBMSC_NCONFIGS (1) /* Number of configurations supported */
/* Configuration Descriptor */
-#define USBSTRG_NINTERFACES (1) /* Number of interfaces in the configuration */
-#define USBSTRG_INTERFACEID (CONFIG_USBSTRG_IFNOBASE+0)
-#define USBSTRG_ALTINTERFACEID USBSTRG_INTERFACEID
+#define USBMSC_NINTERFACES (1) /* Number of interfaces in the configuration */
+#define USBMSC_INTERFACEID (CONFIG_USBMSC_IFNOBASE+0)
+#define USBMSC_ALTINTERFACEID USBMSC_INTERFACEID
-#define USBSTRG_CONFIGIDNONE (0) /* Config ID means to return to address mode */
-#define USBSTRG_CONFIGID (1) /* The only supported configuration ID */
+#define USBMSC_CONFIGIDNONE (0) /* Config ID means to return to address mode */
+#define USBMSC_CONFIGID (1) /* The only supported configuration ID */
/* Interface description */
-#define USBSTRG_NENDPOINTS (2) /* Number of endpoints in the interface */
+#define USBMSC_NENDPOINTS (2) /* Number of endpoints in the interface */
/* Endpoint configuration */
-#define USBSTRG_EPOUTBULK_ADDR (CONFIG_USBSTRG_EPBULKOUT)
-#define USBSTRG_EPOUTBULK_ATTR (USB_EP_ATTR_XFER_BULK)
+#define USBMSC_EPOUTBULK_ADDR (CONFIG_USBMSC_EPBULKOUT)
+#define USBMSC_EPOUTBULK_ATTR (USB_EP_ATTR_XFER_BULK)
-#define USBSTRG_EPINBULK_ADDR (USB_DIR_IN|CONFIG_USBSTRG_EPBULKIN)
-#define USBSTRG_EPINBULK_ATTR (USB_EP_ATTR_XFER_BULK)
+#define USBMSC_EPINBULK_ADDR (USB_DIR_IN|CONFIG_USBMSC_EPBULKIN)
+#define USBMSC_EPINBULK_ATTR (USB_EP_ATTR_XFER_BULK)
-#define USBSTRG_HSBULKMAXPACKET (512)
-#define USBSTRG_HSBULKMXPKTSHIFT (9)
-#define USBSTRG_HSBULKMXPKTMASK (0x000001ff)
-#define USBSTRG_FSBULKMAXPACKET (64)
-#define USBSTRG_FSBULKMXPKTSHIFT (6)
-#define USBSTRG_FSBULKMXPKTMASK (0x0000003f)
+#define USBMSC_HSBULKMAXPACKET (512)
+#define USBMSC_HSBULKMXPKTSHIFT (9)
+#define USBMSC_HSBULKMXPKTMASK (0x000001ff)
+#define USBMSC_FSBULKMAXPACKET (64)
+#define USBMSC_FSBULKMXPKTSHIFT (6)
+#define USBMSC_FSBULKMXPKTMASK (0x0000003f)
/* Macros for dual speed vs. full speed only operation */
#ifdef CONFIG_USBDEV_DUALSPEED
-# define USBSTRG_EPBULKINDESC(hs) \
- usbstrg_getepdesc((hs) ? USBSTRG_EPHSBULKIN : USBSTRG_EPFSBULKIN)
-# define USBSTRG_EPBULKOUTDESC(hs) \
- usbstrg_getepdesc((hs) ? USBSTRG_EPHSBULKOUT : USBSTRG_EPFSBULKOUT)
-# define USBSTRG_BULKMAXPACKET(hs) \
- ((hs) ? USBSTRG_HSBULKMAXPACKET : USBSTRG_FSBULKMAXPACKET)
-# define USBSTRG_BULKMXPKTSHIFT(d) \
- (((d)->speed==USB_SPEED_HIGH) ? USBSTRG_HSBULKMXPKTSHIFT : USBSTRG_FSBULKMXPKTSHIFT)
-# define USBSTRG_BULKMXPKTMASK(d) \
- (((d)->speed==USB_SPEED_HIGH) ? USBSTRG_HSBULKMXPKTMASK : USBSTRG_FSBULKMXPKTMASK)
+# define USBMSC_EPBULKINDESC(hs) \
+ usbmsc_getepdesc((hs) ? USBMSC_EPHSBULKIN : USBMSC_EPFSBULKIN)
+# define USBMSC_EPBULKOUTDESC(hs) \
+ usbmsc_getepdesc((hs) ? USBMSC_EPHSBULKOUT : USBMSC_EPFSBULKOUT)
+# define USBMSC_BULKMAXPACKET(hs) \
+ ((hs) ? USBMSC_HSBULKMAXPACKET : USBMSC_FSBULKMAXPACKET)
+# define USBMSC_BULKMXPKTSHIFT(d) \
+ (((d)->speed==USB_SPEED_HIGH) ? USBMSC_HSBULKMXPKTSHIFT : USBMSC_FSBULKMXPKTSHIFT)
+# define USBMSC_BULKMXPKTMASK(d) \
+ (((d)->speed==USB_SPEED_HIGH) ? USBMSC_HSBULKMXPKTMASK : USBMSC_FSBULKMXPKTMASK)
#else
-# define USBSTRG_EPBULKINDESC(d) usbstrg_getepdesc(USBSTRG_EPFSBULKIN)
-# define USBSTRG_EPBULKOUTDESC(d) usbstrg_getepdesc(USBSTRG_EPFSBULKOUT)
-# define USBSTRG_BULKMAXPACKET(hs) USBSTRG_FSBULKMAXPACKET
-# define USBSTRG_BULKMXPKTSHIFT(d) USBSTRG_FSBULKMXPKTSHIFT
-# define USBSTRG_BULKMXPKTMASK(d) USBSTRG_FSBULKMXPKTMASK
+# define USBMSC_EPBULKINDESC(d) usbmsc_getepdesc(USBMSC_EPFSBULKIN)
+# define USBMSC_EPBULKOUTDESC(d) usbmsc_getepdesc(USBMSC_EPFSBULKOUT)
+# define USBMSC_BULKMAXPACKET(hs) USBMSC_FSBULKMAXPACKET
+# define USBMSC_BULKMXPKTSHIFT(d) USBMSC_FSBULKMXPKTSHIFT
+# define USBMSC_BULKMXPKTMASK(d) USBMSC_FSBULKMXPKTMASK
#endif
/* Configuration descriptor size */
-#ifndef CONFIG_USBSTRG_COMPOSITE
+#ifndef CONFIG_USBMSC_COMPOSITE
/* Number of individual descriptors in the configuration descriptor:
* (1) Configuration descriptor + (1) interface descriptor + (2) interface
* descriptors.
*/
-# define USBSTRG_CFGGROUP_SIZE (4)
+# define USBMSC_CFGGROUP_SIZE (4)
/* The size of the config descriptor: (9 + 9 + 2*7) = 32 */
-# define SIZEOF_USBSTRG_CFGDESC \
+# define SIZEOF_USBMSC_CFGDESC \
(USB_SIZEOF_CFGDESC + USB_SIZEOF_IFDESC + 2*USB_SIZEOF_EPDESC)
#else
@@ -376,18 +376,18 @@
* (1) interface descriptor + (2) interface descriptors.
*/
-# define USBSTRG_CFGGROUP_SIZE (3)
+# define USBMSC_CFGGROUP_SIZE (3)
/* The size of the config descriptor: (9 + 2*7) = 23 */
-# define SIZEOF_USBSTRG_CFGDESC (USB_SIZEOF_IFDESC + 2*USB_SIZEOF_EPDESC)
+# define SIZEOF_USBMSC_CFGDESC (USB_SIZEOF_IFDESC + 2*USB_SIZEOF_EPDESC)
#endif
/* Block driver helpers *****************************************************/
-#define USBSTRG_DRVR_READ(l,b,s,n) ((l)->inode->u.i_bops->read((l)->inode,b,s,n))
-#define USBSTRG_DRVR_WRITE(l,b,s,n) ((l)->inode->u.i_bops->write((l)->inode,b,s,n))
-#define USBSTRG_DRVR_GEOMETRY(l,g) ((l)->inode->u.i_bops->geometry((l)->inode,g))
+#define USBMSC_DRVR_READ(l,b,s,n) ((l)->inode->u.i_bops->read((l)->inode,b,s,n))
+#define USBMSC_DRVR_WRITE(l,b,s,n) ((l)->inode->u.i_bops->write((l)->inode,b,s,n))
+#define USBMSC_DRVR_GEOMETRY(l,g) ((l)->inode->u.i_bops->geometry((l)->inode,g))
/* Everpresent MIN/MAX macros ***********************************************/
@@ -404,28 +404,28 @@
****************************************************************************/
/* Endpoint descriptors */
-enum usbstrg_epdesc_e
+enum usbmsc_epdesc_e
{
- USBSTRG_EPFSBULKOUT = 0, /* Full speed bulk OUT endpoint descriptor */
- USBSTRG_EPFSBULKIN /* Full speed bulk IN endpoint descriptor */
+ USBMSC_EPFSBULKOUT = 0, /* Full speed bulk OUT endpoint descriptor */
+ USBMSC_EPFSBULKIN /* Full speed bulk IN endpoint descriptor */
#ifdef CONFIG_USBDEV_DUALSPEED
,
- USBSTRG_EPHSBULKOUT, /* High speed bulk OUT endpoint descriptor */
- USBSTRG_EPHSBULKIN /* High speed bulk IN endpoint descriptor */
+ USBMSC_EPHSBULKOUT, /* High speed bulk OUT endpoint descriptor */
+ USBMSC_EPHSBULKIN /* High speed bulk IN endpoint descriptor */
#endif
};
/* Container to support a list of requests */
-struct usbstrg_req_s
+struct usbmsc_req_s
{
- FAR struct usbstrg_req_s *flink; /* Implements a singly linked list */
+ FAR struct usbmsc_req_s *flink; /* Implements a singly linked list */
FAR struct usbdev_req_s *req; /* The contained request */
};
/* This structure describes one LUN: */
-struct usbstrg_lun_s
+struct usbmsc_lun_s
{
struct inode *inode; /* Inode structure of open'ed block driver */
uint8_t readonly:1; /* Media is read-only */
@@ -440,7 +440,7 @@ struct usbstrg_lun_s
/* Describes the overall state of the driver */
-struct usbstrg_dev_s
+struct usbmsc_dev_s
{
FAR struct usbdev_s *usbdev; /* usbdev driver pointer (Non-null if registered) */
@@ -466,12 +466,12 @@ struct usbstrg_dev_s
/* SCSI command processing */
- struct usbstrg_lun_s *lun; /* Currently selected LUN */
- struct usbstrg_lun_s *luntab; /* Allocated table of all LUNs */
- uint8_t cdb[USBSTRG_MAXCDBLEN]; /* Command data (cdb[]) from CBW */
+ struct usbmsc_lun_s *lun; /* Currently selected LUN */
+ struct usbmsc_lun_s *luntab; /* Allocated table of all LUNs */
+ uint8_t cdb[USBMSC_MAXCDBLEN]; /* Command data (cdb[]) from CBW */
uint8_t phaseerror:1; /* Need to send phase sensing status */
uint8_t shortpacket:1; /* Host transmission stopped unexpectedly */
- uint8_t cbwdir:2; /* Direction from CBW. See USBSTRG_FLAGS_DIR* definitions */
+ uint8_t cbwdir:2; /* Direction from CBW. See USBMSC_FLAGS_DIR* definitions */
uint8_t cdblen; /* Length of cdb[] from CBW */
uint8_t cbwlun; /* LUN from the CBW */
uint16_t nsectbytes; /* Bytes buffered in iobuffer[] */
@@ -498,8 +498,8 @@ struct usbstrg_dev_s
* EPBULKIN; Read requests will be queued in the EBULKOUT.
*/
- struct usbstrg_req_s wrreqs[CONFIG_USBSTRG_NWRREQS];
- struct usbstrg_req_s rdreqs[CONFIG_USBSTRG_NRDREQS];
+ struct usbmsc_req_s wrreqs[CONFIG_USBMSC_NWRREQS];
+ struct usbmsc_req_s rdreqs[CONFIG_USBMSC_NRDREQS];
};
/****************************************************************************
@@ -519,7 +519,7 @@ extern "C"
/* Mass storage class vendor/product/serial number strings */
-#ifndef CONFIG_USBSTRG_COMPOSITE
+#ifndef CONFIG_USBMSC_COMPOSITE
EXTERN const char g_mscvendorstr[];
EXTERN const char g_mscproductstr[];
EXTERN const char g_mscserialstr[];
@@ -542,7 +542,7 @@ EXTERN const char g_compserialstr[];
************************************************************************************/
/************************************************************************************
- * Name: usbstrg_mkstrdesc
+ * Name: usbmsc_mkstrdesc
*
* Description:
* Construct a string descriptor
@@ -550,22 +550,22 @@ EXTERN const char g_compserialstr[];
************************************************************************************/
struct usb_strdesc_s;
-int usbstrg_mkstrdesc(uint8_t id, struct usb_strdesc_s *strdesc);
+int usbmsc_mkstrdesc(uint8_t id, struct usb_strdesc_s *strdesc);
/************************************************************************************
- * Name: usbstrg_getepdesc
+ * Name: usbmsc_getepdesc
*
* Description:
* Return a pointer to the raw device descriptor
*
************************************************************************************/
-#ifndef CONFIG_USBSTRG_COMPOSITE
-FAR const struct usb_devdesc_s *usbstrg_getdevdesc(void);
+#ifndef CONFIG_USBMSC_COMPOSITE
+FAR const struct usb_devdesc_s *usbmsc_getdevdesc(void);
#endif
/************************************************************************************
- * Name: usbstrg_getepdesc
+ * Name: usbmsc_getepdesc
*
* Description:
* Return a pointer to the raw endpoint descriptor (used for configuring endpoints)
@@ -573,10 +573,10 @@ FAR const struct usb_devdesc_s *usbstrg_getdevdesc(void);
************************************************************************************/
struct usb_epdesc_s;
-FAR const struct usb_epdesc_s *usbstrg_getepdesc(enum usbstrg_epdesc_e epid);
+FAR const struct usb_epdesc_s *usbmsc_getepdesc(enum usbmsc_epdesc_e epid);
/************************************************************************************
- * Name: usbstrg_mkcfgdesc
+ * Name: usbmsc_mkcfgdesc
*
* Description:
* Construct the configuration descriptor
@@ -584,25 +584,25 @@ FAR const struct usb_epdesc_s *usbstrg_getepdesc(enum usbstrg_epdesc_e epid);
************************************************************************************/
#ifdef CONFIG_USBDEV_DUALSPEED
-int16_t usbstrg_mkcfgdesc(FAR uint8_t *buf, uint8_t speed, uint8_t type);
+int16_t usbmsc_mkcfgdesc(FAR uint8_t *buf, uint8_t speed, uint8_t type);
#else
-int16_t usbstrg_mkcfgdesc(FAR uint8_t *buf);
+int16_t usbmsc_mkcfgdesc(FAR uint8_t *buf);
#endif
/************************************************************************************
- * Name: usbstrg_getqualdesc
+ * Name: usbmsc_getqualdesc
*
* Description:
* Return a pointer to the raw qual descriptor
*
************************************************************************************/
-#if !defined(CONFIG_USBSTRG_COMPOSITE) && defined(CONFIG_USBDEV_DUALSPEED)
-FAR const struct usb_qualdesc_s *usbstrg_getqualdesc(void);
+#if !defined(CONFIG_USBMSC_COMPOSITE) && defined(CONFIG_USBDEV_DUALSPEED)
+FAR const struct usb_qualdesc_s *usbmsc_getqualdesc(void);
#endif
/****************************************************************************
- * Name: usbstrg_workerthread
+ * Name: usbmsc_workerthread
*
* Description:
* This is the main function of the USB storage worker thread. It loops
@@ -610,10 +610,10 @@ FAR const struct usb_qualdesc_s *usbstrg_getqualdesc(void);
*
****************************************************************************/
-EXTERN void *usbstrg_workerthread(void *arg);
+EXTERN void *usbmsc_workerthread(void *arg);
/****************************************************************************
- * Name: usbstrg_setconfig
+ * Name: usbmsc_setconfig
*
* Description:
* Set the device configuration by allocating and configuring endpoints and
@@ -621,20 +621,20 @@ EXTERN void *usbstrg_workerthread(void *arg);
*
****************************************************************************/
-EXTERN int usbstrg_setconfig(FAR struct usbstrg_dev_s *priv, uint8_t config);
+EXTERN int usbmsc_setconfig(FAR struct usbmsc_dev_s *priv, uint8_t config);
/****************************************************************************
- * Name: usbstrg_resetconfig
+ * Name: usbmsc_resetconfig
*
* Description:
* Mark the device as not configured and disable all endpoints.
*
****************************************************************************/
-EXTERN void usbstrg_resetconfig(FAR struct usbstrg_dev_s *priv);
+EXTERN void usbmsc_resetconfig(FAR struct usbmsc_dev_s *priv);
/****************************************************************************
- * Name: usbstrg_wrcomplete
+ * Name: usbmsc_wrcomplete
*
* Description:
* Handle completion of write request. This function probably executes
@@ -642,11 +642,11 @@ EXTERN void usbstrg_resetconfig(FAR struct usbstrg_dev_s *priv);
*
****************************************************************************/
-EXTERN void usbstrg_wrcomplete(FAR struct usbdev_ep_s *ep,
- FAR struct usbdev_req_s *req);
+EXTERN void usbmsc_wrcomplete(FAR struct usbdev_ep_s *ep,
+ FAR struct usbdev_req_s *req);
/****************************************************************************
- * Name: usbstrg_rdcomplete
+ * Name: usbmsc_rdcomplete
*
* Description:
* Handle completion of read request on the bulk OUT endpoint. This
@@ -654,11 +654,11 @@ EXTERN void usbstrg_wrcomplete(FAR struct usbdev_ep_s *ep,
*
****************************************************************************/
-EXTERN void usbstrg_rdcomplete(FAR struct usbdev_ep_s *ep,
- FAR struct usbdev_req_s *req);
+EXTERN void usbmsc_rdcomplete(FAR struct usbdev_ep_s *ep,
+ FAR struct usbdev_req_s *req);
/****************************************************************************
- * Name: usbstrg_deferredresponse
+ * Name: usbmsc_deferredresponse
*
* Description:
* Some EP0 setup request cannot be responded to immediately becuase they
@@ -668,7 +668,7 @@ EXTERN void usbstrg_rdcomplete(FAR struct usbdev_ep_s *ep,
*
* 1. USB_REQ_SETCONFIGURATION,
* 2. USB_REQ_SETINTERFACE, or
- * 3. USBSTRG_REQ_MSRESET
+ * 3. USBMSC_REQ_MSRESET
*
* In all cases, the success reponse is a zero-length packet; the failure
* response is an EP0 stall.
@@ -679,7 +679,7 @@ EXTERN void usbstrg_rdcomplete(FAR struct usbdev_ep_s *ep,
*
****************************************************************************/
-EXTERN void usbstrg_deferredresponse(FAR struct usbstrg_dev_s *priv, bool failed);
+EXTERN void usbmsc_deferredresponse(FAR struct usbmsc_dev_s *priv, bool failed);
#undef EXTERN
#if defined(__cplusplus)
diff --git a/nuttx/drivers/usbdev/msc_descriptors.c b/nuttx/drivers/usbdev/msc_descriptors.c
index 8d9e8a839..467eaced8 100644
--- a/nuttx/drivers/usbdev/msc_descriptors.c
+++ b/nuttx/drivers/usbdev/msc_descriptors.c
@@ -71,7 +71,7 @@
* composite device logic.
*/
-#ifndef CONFIG_USBSTRG_COMPOSITE
+#ifndef CONFIG_USBMSC_COMPOSITE
static const struct usb_devdesc_s g_devdesc =
{
USB_SIZEOF_DEVDESC, /* len */
@@ -80,22 +80,22 @@ static const struct usb_devdesc_s g_devdesc =
USB_CLASS_PER_INTERFACE, /* class */
0, /* subclass */
0, /* protocol */
- CONFIG_USBSTRG_EP0MAXPACKET, /* maxpacketsize */
+ CONFIG_USBMSC_EP0MAXPACKET, /* maxpacketsize */
{ /* vendor */
- LSBYTE(CONFIG_USBSTRG_VENDORID),
- MSBYTE(CONFIG_USBSTRG_VENDORID)
+ LSBYTE(CONFIG_USBMSC_VENDORID),
+ MSBYTE(CONFIG_USBMSC_VENDORID)
},
{ /* product */
- LSBYTE(CONFIG_USBSTRG_PRODUCTID),
- MSBYTE(CONFIG_USBSTRG_PRODUCTID) },
+ LSBYTE(CONFIG_USBMSC_PRODUCTID),
+ MSBYTE(CONFIG_USBMSC_PRODUCTID) },
{ /* device */
- LSBYTE(CONFIG_USBSTRG_VERSIONNO),
- MSBYTE(CONFIG_USBSTRG_VERSIONNO)
+ LSBYTE(CONFIG_USBMSC_VERSIONNO),
+ MSBYTE(CONFIG_USBMSC_VERSIONNO)
},
- USBSTRG_MANUFACTURERSTRID, /* imfgr */
- USBSTRG_PRODUCTSTRID, /* iproduct */
- USBSTRG_SERIALSTRID, /* serno */
- USBSTRG_NCONFIGS /* nconfigs */
+ USBMSC_MANUFACTURERSTRID, /* imfgr */
+ USBMSC_PRODUCTSTRID, /* iproduct */
+ USBMSC_SERIALSTRID, /* serno */
+ USBMSC_NCONFIGS /* nconfigs */
};
#endif
@@ -104,15 +104,15 @@ static const struct usb_devdesc_s g_devdesc =
* composite device logic.
*/
-#ifndef CONFIG_USBSTRG_COMPOSITE
+#ifndef CONFIG_USBMSC_COMPOSITE
static const struct usb_cfgdesc_s g_cfgdesc =
{
USB_SIZEOF_CFGDESC, /* len */
USB_DESC_TYPE_CONFIG, /* type */
{0, 0}, /* totallen -- to be provided */
- USBSTRG_NINTERFACES, /* ninterfaces */
- USBSTRG_CONFIGID, /* cfgvalue */
- USBSTRG_CONFIGSTRID, /* icfg */
+ USBMSC_NINTERFACES, /* ninterfaces */
+ USBMSC_CONFIGID, /* cfgvalue */
+ USBMSC_CONFIGSTRID, /* icfg */
USB_CONFIG_ATTR_ONE|SELFPOWERED|REMOTEWAKEUP, /* attr */
(CONFIG_USBDEV_MAXPOWER + 1) / 2 /* mxpower */
};
@@ -124,13 +124,13 @@ static const struct usb_ifdesc_s g_ifdesc =
{
USB_SIZEOF_IFDESC, /* len */
USB_DESC_TYPE_INTERFACE, /* type */
- USBSTRG_INTERFACEID, /* ifno */
- USBSTRG_ALTINTERFACEID, /* alt */
- USBSTRG_NENDPOINTS, /* neps */
+ USBMSC_INTERFACEID, /* ifno */
+ USBMSC_ALTINTERFACEID, /* alt */
+ USBMSC_NENDPOINTS, /* neps */
USB_CLASS_MASS_STORAGE, /* class */
- USBSTRG_SUBCLASS_SCSI, /* subclass */
- USBSTRG_PROTO_BULKONLY, /* protocol */
- USBSTRG_INTERFACESTRID /* iif */
+ USBMSC_SUBCLASS_SCSI, /* subclass */
+ USBMSC_PROTO_BULKONLY, /* protocol */
+ USBMSC_INTERFACESTRID /* iif */
};
/* Endpoint descriptors */
@@ -139,11 +139,11 @@ static const struct usb_epdesc_s g_fsepbulkoutdesc =
{
USB_SIZEOF_EPDESC, /* len */
USB_DESC_TYPE_ENDPOINT, /* type */
- USBSTRG_EPOUTBULK_ADDR, /* addr */
- USBSTRG_EPOUTBULK_ATTR, /* attr */
+ USBMSC_EPOUTBULK_ADDR, /* addr */
+ USBMSC_EPOUTBULK_ATTR, /* attr */
{ /* maxpacket */
- LSBYTE(USBSTRG_FSBULKMAXPACKET),
- MSBYTE(USBSTRG_FSBULKMAXPACKET)
+ LSBYTE(USBMSC_FSBULKMAXPACKET),
+ MSBYTE(USBMSC_FSBULKMAXPACKET)
},
0 /* interval */
};
@@ -152,17 +152,17 @@ static const struct usb_epdesc_s g_fsepbulkindesc =
{
USB_SIZEOF_EPDESC, /* len */
USB_DESC_TYPE_ENDPOINT, /* type */
- USBSTRG_EPINBULK_ADDR, /* addr */
- USBSTRG_EPINBULK_ATTR, /* attr */
+ USBMSC_EPINBULK_ADDR, /* addr */
+ USBMSC_EPINBULK_ATTR, /* attr */
{ /* maxpacket */
- LSBYTE(USBSTRG_FSBULKMAXPACKET),
- MSBYTE(USBSTRG_FSBULKMAXPACKET)
+ LSBYTE(USBMSC_FSBULKMAXPACKET),
+ MSBYTE(USBMSC_FSBULKMAXPACKET)
},
0 /* interval */
};
#ifdef CONFIG_USBDEV_DUALSPEED
-#ifndef CONFIG_USBSTRG_COMPOSITE
+#ifndef CONFIG_USBMSC_COMPOSITE
static const struct usb_qualdesc_s g_qualdesc =
{
USB_SIZEOF_QUALDESC, /* len */
@@ -174,8 +174,8 @@ static const struct usb_qualdesc_s g_qualdesc =
USB_CLASS_PER_INTERFACE, /* class */
0, /* subclass */
0, /* protocol */
- CONFIG_USBSTRG_EP0MAXPACKET, /* mxpacketsize */
- USBSTRG_NCONFIGS, /* nconfigs */
+ CONFIG_USBMSC_EP0MAXPACKET, /* mxpacketsize */
+ USBMSC_NCONFIGS, /* nconfigs */
0, /* reserved */
};
#endif
@@ -184,11 +184,11 @@ static const struct usb_epdesc_s g_hsepbulkoutdesc =
{
USB_SIZEOF_EPDESC, /* len */
USB_DESC_TYPE_ENDPOINT, /* type */
- USBSTRG_EPOUTBULK_ADDR, /* addr */
- USBSTRG_EPOUTBULK_ATTR, /* attr */
+ USBMSC_EPOUTBULK_ADDR, /* addr */
+ USBMSC_EPOUTBULK_ATTR, /* attr */
{ /* maxpacket */
- LSBYTE(USBSTRG_HSBULKMAXPACKET),
- MSBYTE(USBSTRG_HSBULKMAXPACKET)
+ LSBYTE(USBMSC_HSBULKMAXPACKET),
+ MSBYTE(USBMSC_HSBULKMAXPACKET)
},
0 /* interval */
};
@@ -197,11 +197,11 @@ static const struct usb_epdesc_s g_hsepbulkindesc =
{
USB_SIZEOF_EPDESC, /* len */
USB_DESC_TYPE_ENDPOINT, /* type */
- USBSTRG_EPINBULK_ADDR, /* addr */
- USBSTRG_EPINBULK_ATTR, /* attr */
+ USBMSC_EPINBULK_ADDR, /* addr */
+ USBMSC_EPINBULK_ATTR, /* attr */
{ /* maxpacket */
- LSBYTE(USBSTRG_HSBULKMAXPACKET),
- MSBYTE(USBSTRG_HSBULKMAXPACKET)
+ LSBYTE(USBMSC_HSBULKMAXPACKET),
+ MSBYTE(USBMSC_HSBULKMAXPACKET)
},
0 /* interval */
};
@@ -212,10 +212,10 @@ static const struct usb_epdesc_s g_hsepbulkindesc =
****************************************************************************/
/* Strings ******************************************************************/
-#ifndef CONFIG_USBSTRG_COMPOSITE
-const char g_msccendorstr[] = CONFIG_USBSTRG_VENDORSTR;
-const char g_mscproductstr[] = CONFIG_USBSTRG_PRODUCTSTR;
-const char g_mscserialstr[] = CONFIG_USBSTRG_SERIALSTR;
+#ifndef CONFIG_USBMSC_COMPOSITE
+const char g_msccendorstr[] = CONFIG_USBMSC_VENDORSTR;
+const char g_mscproductstr[] = CONFIG_USBMSC_PRODUCTSTR;
+const char g_mscserialstr[] = CONFIG_USBMSC_SERIALSTR;
#endif
/****************************************************************************
@@ -227,14 +227,14 @@ const char g_mscserialstr[] = CONFIG_USBSTRG_SERIALSTR;
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_mkstrdesc
+ * Name: usbmsc_mkstrdesc
*
* Description:
* Construct a string descriptor
*
****************************************************************************/
-int usbstrg_mkstrdesc(uint8_t id, struct usb_strdesc_s *strdesc)
+int usbmsc_mkstrdesc(uint8_t id, struct usb_strdesc_s *strdesc)
{
const char *str;
int len;
@@ -243,34 +243,34 @@ int usbstrg_mkstrdesc(uint8_t id, struct usb_strdesc_s *strdesc)
switch (id)
{
-#ifndef CONFIG_USBSTRG_COMPOSITE
+#ifndef CONFIG_USBMSC_COMPOSITE
case 0:
{
/* Descriptor 0 is the language id */
strdesc->len = 4;
strdesc->type = USB_DESC_TYPE_STRING;
- strdesc->data[0] = LSBYTE(USBSTRG_STR_LANGUAGE);
- strdesc->data[1] = MSBYTE(USBSTRG_STR_LANGUAGE);
+ strdesc->data[0] = LSBYTE(USBMSC_STR_LANGUAGE);
+ strdesc->data[1] = MSBYTE(USBMSC_STR_LANGUAGE);
return 4;
}
- case USBSTRG_MANUFACTURERSTRID:
+ case USBMSC_MANUFACTURERSTRID:
str = g_vendorstr;
break;
- case USBSTRG_PRODUCTSTRID:
+ case USBMSC_PRODUCTSTRID:
str = g_productstr;
break;
- case USBSTRG_SERIALSTRID:
+ case USBMSC_SERIALSTRID:
str = g_serialstr;
break;
#endif
- /* case USBSTRG_CONFIGSTRID: */
- case USBSTRG_INTERFACESTRID:
- str = CONFIG_USBSTRG_CONFIGSTR;
+ /* case USBMSC_CONFIGSTRID: */
+ case USBMSC_INTERFACESTRID:
+ str = CONFIG_USBMSC_CONFIGSTR;
break;
default:
@@ -294,22 +294,22 @@ int usbstrg_mkstrdesc(uint8_t id, struct usb_strdesc_s *strdesc)
}
/****************************************************************************
- * Name: usbstrg_getepdesc
+ * Name: usbmsc_getepdesc
*
* Description:
* Return a pointer to the raw device descriptor
*
****************************************************************************/
-#ifndef CONFIG_USBSTRG_COMPOSITE
-FAR const struct usb_devdesc_s *usbstrg_getdevdesc(void)
+#ifndef CONFIG_USBMSC_COMPOSITE
+FAR const struct usb_devdesc_s *usbmsc_getdevdesc(void)
{
return &g_devdesc;
}
#endif
/****************************************************************************
- * Name: usbstrg_getepdesc
+ * Name: usbmsc_getepdesc
*
* Description:
* Return a pointer to the raw endpoint descriptor (used for configuring
@@ -317,21 +317,21 @@ FAR const struct usb_devdesc_s *usbstrg_getdevdesc(void)
*
****************************************************************************/
-FAR const struct usb_epdesc_s *usbstrg_getepdesc(enum usbstrg_epdesc_e epid)
+FAR const struct usb_epdesc_s *usbmsc_getepdesc(enum usbmsc_epdesc_e epid)
{
switch (epid)
{
- case USBSTRG_EPFSBULKOUT: /* Full speed bulk OUT endpoint descriptor */
+ case USBMSC_EPFSBULKOUT: /* Full speed bulk OUT endpoint descriptor */
return &g_fsepbulkoutdesc;
- case USBSTRG_EPFSBULKIN: /* Full speed bulk IN endpoint descriptor */
+ case USBMSC_EPFSBULKIN: /* Full speed bulk IN endpoint descriptor */
return &g_fsepbulkindesc;
#ifdef CONFIG_USBDEV_DUALSPEED
- case USBSTRG_EPHSBULKOUT: /* High speed bulk OUT endpoint descriptor */
+ case USBMSC_EPHSBULKOUT: /* High speed bulk OUT endpoint descriptor */
return &g_hsepbulkoutdesc;
- case USBSTRG_EPHSBULKIN: /* High speed bulk IN endpoint descriptor */
+ case USBMSC_EPHSBULKIN: /* High speed bulk IN endpoint descriptor */
return &g_hsepbulkindesc;
#endif
default:
@@ -340,7 +340,7 @@ FAR const struct usb_epdesc_s *usbstrg_getepdesc(enum usbstrg_epdesc_e epid)
};
/****************************************************************************
- * Name: usbstrg_mkcfgdesc
+ * Name: usbmsc_mkcfgdesc
*
* Description:
* Construct the configuration descriptor
@@ -348,12 +348,12 @@ FAR const struct usb_epdesc_s *usbstrg_getepdesc(enum usbstrg_epdesc_e epid)
****************************************************************************/
#ifdef CONFIG_USBDEV_DUALSPEED
-int16_t usbstrg_mkcfgdesc(uint8_t *buf, uint8_t speed, uint8_t type)
+int16_t usbmsc_mkcfgdesc(uint8_t *buf, uint8_t speed, uint8_t type)
#else
-int16_t usbstrg_mkcfgdesc(uint8_t *buf)
+int16_t usbmsc_mkcfgdesc(uint8_t *buf)
#endif
{
-#ifndef CONFIG_USBSTRG_COMPOSITE
+#ifndef CONFIG_USBMSC_COMPOSITE
FAR struct usb_cfgdesc_s *cfgdesc = (struct usb_cfgdesc_s*)buf;
#endif
#ifdef CONFIG_USBDEV_DUALSPEED
@@ -367,7 +367,7 @@ int16_t usbstrg_mkcfgdesc(uint8_t *buf)
* size that we will be sending now.
*/
- totallen = USB_SIZEOF_CFGDESC + USB_SIZEOF_IFDESC + USBSTRG_NENDPOINTS * USB_SIZEOF_EPDESC;
+ totallen = USB_SIZEOF_CFGDESC + USB_SIZEOF_IFDESC + USBMSC_NENDPOINTS * USB_SIZEOF_EPDESC;
/* Configuration descriptor -- Copy the canned descriptor and fill in the
* type (we'll also need to update the size below). If the USB mass storage
@@ -375,7 +375,7 @@ int16_t usbstrg_mkcfgdesc(uint8_t *buf)
* descriptor will be provided by the composite device logic.
*/
-#ifndef CONFIG_USBSTRG_COMPOSITE
+#ifndef CONFIG_USBMSC_COMPOSITE
memcpy(cfgdesc, &g_cfgdesc, USB_SIZEOF_CFGDESC);
buf += USB_SIZEOF_CFGDESC;
#endif
@@ -396,12 +396,12 @@ int16_t usbstrg_mkcfgdesc(uint8_t *buf)
hispeed = !hispeed;
}
- bulkmxpacket = USBSTRG_BULKMAXPACKET(hispeed);
- epdesc = USBSTRG_EPBULKINDESC(hispeed);
+ bulkmxpacket = USBMSC_BULKMAXPACKET(hispeed);
+ epdesc = USBMSC_EPBULKINDESC(hispeed);
memcpy(buf, epdesc, USB_SIZEOF_EPDESC);
buf += USB_SIZEOF_EPDESC;
- epdesc = USBSTRG_EPBULKOUTDESC(hispeed);
+ epdesc = USBMSC_EPBULKOUTDESC(hispeed);
memcpy(buf, epdesc, USB_SIZEOF_EPDESC);
#else
memcpy(buf, &g_fsepbulkoutdesc, USB_SIZEOF_EPDESC);
@@ -411,7 +411,7 @@ int16_t usbstrg_mkcfgdesc(uint8_t *buf)
/* Finally, fill in the total size of the configuration descriptor */
-#ifndef CONFIG_USBSTRG_COMPOSITE
+#ifndef CONFIG_USBMSC_COMPOSITE
cfgdesc->totallen[0] = LSBYTE(totallen);
cfgdesc->totallen[1] = MSBYTE(totallen);
#endif
@@ -419,15 +419,15 @@ int16_t usbstrg_mkcfgdesc(uint8_t *buf)
}
/****************************************************************************
- * Name: usbstrg_getqualdesc
+ * Name: usbmsc_getqualdesc
*
* Description:
* Return a pointer to the raw qual descriptor
*
****************************************************************************/
-#if !defined(CONFIG_USBSTRG_COMPOSITE) && defined(CONFIG_USBDEV_DUALSPEED)
-FAR const struct usb_qualdesc_s *usbstrg_getqualdesc(void)
+#if !defined(CONFIG_USBMSC_COMPOSITE) && defined(CONFIG_USBDEV_DUALSPEED)
+FAR const struct usb_qualdesc_s *usbmsc_getqualdesc(void)
{
return &g_qualdesc;
}
diff --git a/nuttx/drivers/usbdev/msc_scsi.c b/nuttx/drivers/usbdev/msc_scsi.c
index 6302b1a70..0af86011f 100644
--- a/nuttx/drivers/usbdev/msc_scsi.c
+++ b/nuttx/drivers/usbdev/msc_scsi.c
@@ -92,7 +92,7 @@
* transfer to resume it hadn't occurred."
*/
-#define CONFIG_USBSTRG_RACEWAR 1
+#define CONFIG_USBMSC_RACEWAR 1
/****************************************************************************
* Private Types
@@ -105,68 +105,68 @@
/* Debug ********************************************************************/
#if defined(CONFIG_DEBUG_VERBOSE) && defined (CONFIG_DEBUG_USB)
-static void usbstrg_dumpdata(const char *msg, const uint8_t *buf,
- int buflen);
+static void usbmsc_dumpdata(const char *msg, const uint8_t *buf,
+ int buflen);
#else
-# define usbstrg_dumpdata(msg, buf, len)
+# define usbmsc_dumpdata(msg, buf, len)
#endif
/* Utility Support Functions ************************************************/
-static uint16_t usbstrg_getbe16(uint8_t *buf);
-static uint32_t usbstrg_getbe32(uint8_t *buf);
-static void usbstrg_putbe16(uint8_t * buf, uint16_t val);
-static void usbstrg_putbe24(uint8_t *buf, uint32_t val);
-static void usbstrg_putbe32(uint8_t *buf, uint32_t val);
+static uint16_t usbmsc_getbe16(uint8_t *buf);
+static uint32_t usbmsc_getbe32(uint8_t *buf);
+static void usbmsc_putbe16(uint8_t * buf, uint16_t val);
+static void usbmsc_putbe24(uint8_t *buf, uint32_t val);
+static void usbmsc_putbe32(uint8_t *buf, uint32_t val);
#if 0 /* not used */
-static uint16_t usbstrg_getle16(uint8_t *buf);
+static uint16_t usbmsc_getle16(uint8_t *buf);
#endif
-static uint32_t usbstrg_getle32(uint8_t *buf);
+static uint32_t usbmsc_getle32(uint8_t *buf);
#if 0 /* not used */
-static void usbstrg_putle16(uint8_t * buf, uint16_t val);
+static void usbmsc_putle16(uint8_t * buf, uint16_t val);
#endif
-static void usbstrg_putle32(uint8_t *buf, uint32_t val);
+static void usbmsc_putle32(uint8_t *buf, uint32_t val);
/* SCSI Command Processing **************************************************/
-static inline int usbstrg_cmdtestunitready(FAR struct usbstrg_dev_s *priv);
-static inline int usbstrg_cmdrequestsense(FAR struct usbstrg_dev_s *priv,
+static inline int usbmsc_cmdtestunitready(FAR struct usbmsc_dev_s *priv);
+static inline int usbmsc_cmdrequestsense(FAR struct usbmsc_dev_s *priv,
FAR uint8_t *buf);
-static inline int usbstrg_cmdread6(FAR struct usbstrg_dev_s *priv);
-static inline int usbstrg_cmdwrite6(FAR struct usbstrg_dev_s *priv);
-static inline int usbstrg_cmdinquiry(FAR struct usbstrg_dev_s *priv,
+static inline int usbmsc_cmdread6(FAR struct usbmsc_dev_s *priv);
+static inline int usbmsc_cmdwrite6(FAR struct usbmsc_dev_s *priv);
+static inline int usbmsc_cmdinquiry(FAR struct usbmsc_dev_s *priv,
FAR uint8_t *buf);
-static inline int usbstrg_cmdmodeselect6(FAR struct usbstrg_dev_s *priv);
-static int usbstrg_modepage(FAR struct usbstrg_dev_s *priv,
+static inline int usbmsc_cmdmodeselect6(FAR struct usbmsc_dev_s *priv);
+static int usbmsc_modepage(FAR struct usbmsc_dev_s *priv,
FAR uint8_t *buf, uint8_t pcpgcode, int *mdlen);
-static inline int usbstrg_cmdmodesense6(FAR struct usbstrg_dev_s *priv,
+static inline int usbmsc_cmdmodesense6(FAR struct usbmsc_dev_s *priv,
FAR uint8_t *buf);
-static inline int usbstrg_cmdstartstopunit(FAR struct usbstrg_dev_s *priv);
-static inline int usbstrg_cmdpreventmediumremoval(FAR struct usbstrg_dev_s *priv);
-static inline int usbstrg_cmdreadformatcapacity(FAR struct usbstrg_dev_s *priv,
+static inline int usbmsc_cmdstartstopunit(FAR struct usbmsc_dev_s *priv);
+static inline int usbmsc_cmdpreventmediumremoval(FAR struct usbmsc_dev_s *priv);
+static inline int usbmsc_cmdreadformatcapacity(FAR struct usbmsc_dev_s *priv,
FAR uint8_t *buf);
-static inline int usbstrg_cmdreadcapacity10(FAR struct usbstrg_dev_s *priv,
+static inline int usbmsc_cmdreadcapacity10(FAR struct usbmsc_dev_s *priv,
FAR uint8_t *buf);
-static inline int usbstrg_cmdread10(FAR struct usbstrg_dev_s *priv);
-static inline int usbstrg_cmdwrite10(FAR struct usbstrg_dev_s *priv);
-static inline int usbstrg_cmdverify10(FAR struct usbstrg_dev_s *priv);
-static inline int usbstrg_cmdsynchronizecache10(FAR struct usbstrg_dev_s *priv);
-static inline int usbstrg_cmdmodeselect10(FAR struct usbstrg_dev_s *priv);
-static inline int usbstrg_cmdmodesense10(FAR struct usbstrg_dev_s *priv,
+static inline int usbmsc_cmdread10(FAR struct usbmsc_dev_s *priv);
+static inline int usbmsc_cmdwrite10(FAR struct usbmsc_dev_s *priv);
+static inline int usbmsc_cmdverify10(FAR struct usbmsc_dev_s *priv);
+static inline int usbmsc_cmdsynchronizecache10(FAR struct usbmsc_dev_s *priv);
+static inline int usbmsc_cmdmodeselect10(FAR struct usbmsc_dev_s *priv);
+static inline int usbmsc_cmdmodesense10(FAR struct usbmsc_dev_s *priv,
FAR uint8_t *buf);
-static inline int usbstrg_cmdread12(FAR struct usbstrg_dev_s *priv);
-static inline int usbstrg_cmdwrite12(FAR struct usbstrg_dev_s *priv);
-static inline int usbstrg_setupcmd(FAR struct usbstrg_dev_s *priv,
+static inline int usbmsc_cmdread12(FAR struct usbmsc_dev_s *priv);
+static inline int usbmsc_cmdwrite12(FAR struct usbmsc_dev_s *priv);
+static inline int usbmsc_setupcmd(FAR struct usbmsc_dev_s *priv,
uint8_t cdblen, uint8_t flags);
/* SCSI Worker Thread *******************************************************/
-static int usbstrg_idlestate(FAR struct usbstrg_dev_s *priv);
-static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv);
-static int usbstrg_cmdreadstate(FAR struct usbstrg_dev_s *priv);
-static int usbstrg_cmdwritestate(FAR struct usbstrg_dev_s *priv);
-static int usbstrg_cmdfinishstate(FAR struct usbstrg_dev_s *priv);
-static int usbstrg_cmdstatusstate(FAR struct usbstrg_dev_s *priv);
+static int usbmsc_idlestate(FAR struct usbmsc_dev_s *priv);
+static int usbmsc_cmdparsestate(FAR struct usbmsc_dev_s *priv);
+static int usbmsc_cmdreadstate(FAR struct usbmsc_dev_s *priv);
+static int usbmsc_cmdwritestate(FAR struct usbmsc_dev_s *priv);
+static int usbmsc_cmdfinishstate(FAR struct usbmsc_dev_s *priv);
+static int usbmsc_cmdstatusstate(FAR struct usbmsc_dev_s *priv);
/****************************************************************************
* Private Data
@@ -181,11 +181,11 @@ static int usbstrg_cmdstatusstate(FAR struct usbstrg_dev_s *priv);
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_dumpdata
+ * Name: usbmsc_dumpdata
****************************************************************************/
#if defined(CONFIG_DEBUG_VERBOSE) && defined (CONFIG_DEBUG_USB)
-static void usbstrg_dumpdata(const char *msg, const uint8_t *buf, int buflen)
+static void usbmsc_dumpdata(const char *msg, const uint8_t *buf, int buflen)
{
int i;
@@ -203,34 +203,34 @@ static void usbstrg_dumpdata(const char *msg, const uint8_t *buf, int buflen)
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_getbe16
+ * Name: usbmsc_getbe16
*
* Description:
* Get a 16-bit big-endian value reference by the byte pointer
*
****************************************************************************/
-static uint16_t usbstrg_getbe16(uint8_t *buf)
+static uint16_t usbmsc_getbe16(uint8_t *buf)
{
return ((uint16_t)buf[0] << 8) | ((uint16_t)buf[1]);
}
/****************************************************************************
- * Name: usbstrg_getbe32
+ * Name: usbmsc_getbe32
*
* Description:
* Get a 32-bit big-endian value reference by the byte pointer
*
****************************************************************************/
-static uint32_t usbstrg_getbe32(uint8_t *buf)
+static uint32_t usbmsc_getbe32(uint8_t *buf)
{
return ((uint32_t)buf[0] << 24) | ((uint32_t)buf[1] << 16) |
((uint32_t)buf[2] << 8) | ((uint32_t)buf[3]);
}
/****************************************************************************
- * Name: usbstrg_putbe16
+ * Name: usbmsc_putbe16
*
* Description:
* Store a 16-bit value in big-endian order to the location specified by
@@ -238,14 +238,14 @@ static uint32_t usbstrg_getbe32(uint8_t *buf)
*
****************************************************************************/
-static void usbstrg_putbe16(uint8_t * buf, uint16_t val)
+static void usbmsc_putbe16(uint8_t * buf, uint16_t val)
{
buf[0] = val >> 8;
buf[1] = val;
}
/****************************************************************************
- * Name: usbstrg_putbe24
+ * Name: usbmsc_putbe24
*
* Description:
* Store a 32-bit value in big-endian order to the location specified by
@@ -253,7 +253,7 @@ static void usbstrg_putbe16(uint8_t * buf, uint16_t val)
*
****************************************************************************/
-static void usbstrg_putbe24(uint8_t *buf, uint32_t val)
+static void usbmsc_putbe24(uint8_t *buf, uint32_t val)
{
buf[0] = val >> 16;
buf[1] = val >> 8;
@@ -261,7 +261,7 @@ static void usbstrg_putbe24(uint8_t *buf, uint32_t val)
}
/****************************************************************************
- * Name: usbstrg_putbe32
+ * Name: usbmsc_putbe32
*
* Description:
* Store a 32-bit value in big-endian order to the location specified by
@@ -269,7 +269,7 @@ static void usbstrg_putbe24(uint8_t *buf, uint32_t val)
*
****************************************************************************/
-static void usbstrg_putbe32(uint8_t *buf, uint32_t val)
+static void usbmsc_putbe32(uint8_t *buf, uint32_t val)
{
buf[0] = val >> 24;
buf[1] = val >> 16;
@@ -278,7 +278,7 @@ static void usbstrg_putbe32(uint8_t *buf, uint32_t val)
}
/****************************************************************************
- * Name: usbstrg_getle16
+ * Name: usbmsc_getle16
*
* Description:
* Get a 16-bit little-endian value reference by the byte pointer
@@ -286,28 +286,28 @@ static void usbstrg_putbe32(uint8_t *buf, uint32_t val)
****************************************************************************/
#if 0 /* not used */
-static uint16_t usbstrg_getle16(uint8_t *buf)
+static uint16_t usbmsc_getle16(uint8_t *buf)
{
return ((uint16_t)buf[1] << 8) | ((uint16_t)buf[0]);
}
#endif
/****************************************************************************
- * Name: usbstrg_getle32
+ * Name: usbmsc_getle32
*
* Description:
* Get a 32-bit little-endian value reference by the byte pointer
*
****************************************************************************/
-static uint32_t usbstrg_getle32(uint8_t *buf)
+static uint32_t usbmsc_getle32(uint8_t *buf)
{
return ((uint32_t)buf[3] << 24) | ((uint32_t)buf[2] << 16) |
((uint32_t)buf[1] << 8) | ((uint32_t)buf[0]);
}
/****************************************************************************
- * Name: usbstrg_putle16
+ * Name: usbmsc_putle16
*
* Description:
* Store a 16-bit value in little-endian order to the location specified by
@@ -316,7 +316,7 @@ static uint32_t usbstrg_getle32(uint8_t *buf)
****************************************************************************/
#if 0 /* not used */
-static void usbstrg_putle16(uint8_t * buf, uint16_t val)
+static void usbmsc_putle16(uint8_t * buf, uint16_t val)
{
buf[0] = val;
buf[1] = val >> 8;
@@ -324,7 +324,7 @@ static void usbstrg_putle16(uint8_t * buf, uint16_t val)
#endif
/****************************************************************************
- * Name: usbstrg_putle32
+ * Name: usbmsc_putle32
*
* Description:
* Store a 32-bit value in little-endian order to the location specified by
@@ -332,7 +332,7 @@ static void usbstrg_putle16(uint8_t * buf, uint16_t val)
*
****************************************************************************/
-static void usbstrg_putle32(uint8_t *buf, uint32_t val)
+static void usbmsc_putle32(uint8_t *buf, uint32_t val)
{
buf[0] = val;
buf[1] = val >> 8;
@@ -345,36 +345,36 @@ static void usbstrg_putle32(uint8_t *buf, uint32_t val)
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_cmdtestunitready
+ * Name: usbmsc_cmdtestunitready
*
* Description:
* Handle the SCSI_CMD_TESTUNITREADY command
*
****************************************************************************/
-static inline int usbstrg_cmdtestunitready(FAR struct usbstrg_dev_s *priv)
+static inline int usbmsc_cmdtestunitready(FAR struct usbmsc_dev_s *priv)
{
int ret;
priv->u.alloclen = 0;
- ret = usbstrg_setupcmd(priv, 6, USBSTRG_FLAGS_DIRNONE);
+ ret = usbmsc_setupcmd(priv, 6, USBMSC_FLAGS_DIRNONE);
return ret;
}
/****************************************************************************
- * Name: usbstrg_cmdrequestsense
+ * Name: usbmsc_cmdrequestsense
*
* Description:
* Handle the SCSI_CMD_REQUESTSENSE command
*
****************************************************************************/
-static inline int usbstrg_cmdrequestsense(FAR struct usbstrg_dev_s *priv,
- FAR uint8_t *buf)
+static inline int usbmsc_cmdrequestsense(FAR struct usbmsc_dev_s *priv,
+ FAR uint8_t *buf)
{
FAR struct scsicmd_requestsense_s *request = (FAR struct scsicmd_requestsense_s *)priv->cdb;
FAR struct scsiresp_fixedsensedata_s *response = (FAR struct scsiresp_fixedsensedata_s *)buf;
- FAR struct usbstrg_lun_s *lun;
+ FAR struct usbmsc_lun_s *lun;
uint32_t sd;
uint32_t sdinfo;
uint8_t cdblen;
@@ -396,9 +396,9 @@ static inline int usbstrg_cmdrequestsense(FAR struct usbstrg_dev_s *priv,
cdblen = SCSICMD_REQUESTSENSE_MSSIZEOF;
}
- ret = usbstrg_setupcmd(priv, cdblen,
- USBSTRG_FLAGS_DIRDEVICE2HOST|USBSTRG_FLAGS_LUNNOTNEEDED|
- USBSTRG_FLAGS_UACOKAY|USBSTRG_FLAGS_RETAINSENSEDATA);
+ ret = usbmsc_setupcmd(priv, cdblen,
+ USBMSC_FLAGS_DIRDEVICE2HOST|USBMSC_FLAGS_LUNNOTNEEDED|
+ USBMSC_FLAGS_UACOKAY|USBMSC_FLAGS_RETAINSENSEDATA);
if (ret == OK)
{
lun = priv->lun;
@@ -426,7 +426,7 @@ static inline int usbstrg_cmdrequestsense(FAR struct usbstrg_dev_s *priv,
response->code = SCSIRESP_SENSEDATA_RESPVALID|SCSIRESP_SENSEDATA_CURRENTFIXED;
response->flags = (uint8_t)(sd >> 16);
- usbstrg_putbe32(response->info, sdinfo);
+ usbmsc_putbe32(response->info, sdinfo);
response->len = SCSIRESP_FIXEDSENSEDATA_SIZEOF - 7;
response->code2 = (uint8_t)(sd >> 8);
response->qual2 = (uint8_t)sd;
@@ -439,17 +439,17 @@ static inline int usbstrg_cmdrequestsense(FAR struct usbstrg_dev_s *priv,
}
/****************************************************************************
- * Name: usbstrg_cmdread6
+ * Name: usbmsc_cmdread6
*
* Description:
* Handle the SCSI_CMD_READ6 command
*
****************************************************************************/
-static inline int usbstrg_cmdread6(FAR struct usbstrg_dev_s *priv)
+static inline int usbmsc_cmdread6(FAR struct usbmsc_dev_s *priv)
{
FAR struct scsicmd_read6_s *read6 = (FAR struct scsicmd_read6_s*)priv->cdb;
- FAR struct usbstrg_lun_s *lun = priv->lun;
+ FAR struct usbmsc_lun_s *lun = priv->lun;
int ret;
priv->u.xfrlen = (uint16_t)read6->xfrlen;
@@ -458,18 +458,18 @@ static inline int usbstrg_cmdread6(FAR struct usbstrg_dev_s *priv)
priv->u.xfrlen = 256;
}
- ret = usbstrg_setupcmd(priv, SCSICMD_READ6_SIZEOF, USBSTRG_FLAGS_DIRDEVICE2HOST|USBSTRG_FLAGS_BLOCKXFR);
+ ret = usbmsc_setupcmd(priv, SCSICMD_READ6_SIZEOF, USBMSC_FLAGS_DIRDEVICE2HOST|USBMSC_FLAGS_BLOCKXFR);
if (ret == OK)
{
/* Get the Logical Block Address (LBA) from cdb[] as the starting sector */
- priv->sector = (uint32_t)(read6->mslba & SCSICMD_READ6_MSLBAMASK) << 16 | (uint32_t)usbstrg_getbe16(read6->lslba);
+ priv->sector = (uint32_t)(read6->mslba & SCSICMD_READ6_MSLBAMASK) << 16 | (uint32_t)usbmsc_getbe16(read6->lslba);
/* Verify that a block driver has been bound to the LUN */
if (!lun->inode)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_READ6MEDIANOTPRESENT), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_READ6MEDIANOTPRESENT), 0);
lun->sd = SCSI_KCQNR_MEDIANOTPRESENT;
ret = -EINVAL;
}
@@ -478,7 +478,7 @@ static inline int usbstrg_cmdread6(FAR struct usbstrg_dev_s *priv)
else if (priv->sector >= lun->nsectors)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_READ6LBARANGE), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_READ6LBARANGE), 0);
lun->sd = SCSI_KCQIR_LBAOUTOFRANGE;
ret = -EINVAL;
}
@@ -487,25 +487,25 @@ static inline int usbstrg_cmdread6(FAR struct usbstrg_dev_s *priv)
else
{
- usbtrace(TRACE_CLASSSTATE(USBSTRG_CLASSSTATE_CMDPARSECMDREAD6), priv->cdb[0]);
- priv->thstate = USBSTRG_STATE_CMDREAD;
+ usbtrace(TRACE_CLASSSTATE(USBMSC_CLASSSTATE_CMDPARSECMDREAD6), priv->cdb[0]);
+ priv->thstate = USBMSC_STATE_CMDREAD;
}
}
return ret;
}
/****************************************************************************
- * Name: usbstrg_cmdwrite6
+ * Name: usbmsc_cmdwrite6
*
* Description:
* Handle the SCSI_CMD_WRITE6 command
*
****************************************************************************/
-static inline int usbstrg_cmdwrite6(FAR struct usbstrg_dev_s *priv)
+static inline int usbmsc_cmdwrite6(FAR struct usbmsc_dev_s *priv)
{
FAR struct scsicmd_write6_s *write6 = (FAR struct scsicmd_write6_s *)priv->cdb;
- FAR struct usbstrg_lun_s *lun = priv->lun;
+ FAR struct usbmsc_lun_s *lun = priv->lun;
int ret;
priv->u.xfrlen = (uint16_t)write6->xfrlen;
@@ -514,18 +514,18 @@ static inline int usbstrg_cmdwrite6(FAR struct usbstrg_dev_s *priv)
priv->u.xfrlen = 256;
}
- ret = usbstrg_setupcmd(priv, SCSICMD_WRITE6_SIZEOF, USBSTRG_FLAGS_DIRHOST2DEVICE|USBSTRG_FLAGS_BLOCKXFR);
+ ret = usbmsc_setupcmd(priv, SCSICMD_WRITE6_SIZEOF, USBMSC_FLAGS_DIRHOST2DEVICE|USBMSC_FLAGS_BLOCKXFR);
if (ret == OK)
{
/* Get the Logical Block Address (LBA) from cdb[] as the starting sector */
- priv->sector = (uint32_t)(write6->mslba & SCSICMD_WRITE6_MSLBAMASK) << 16 | (uint32_t)usbstrg_getbe16(write6->lslba);
+ priv->sector = (uint32_t)(write6->mslba & SCSICMD_WRITE6_MSLBAMASK) << 16 | (uint32_t)usbmsc_getbe16(write6->lslba);
/* Verify that a block driver has been bound to the LUN */
if (!lun->inode)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_WRITE6MEDIANOTPRESENT), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_WRITE6MEDIANOTPRESENT), 0);
lun->sd = SCSI_KCQNR_MEDIANOTPRESENT;
ret = -EINVAL;
}
@@ -534,7 +534,7 @@ static inline int usbstrg_cmdwrite6(FAR struct usbstrg_dev_s *priv)
else if (lun->readonly)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_WRITE6READONLY), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_WRITE6READONLY), 0);
lun->sd = SCSI_KCQWP_COMMANDNOTALLOWED;
ret = -EINVAL;
}
@@ -543,7 +543,7 @@ static inline int usbstrg_cmdwrite6(FAR struct usbstrg_dev_s *priv)
else if (priv->sector >= lun->nsectors)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_WRITE6LBARANGE), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_WRITE6LBARANGE), 0);
lun->sd = SCSI_KCQIR_LBAOUTOFRANGE;
ret = -EINVAL;
}
@@ -552,32 +552,32 @@ static inline int usbstrg_cmdwrite6(FAR struct usbstrg_dev_s *priv)
else
{
- usbtrace(TRACE_CLASSSTATE(USBSTRG_CLASSSTATE_CMDPARSECMDWRITE6), priv->cdb[0]);
- priv->thstate = USBSTRG_STATE_CMDWRITE;
+ usbtrace(TRACE_CLASSSTATE(USBMSC_CLASSSTATE_CMDPARSECMDWRITE6), priv->cdb[0]);
+ priv->thstate = USBMSC_STATE_CMDWRITE;
}
}
return ret;
}
/****************************************************************************
- * Name: usbstrg_cmdinquiry
+ * Name: usbmsc_cmdinquiry
*
* Description:
* Handle SCSI_CMD_INQUIRY command
*
****************************************************************************/
-static inline int usbstrg_cmdinquiry(FAR struct usbstrg_dev_s *priv,
- FAR uint8_t *buf)
+static inline int usbmsc_cmdinquiry(FAR struct usbmsc_dev_s *priv,
+ FAR uint8_t *buf)
{
FAR struct scscicmd_inquiry_s *inquiry = (FAR struct scscicmd_inquiry_s *)priv->cdb;
FAR struct scsiresp_inquiry_s *response = (FAR struct scsiresp_inquiry_s *)buf;
int len;
int ret;
- priv->u.alloclen = usbstrg_getbe16(inquiry->alloclen);
- ret = usbstrg_setupcmd(priv, SCSICMD_INQUIRY_SIZEOF,
- USBSTRG_FLAGS_DIRDEVICE2HOST|USBSTRG_FLAGS_LUNNOTNEEDED|USBSTRG_FLAGS_UACOKAY);
+ priv->u.alloclen = usbmsc_getbe16(inquiry->alloclen);
+ ret = usbmsc_setupcmd(priv, SCSICMD_INQUIRY_SIZEOF,
+ USBMSC_FLAGS_DIRDEVICE2HOST|USBMSC_FLAGS_LUNNOTNEEDED|USBMSC_FLAGS_UACOKAY);
if (ret == OK)
{
if (!priv->lun)
@@ -586,7 +586,7 @@ static inline int usbstrg_cmdinquiry(FAR struct usbstrg_dev_s *priv,
}
else if ((inquiry->flags != 0) || (inquiry->pagecode != 0))
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_INQUIRYFLAGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_INQUIRYFLAGS), 0);
priv->lun->sd = SCSI_KCQIR_INVALIDFIELDINCBA;
ret = -EINVAL;
}
@@ -595,7 +595,7 @@ static inline int usbstrg_cmdinquiry(FAR struct usbstrg_dev_s *priv,
memset(response, 0, SCSIRESP_INQUIRY_SIZEOF);
priv->nreqbytes = SCSIRESP_INQUIRY_SIZEOF;
-#ifdef CONFIG_USBSTRG_REMOVABLE
+#ifdef CONFIG_USBMSC_REMOVABLE
response->flags1 = SCSIRESP_INQUIRYFLAGS1_RMB;
#endif
response->version = 2; /* SCSI-2 */
@@ -624,19 +624,19 @@ static inline int usbstrg_cmdinquiry(FAR struct usbstrg_dev_s *priv,
}
/****************************************************************************
- * Name: usbstrg_cmdmodeselect6
+ * Name: usbmsc_cmdmodeselect6
*
* Description:
* Handle SCSI_CMD_MODESELECT6 command
*
****************************************************************************/
-static inline int usbstrg_cmdmodeselect6(FAR struct usbstrg_dev_s *priv)
+static inline int usbmsc_cmdmodeselect6(FAR struct usbmsc_dev_s *priv)
{
FAR struct scsicmd_modeselect6_s *modeselect = (FAR struct scsicmd_modeselect6_s *)priv->cdb;
priv->u.alloclen = modeselect->plen;
- (void)usbstrg_setupcmd(priv, SCSICMD_MODESELECT6_SIZEOF, USBSTRG_FLAGS_DIRHOST2DEVICE);
+ (void)usbmsc_setupcmd(priv, SCSICMD_MODESELECT6_SIZEOF, USBMSC_FLAGS_DIRHOST2DEVICE);
/* Not supported */
@@ -645,15 +645,15 @@ static inline int usbstrg_cmdmodeselect6(FAR struct usbstrg_dev_s *priv)
}
/****************************************************************************
- * Name: usbstrg_modepage
+ * Name: usbmsc_modepage
*
* Description:
- * Common logic for usbstrg_cmdmodesense6() and usbstrg_cmdmodesense10()
+ * Common logic for usbmsc_cmdmodesense6() and usbmsc_cmdmodesense10()
*
****************************************************************************/
-static int usbstrg_modepage(FAR struct usbstrg_dev_s *priv, FAR uint8_t *buf,
- uint8_t pcpgcode, int *mdlen)
+static int usbmsc_modepage(FAR struct usbmsc_dev_s *priv, FAR uint8_t *buf,
+ uint8_t pcpgcode, int *mdlen)
{
FAR struct scsiresp_cachingmodepage_s *cmp = (FAR struct scsiresp_cachingmodepage_s *)buf;
@@ -661,7 +661,7 @@ static int usbstrg_modepage(FAR struct usbstrg_dev_s *priv, FAR uint8_t *buf,
if ((pcpgcode & SCSICMD_MODESENSE_PCMASK) == SCSICMD_MODESENSE_PCSAVED)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_PCSAVED), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_PCSAVED), 0);
priv->lun->sd = SCSI_KCQIR_SAVINGPARMSNOTSUPPORTED;
return -EINVAL;
}
@@ -695,22 +695,22 @@ static int usbstrg_modepage(FAR struct usbstrg_dev_s *priv, FAR uint8_t *buf,
}
else
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_MODEPAGEFLAGS), pcpgcode);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_MODEPAGEFLAGS), pcpgcode);
priv->lun->sd = SCSI_KCQIR_INVALIDFIELDINCBA;
return -EINVAL;
}
}
/****************************************************************************
- * Name: usbstrg_cmdmodesense6
+ * Name: usbmsc_cmdmodesense6
*
* Description:
* Handle SCSI_CMD_MODESENSE6 command
*
****************************************************************************/
-static int inline usbstrg_cmdmodesense6(FAR struct usbstrg_dev_s *priv,
- FAR uint8_t *buf)
+static int inline usbmsc_cmdmodesense6(FAR struct usbmsc_dev_s *priv,
+ FAR uint8_t *buf)
{
FAR struct scsicmd_modesense6_s *modesense = (FAR struct scsicmd_modesense6_s *)priv->cdb;
FAR struct scsiresp_modeparameterhdr6_s *mph = (FAR struct scsiresp_modeparameterhdr6_s *)buf;
@@ -718,12 +718,12 @@ static int inline usbstrg_cmdmodesense6(FAR struct usbstrg_dev_s *priv,
int ret;
priv->u.alloclen = modesense->alloclen;
- ret = usbstrg_setupcmd(priv, SCSICMD_MODESENSE6_SIZEOF, USBSTRG_FLAGS_DIRDEVICE2HOST);
+ ret = usbmsc_setupcmd(priv, SCSICMD_MODESENSE6_SIZEOF, USBMSC_FLAGS_DIRDEVICE2HOST);
if (ret == OK)
{
if ((modesense->flags & ~SCSICMD_MODESENSE6_DBD) != 0 || modesense->subpgcode != 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_MODESENSE6FLAGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_MODESENSE6FLAGS), 0);
priv->lun->sd = SCSI_KCQIR_INVALIDFIELDINCBA;
ret = -EINVAL;
}
@@ -742,7 +742,7 @@ static int inline usbstrg_cmdmodesense6(FAR struct usbstrg_dev_s *priv,
/* There are no block descriptors, only the following mode page: */
- ret = usbstrg_modepage(priv, &buf[SCSIRESP_MODEPARAMETERHDR6_SIZEOF], modesense->pcpgcode, &mdlen);
+ ret = usbmsc_modepage(priv, &buf[SCSIRESP_MODEPARAMETERHDR6_SIZEOF], modesense->pcpgcode, &mdlen);
if (ret == OK)
{
/* Store the mode data length and return the total message size */
@@ -756,25 +756,25 @@ static int inline usbstrg_cmdmodesense6(FAR struct usbstrg_dev_s *priv,
}
/****************************************************************************
- * Name: usbstrg_cmdstartstopunit
+ * Name: usbmsc_cmdstartstopunit
*
* Description:
* Handle SCSI_CMD_STARTSTOPUNIT command
*
****************************************************************************/
-static inline int usbstrg_cmdstartstopunit(FAR struct usbstrg_dev_s *priv)
+static inline int usbmsc_cmdstartstopunit(FAR struct usbmsc_dev_s *priv)
{
int ret;
priv->u.alloclen = 0;
- ret = usbstrg_setupcmd(priv, SCSICMD_STARTSTOPUNIT_SIZEOF, USBSTRG_FLAGS_DIRNONE);
+ ret = usbmsc_setupcmd(priv, SCSICMD_STARTSTOPUNIT_SIZEOF, USBMSC_FLAGS_DIRNONE);
if (ret == OK)
{
-#ifndef CONFIG_USBSTRG_REMOVABLE
+#ifndef CONFIG_USBMSC_REMOVABLE
/* This command is not valid if the media is not removable */
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_NOTREMOVABLE), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_NOTREMOVABLE), 0);
lun->sd = SCSI_KCQIR_INVALIDCOMMAND;
ret = -EINVAL;
#endif
@@ -783,32 +783,32 @@ static inline int usbstrg_cmdstartstopunit(FAR struct usbstrg_dev_s *priv)
}
/****************************************************************************
- * Name: usbstrg_cmdpreventmediumremoval
+ * Name: usbmsc_cmdpreventmediumremoval
*
* Description:
* Handle SCSI_CMD_PREVENTMEDIAREMOVAL command
*
****************************************************************************/
-static inline int usbstrg_cmdpreventmediumremoval(FAR struct usbstrg_dev_s *priv)
+static inline int usbmsc_cmdpreventmediumremoval(FAR struct usbmsc_dev_s *priv)
{
-#ifdef CONFIG_USBSTRG_REMOVABLE
+#ifdef CONFIG_USBMSC_REMOVABLE
FAR struct scsicmd_preventmediumremoval_s *pmr = (FAR struct scsicmd_preventmediumremoval_s *)priv->cdb;
- FAR struct usbstrg_lun_s *lun = priv->lun;
+ FAR struct usbmsc_lun_s *lun = priv->lun;
#endif
int ret;
priv->u.alloclen = 0;
- ret = usbstrg_setupcmd(priv, SCSICMD_PREVENTMEDIUMREMOVAL_SIZEOF, USBSTRG_FLAGS_DIRNONE);
+ ret = usbmsc_setupcmd(priv, SCSICMD_PREVENTMEDIUMREMOVAL_SIZEOF, USBMSC_FLAGS_DIRNONE);
if (ret == OK)
{
-#ifndef CONFIG_USBSTRG_REMOVABLE
+#ifndef CONFIG_USBMSC_REMOVABLE
lun->sd = SCSI_KCQIR_INVALIDCOMMAND;
ret = -EINVAL;
#else
if ((pmr->prevent & ~SCSICMD_PREVENTMEDIUMREMOVAL_TRANSPORT) != 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_PREVENTMEDIUMREMOVALPREVENT), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_PREVENTMEDIUMREMOVALPREVENT), 0);
lun->sd = SCSI_KCQIR_INVALIDFIELDINCBA;
ret = -EINVAL;
}
@@ -820,23 +820,23 @@ static inline int usbstrg_cmdpreventmediumremoval(FAR struct usbstrg_dev_s *priv
}
/****************************************************************************
- * Name: usbstrg_cmdreadformatcapacity
+ * Name: usbmsc_cmdreadformatcapacity
*
* Description:
* Handle SCSI_CMD_READFORMATCAPACITIES command (MMC)
*
****************************************************************************/
-static inline int usbstrg_cmdreadformatcapacity(FAR struct usbstrg_dev_s *priv,
- FAR uint8_t *buf)
+static inline int usbmsc_cmdreadformatcapacity(FAR struct usbmsc_dev_s *priv,
+ FAR uint8_t *buf)
{
FAR struct scsicmd_readformatcapcacities_s *rfc = (FAR struct scsicmd_readformatcapcacities_s *)priv->cdb;
FAR struct scsiresp_readformatcapacities_s *hdr;
- FAR struct usbstrg_lun_s *lun = priv->lun;
+ FAR struct usbmsc_lun_s *lun = priv->lun;
int ret;
- priv->u.alloclen = usbstrg_getbe16(rfc->alloclen);
- ret = usbstrg_setupcmd(priv, SCSICMD_READFORMATCAPACITIES_SIZEOF, USBSTRG_FLAGS_DIRDEVICE2HOST);
+ priv->u.alloclen = usbmsc_getbe16(rfc->alloclen);
+ ret = usbmsc_setupcmd(priv, SCSICMD_READFORMATCAPACITIES_SIZEOF, USBMSC_FLAGS_DIRDEVICE2HOST);
if (ret == OK)
{
hdr = (FAR struct scsiresp_readformatcapacities_s *)buf;
@@ -845,49 +845,49 @@ static inline int usbstrg_cmdreadformatcapacity(FAR struct usbstrg_dev_s *priv,
/* Only the Current/Maximum Capacity Descriptor follows the header */
- usbstrg_putbe32(hdr->nblocks, lun->nsectors);
+ usbmsc_putbe32(hdr->nblocks, lun->nsectors);
hdr->type = SCIRESP_RDFMTCAPACITIES_FORMATED;
- usbstrg_putbe24(hdr->blocklen, lun->sectorsize);
+ usbmsc_putbe24(hdr->blocklen, lun->sectorsize);
priv->nreqbytes = SCSIRESP_READFORMATCAPACITIES_SIZEOF;
}
return ret;
}
/****************************************************************************
- * Name: usbstrg_cmdreadcapacity10
+ * Name: usbmsc_cmdreadcapacity10
*
* Description:
* Handle SCSI_CMD_READCAPACITY10 command
*
****************************************************************************/
-static int inline usbstrg_cmdreadcapacity10(FAR struct usbstrg_dev_s *priv,
- FAR uint8_t *buf)
+static int inline usbmsc_cmdreadcapacity10(FAR struct usbmsc_dev_s *priv,
+ FAR uint8_t *buf)
{
FAR struct scsicmd_readcapacity10_s *rcc = (FAR struct scsicmd_readcapacity10_s *)priv->cdb;
FAR struct scsiresp_readcapacity10_s *rcr = (FAR struct scsiresp_readcapacity10_s *)buf;
- FAR struct usbstrg_lun_s *lun = priv->lun;
+ FAR struct usbmsc_lun_s *lun = priv->lun;
uint32_t lba;
int ret;
priv->u.alloclen = SCSIRESP_READCAPACITY10_SIZEOF; /* Fake the allocation length */
- ret = usbstrg_setupcmd(priv, SCSICMD_READCAPACITY10_SIZEOF, USBSTRG_FLAGS_DIRDEVICE2HOST);
+ ret = usbmsc_setupcmd(priv, SCSICMD_READCAPACITY10_SIZEOF, USBMSC_FLAGS_DIRDEVICE2HOST);
if (ret == OK)
{
/* Check the PMI and LBA fields */
- lba = usbstrg_getbe32(rcc->lba);
+ lba = usbmsc_getbe32(rcc->lba);
if (rcc->pmi > 1 || (rcc->pmi == 0 && lba != 0))
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_READCAPACITYFLAGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_READCAPACITYFLAGS), 0);
lun->sd = SCSI_KCQIR_INVALIDFIELDINCBA;
ret = -EINVAL;
}
else
{
- usbstrg_putbe32(rcr->lba, lun->nsectors - 1);
- usbstrg_putbe32(&buf[4], lun->sectorsize);
+ usbmsc_putbe32(rcr->lba, lun->nsectors - 1);
+ usbmsc_putbe32(&buf[4], lun->sectorsize);
priv->nreqbytes = SCSIRESP_READCAPACITY10_SIZEOF;
}
}
@@ -895,32 +895,32 @@ static int inline usbstrg_cmdreadcapacity10(FAR struct usbstrg_dev_s *priv,
}
/****************************************************************************
- * Name: usbstrg_cmdread10
+ * Name: usbmsc_cmdread10
*
* Description:
* Handle SCSI_CMD_READ10 command
*
****************************************************************************/
-static inline int usbstrg_cmdread10(FAR struct usbstrg_dev_s *priv)
+static inline int usbmsc_cmdread10(FAR struct usbmsc_dev_s *priv)
{
struct scsicmd_read10_s *read10 = (struct scsicmd_read10_s*)priv->cdb;
- FAR struct usbstrg_lun_s *lun = priv->lun;
+ FAR struct usbmsc_lun_s *lun = priv->lun;
int ret;
- priv->u.xfrlen = usbstrg_getbe16(read10->xfrlen);
- ret = usbstrg_setupcmd(priv, SCSICMD_READ10_SIZEOF, USBSTRG_FLAGS_DIRDEVICE2HOST|USBSTRG_FLAGS_BLOCKXFR);
+ priv->u.xfrlen = usbmsc_getbe16(read10->xfrlen);
+ ret = usbmsc_setupcmd(priv, SCSICMD_READ10_SIZEOF, USBMSC_FLAGS_DIRDEVICE2HOST|USBMSC_FLAGS_BLOCKXFR);
if (ret == OK)
{
/* Get the Logical Block Address (LBA) from cdb[] as the starting sector */
- priv->sector = usbstrg_getbe32(read10->lba);
+ priv->sector = usbmsc_getbe32(read10->lba);
/* Verify that we can support this read command */
if ((read10->flags & ~(SCSICMD_READ10FLAGS_DPO|SCSICMD_READ10FLAGS_FUA)) != 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_READ10FLAGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_READ10FLAGS), 0);
lun->sd = SCSI_KCQIR_INVALIDFIELDINCBA;
ret = -EINVAL;
}
@@ -929,7 +929,7 @@ static inline int usbstrg_cmdread10(FAR struct usbstrg_dev_s *priv)
else if (!lun->inode)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_READ10MEDIANOTPRESENT), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_READ10MEDIANOTPRESENT), 0);
lun->sd = SCSI_KCQNR_MEDIANOTPRESENT;
ret = -EINVAL;
}
@@ -938,7 +938,7 @@ static inline int usbstrg_cmdread10(FAR struct usbstrg_dev_s *priv)
else if (priv->sector >= lun->nsectors)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_READ10LBARANGE), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_READ10LBARANGE), 0);
lun->sd = SCSI_KCQIR_LBAOUTOFRANGE;
ret = -EINVAL;
}
@@ -947,8 +947,8 @@ static inline int usbstrg_cmdread10(FAR struct usbstrg_dev_s *priv)
else
{
- usbtrace(TRACE_CLASSSTATE(USBSTRG_CLASSSTATE_CMDPARSECMDREAD10), priv->cdb[0]);
- priv->thstate = USBSTRG_STATE_CMDREAD;
+ usbtrace(TRACE_CLASSSTATE(USBMSC_CLASSSTATE_CMDPARSECMDREAD10), priv->cdb[0]);
+ priv->thstate = USBMSC_STATE_CMDREAD;
}
}
@@ -956,32 +956,32 @@ static inline int usbstrg_cmdread10(FAR struct usbstrg_dev_s *priv)
}
/****************************************************************************
- * Name: usbstrg_cmdwrite10
+ * Name: usbmsc_cmdwrite10
*
* Description:
* Handle SCSI_CMD_WRITE10 command
*
****************************************************************************/
-static inline int usbstrg_cmdwrite10(FAR struct usbstrg_dev_s *priv)
+static inline int usbmsc_cmdwrite10(FAR struct usbmsc_dev_s *priv)
{
struct scsicmd_write10_s *write10 = (struct scsicmd_write10_s *)priv->cdb;
- FAR struct usbstrg_lun_s *lun = priv->lun;
+ FAR struct usbmsc_lun_s *lun = priv->lun;
int ret;
- priv->u.xfrlen = usbstrg_getbe16(write10->xfrlen);
- ret = usbstrg_setupcmd(priv, SCSICMD_WRITE10_SIZEOF, USBSTRG_FLAGS_DIRHOST2DEVICE|USBSTRG_FLAGS_BLOCKXFR);
+ priv->u.xfrlen = usbmsc_getbe16(write10->xfrlen);
+ ret = usbmsc_setupcmd(priv, SCSICMD_WRITE10_SIZEOF, USBMSC_FLAGS_DIRHOST2DEVICE|USBMSC_FLAGS_BLOCKXFR);
if (ret == OK)
{
/* Get the Logical Block Address (LBA) from cdb[] as the starting sector */
- priv->sector = usbstrg_getbe32(write10->lba);
+ priv->sector = usbmsc_getbe32(write10->lba);
/* Verify that we can support this write command */
if ((write10->flags & ~(SCSICMD_WRITE10FLAGS_DPO|SCSICMD_WRITE10FLAGS_FUA)) != 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_WRITE10FLAGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_WRITE10FLAGS), 0);
lun->sd = SCSI_KCQIR_INVALIDFIELDINCBA;
ret = -EINVAL;
}
@@ -990,7 +990,7 @@ static inline int usbstrg_cmdwrite10(FAR struct usbstrg_dev_s *priv)
else if (!lun->inode)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_WRITE10MEDIANOTPRESENT), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_WRITE10MEDIANOTPRESENT), 0);
lun->sd = SCSI_KCQNR_MEDIANOTPRESENT;
ret = -EINVAL;
}
@@ -999,7 +999,7 @@ static inline int usbstrg_cmdwrite10(FAR struct usbstrg_dev_s *priv)
else if (lun->readonly)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_WRITE10READONLY), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_WRITE10READONLY), 0);
lun->sd = SCSI_KCQWP_COMMANDNOTALLOWED;
ret = -EINVAL;
}
@@ -1008,7 +1008,7 @@ static inline int usbstrg_cmdwrite10(FAR struct usbstrg_dev_s *priv)
else if (priv->sector >= lun->nsectors)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_WRITE10LBARANGE), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_WRITE10LBARANGE), 0);
lun->sd = SCSI_KCQIR_LBAOUTOFRANGE;
ret = -EINVAL;
}
@@ -1017,25 +1017,25 @@ static inline int usbstrg_cmdwrite10(FAR struct usbstrg_dev_s *priv)
else
{
- usbtrace(TRACE_CLASSSTATE(USBSTRG_CLASSSTATE_CMDPARSECMDWRITE10), priv->cdb[0]);
- priv->thstate = USBSTRG_STATE_CMDWRITE;
+ usbtrace(TRACE_CLASSSTATE(USBMSC_CLASSSTATE_CMDPARSECMDWRITE10), priv->cdb[0]);
+ priv->thstate = USBMSC_STATE_CMDWRITE;
}
}
return ret;
}
/****************************************************************************
- * Name: usbstrg_cmdverify10
+ * Name: usbmsc_cmdverify10
*
* Description:
* Handle SCSI_CMD_VERIFY10 command
*
****************************************************************************/
-static inline int usbstrg_cmdverify10(FAR struct usbstrg_dev_s *priv)
+static inline int usbmsc_cmdverify10(FAR struct usbmsc_dev_s *priv)
{
FAR struct scsicmd_verify10_s *verf = (FAR struct scsicmd_verify10_s *)priv->cdb;
- FAR struct usbstrg_lun_s *lun = priv->lun;
+ FAR struct usbmsc_lun_s *lun = priv->lun;
uint32_t lba;
uint16_t blocks;
size_t sector;
@@ -1044,23 +1044,23 @@ static inline int usbstrg_cmdverify10(FAR struct usbstrg_dev_s *priv)
int i;
priv->u.alloclen = 0;
- ret = usbstrg_setupcmd(priv, SCSICMD_VERIFY10_SIZEOF, USBSTRG_FLAGS_DIRNONE);
+ ret = usbmsc_setupcmd(priv, SCSICMD_VERIFY10_SIZEOF, USBMSC_FLAGS_DIRNONE);
if (ret == OK)
{
/* Verify the starting and ending LBA */
- lba = usbstrg_getbe32(verf->lba);
- blocks = usbstrg_getbe16(verf->len);
+ lba = usbmsc_getbe32(verf->lba);
+ blocks = usbmsc_getbe16(verf->len);
if ((verf->flags & ~SCSICMD_VERIFY10_DPO) != 0 || verf->groupno != 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_VERIFY10FLAGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_VERIFY10FLAGS), 0);
lun->sd = SCSI_KCQIR_INVALIDFIELDINCBA;
ret = -EINVAL;
}
else if (blocks == 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_VERIFY10NOBLOCKS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_VERIFY10NOBLOCKS), 0);
ret = -EIO; /* No reply */
}
@@ -1068,7 +1068,7 @@ static inline int usbstrg_cmdverify10(FAR struct usbstrg_dev_s *priv)
else if (!lun->inode)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_VERIFY10MEDIANOTPRESENT), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_VERIFY10MEDIANOTPRESENT), 0);
lun->sd = SCSI_KCQNR_MEDIANOTPRESENT;
ret = -EINVAL;
}
@@ -1077,7 +1077,7 @@ static inline int usbstrg_cmdverify10(FAR struct usbstrg_dev_s *priv)
else if (lba >= lun->nsectors || lba + blocks > lun->nsectors)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_VERIFY10LBARANGE), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_VERIFY10LBARANGE), 0);
lun->sd = SCSI_KCQIR_LBAOUTOFRANGE;
ret = -EINVAL;
}
@@ -1087,10 +1087,10 @@ static inline int usbstrg_cmdverify10(FAR struct usbstrg_dev_s *priv)
for (i = 0, sector = lba + lun->startsector; i < blocks; i++, sector++)
{
- nread = USBSTRG_DRVR_READ(lun, priv->iobuffer, sector, 1);
+ nread = USBMSC_DRVR_READ(lun, priv->iobuffer, sector, 1);
if (nread < 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_VERIFY10READFAIL), i);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_VERIFY10READFAIL), i);
lun->sd = SCSI_KCQME_UNRRE1;
lun->sdinfo = sector;
ret = -EIO;
@@ -1103,14 +1103,14 @@ static inline int usbstrg_cmdverify10(FAR struct usbstrg_dev_s *priv)
}
/****************************************************************************
- * Name: usbstrg_cmdsynchronizecache10
+ * Name: usbmsc_cmdsynchronizecache10
*
* Description:
* Handle SCSI_CMD_SYNCHCACHE10 command
*
****************************************************************************/
-static inline int usbstrg_cmdsynchronizecache10(FAR struct usbstrg_dev_s *priv)
+static inline int usbmsc_cmdsynchronizecache10(FAR struct usbmsc_dev_s *priv)
{
int ret;
@@ -1120,31 +1120,31 @@ static inline int usbstrg_cmdsynchronizecache10(FAR struct usbstrg_dev_s *priv)
if (!priv->lun->inode)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_SYNCCACHEMEDIANOTPRESENT), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_SYNCCACHEMEDIANOTPRESENT), 0);
priv->lun->sd = SCSI_KCQNR_MEDIANOTPRESENT;
ret = -EINVAL;
}
else
{
- ret = usbstrg_setupcmd(priv, SCSICMD_SYNCHRONIZECACHE10_SIZEOF, USBSTRG_FLAGS_DIRNONE);
+ ret = usbmsc_setupcmd(priv, SCSICMD_SYNCHRONIZECACHE10_SIZEOF, USBMSC_FLAGS_DIRNONE);
}
return ret;
}
/****************************************************************************
- * Name: usbstrg_cmdmodeselect10
+ * Name: usbmsc_cmdmodeselect10
*
* Description:
* Handle SCSI_CMD_MODESELECT10 command
*
****************************************************************************/
-static inline int usbstrg_cmdmodeselect10(FAR struct usbstrg_dev_s *priv)
+static inline int usbmsc_cmdmodeselect10(FAR struct usbmsc_dev_s *priv)
{
FAR struct scsicmd_modeselect10_s *modeselect = (FAR struct scsicmd_modeselect10_s *)priv->cdb;
- priv->u.alloclen = usbstrg_getbe16(modeselect->parmlen);
- (void)usbstrg_setupcmd(priv, SCSICMD_MODESELECT10_SIZEOF, USBSTRG_FLAGS_DIRHOST2DEVICE);
+ priv->u.alloclen = usbmsc_getbe16(modeselect->parmlen);
+ (void)usbmsc_setupcmd(priv, SCSICMD_MODESELECT10_SIZEOF, USBMSC_FLAGS_DIRHOST2DEVICE);
/* Not supported */
@@ -1153,28 +1153,28 @@ static inline int usbstrg_cmdmodeselect10(FAR struct usbstrg_dev_s *priv)
}
/****************************************************************************
- * Name: usbstrg_cmdmodesense10
+ * Name: usbmsc_cmdmodesense10
*
* Description:
* Handle SCSI_CMD_MODESENSE10 command
*
****************************************************************************/
-static int inline usbstrg_cmdmodesense10(FAR struct usbstrg_dev_s *priv,
- FAR uint8_t *buf)
+static int inline usbmsc_cmdmodesense10(FAR struct usbmsc_dev_s *priv,
+ FAR uint8_t *buf)
{
FAR struct scsicmd_modesense10_s *modesense = (FAR struct scsicmd_modesense10_s *)priv->cdb;
FAR struct scsiresp_modeparameterhdr10_s *mph = (FAR struct scsiresp_modeparameterhdr10_s *)buf;
int mdlen;
int ret;
- priv->u.alloclen = usbstrg_getbe16(modesense->alloclen);
- ret = usbstrg_setupcmd(priv, SCSICMD_MODESENSE10_SIZEOF, USBSTRG_FLAGS_DIRDEVICE2HOST);
+ priv->u.alloclen = usbmsc_getbe16(modesense->alloclen);
+ ret = usbmsc_setupcmd(priv, SCSICMD_MODESENSE10_SIZEOF, USBMSC_FLAGS_DIRDEVICE2HOST);
if (ret == OK)
{
if ((modesense->flags & ~SCSICMD_MODESENSE10_DBD) != 0 || modesense->subpgcode != 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_MODESENSE10FLAGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_MODESENSE10FLAGS), 0);
priv->lun->sd = SCSI_KCQIR_INVALIDFIELDINCBA;
ret = -EINVAL;
}
@@ -1192,12 +1192,12 @@ static int inline usbstrg_cmdmodesense10(FAR struct usbstrg_dev_s *priv,
/* There are no block descriptors, only the following mode page: */
- ret = usbstrg_modepage(priv, &buf[SCSIRESP_MODEPARAMETERHDR10_SIZEOF], modesense->pcpgcode, &mdlen);
+ ret = usbmsc_modepage(priv, &buf[SCSIRESP_MODEPARAMETERHDR10_SIZEOF], modesense->pcpgcode, &mdlen);
if (ret == OK)
{
/* Store the mode data length and return the total message size */
- usbstrg_putbe16(mph->mdlen, mdlen - 2);
+ usbmsc_putbe16(mph->mdlen, mdlen - 2);
priv->nreqbytes = mdlen + SCSIRESP_MODEPARAMETERHDR10_SIZEOF;
}
}
@@ -1206,32 +1206,32 @@ static int inline usbstrg_cmdmodesense10(FAR struct usbstrg_dev_s *priv,
}
/****************************************************************************
- * Name: usbstrg_cmdread12
+ * Name: usbmsc_cmdread12
*
* Description:
* Handle SCSI_CMD_READ12 command
*
****************************************************************************/
-static inline int usbstrg_cmdread12(FAR struct usbstrg_dev_s *priv)
+static inline int usbmsc_cmdread12(FAR struct usbmsc_dev_s *priv)
{
struct scsicmd_read12_s *read12 = (struct scsicmd_read12_s*)priv->cdb;
- FAR struct usbstrg_lun_s *lun = priv->lun;
+ FAR struct usbmsc_lun_s *lun = priv->lun;
int ret;
- priv->u.xfrlen = usbstrg_getbe32(read12->xfrlen);
- ret = usbstrg_setupcmd(priv, SCSICMD_READ12_SIZEOF, USBSTRG_FLAGS_DIRDEVICE2HOST|USBSTRG_FLAGS_BLOCKXFR);
+ priv->u.xfrlen = usbmsc_getbe32(read12->xfrlen);
+ ret = usbmsc_setupcmd(priv, SCSICMD_READ12_SIZEOF, USBMSC_FLAGS_DIRDEVICE2HOST|USBMSC_FLAGS_BLOCKXFR);
if (ret == OK)
{
/* Get the Logical Block Address (LBA) from cdb[] as the starting sector */
- priv->sector = usbstrg_getbe32(read12->lba);
+ priv->sector = usbmsc_getbe32(read12->lba);
/* Verify that we can support this read command */
if ((read12->flags & ~(SCSICMD_READ12FLAGS_DPO|SCSICMD_READ12FLAGS_FUA)) != 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_READ12FLAGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_READ12FLAGS), 0);
lun->sd = SCSI_KCQIR_INVALIDFIELDINCBA;
ret = -EINVAL;
}
@@ -1240,7 +1240,7 @@ static inline int usbstrg_cmdread12(FAR struct usbstrg_dev_s *priv)
else if (!lun->inode)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_READ12MEDIANOTPRESENT), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_READ12MEDIANOTPRESENT), 0);
lun->sd = SCSI_KCQNR_MEDIANOTPRESENT;
ret = -EINVAL;
}
@@ -1249,7 +1249,7 @@ static inline int usbstrg_cmdread12(FAR struct usbstrg_dev_s *priv)
else if (priv->sector >= lun->nsectors)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_READ12LBARANGE), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_READ12LBARANGE), 0);
lun->sd = SCSI_KCQIR_LBAOUTOFRANGE;
ret = -EINVAL;
}
@@ -1258,40 +1258,40 @@ static inline int usbstrg_cmdread12(FAR struct usbstrg_dev_s *priv)
else
{
- usbtrace(TRACE_CLASSSTATE(USBSTRG_CLASSSTATE_CMDPARSECMDREAD12), priv->cdb[0]);
- priv->thstate = USBSTRG_STATE_CMDREAD;
+ usbtrace(TRACE_CLASSSTATE(USBMSC_CLASSSTATE_CMDPARSECMDREAD12), priv->cdb[0]);
+ priv->thstate = USBMSC_STATE_CMDREAD;
}
}
return ret;
}
/****************************************************************************
- * Name: usbstrg_cmdwrite12
+ * Name: usbmsc_cmdwrite12
*
* Description:
* Handle SCSI_CMD_WRITE12 command
*
****************************************************************************/
-static inline int usbstrg_cmdwrite12(FAR struct usbstrg_dev_s *priv)
+static inline int usbmsc_cmdwrite12(FAR struct usbmsc_dev_s *priv)
{
struct scsicmd_write12_s *write12 = (struct scsicmd_write12_s *)priv->cdb;
- FAR struct usbstrg_lun_s *lun = priv->lun;
+ FAR struct usbmsc_lun_s *lun = priv->lun;
int ret;
- priv->u.xfrlen = usbstrg_getbe32(write12->xfrlen);
- ret = usbstrg_setupcmd(priv, SCSICMD_WRITE12_SIZEOF, USBSTRG_FLAGS_DIRHOST2DEVICE|USBSTRG_FLAGS_BLOCKXFR);
+ priv->u.xfrlen = usbmsc_getbe32(write12->xfrlen);
+ ret = usbmsc_setupcmd(priv, SCSICMD_WRITE12_SIZEOF, USBMSC_FLAGS_DIRHOST2DEVICE|USBMSC_FLAGS_BLOCKXFR);
if (ret == OK)
{
/* Get the Logical Block Address (LBA) from cdb[] as the starting sector */
- priv->sector = usbstrg_getbe32(write12->lba);
+ priv->sector = usbmsc_getbe32(write12->lba);
/* Verify that we can support this write command */
if ((write12->flags & ~(SCSICMD_WRITE12FLAGS_DPO|SCSICMD_WRITE12FLAGS_FUA)) != 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_WRITE12FLAGS), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_WRITE12FLAGS), 0);
lun->sd = SCSI_KCQIR_INVALIDFIELDINCBA;
}
@@ -1299,7 +1299,7 @@ static inline int usbstrg_cmdwrite12(FAR struct usbstrg_dev_s *priv)
else if (!lun->inode)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_WRITE12MEDIANOTPRESENT), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_WRITE12MEDIANOTPRESENT), 0);
lun->sd = SCSI_KCQNR_MEDIANOTPRESENT;
ret = -EINVAL;
}
@@ -1308,7 +1308,7 @@ static inline int usbstrg_cmdwrite12(FAR struct usbstrg_dev_s *priv)
else if (lun->readonly)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_WRITE12READONLY), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_WRITE12READONLY), 0);
lun->sd = SCSI_KCQWP_COMMANDNOTALLOWED;
}
@@ -1316,7 +1316,7 @@ static inline int usbstrg_cmdwrite12(FAR struct usbstrg_dev_s *priv)
else if (priv->sector >= lun->nsectors)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_WRITE12LBARANGE), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_WRITE12LBARANGE), 0);
lun->sd = SCSI_KCQIR_LBAOUTOFRANGE;
}
@@ -1324,8 +1324,8 @@ static inline int usbstrg_cmdwrite12(FAR struct usbstrg_dev_s *priv)
else
{
- usbtrace(TRACE_CLASSSTATE(USBSTRG_CLASSSTATE_CMDPARSECMDWRITE12), priv->cdb[0]);
- priv->thstate = USBSTRG_STATE_CMDWRITE;
+ usbtrace(TRACE_CLASSSTATE(USBMSC_CLASSSTATE_CMDPARSECMDWRITE12), priv->cdb[0]);
+ priv->thstate = USBMSC_STATE_CMDWRITE;
return OK;
}
}
@@ -1334,7 +1334,7 @@ static inline int usbstrg_cmdwrite12(FAR struct usbstrg_dev_s *priv)
}
/****************************************************************************
- * Name: usbstrg_setupcmd
+ * Name: usbmsc_setupcmd
*
* Description:
* Called after each SCSI command is identified in order to perform setup
@@ -1349,11 +1349,11 @@ static inline int usbstrg_cmdwrite12(FAR struct usbstrg_dev_s *priv)
*
****************************************************************************/
-static int inline usbstrg_setupcmd(FAR struct usbstrg_dev_s *priv, uint8_t cdblen, uint8_t flags)
+static int inline usbmsc_setupcmd(FAR struct usbmsc_dev_s *priv, uint8_t cdblen, uint8_t flags)
{
- FAR struct usbstrg_lun_s *lun = NULL;
+ FAR struct usbmsc_lun_s *lun = NULL;
uint32_t datlen;
- uint8_t dir = flags & USBSTRG_FLAGS_DIRMASK;
+ uint8_t dir = flags & USBMSC_FLAGS_DIRMASK;
int ret = OK;
/* Verify the LUN and set up the current LUN reference in the
@@ -1373,17 +1373,17 @@ static int inline usbstrg_setupcmd(FAR struct usbstrg_dev_s *priv, uint8_t cdble
/* Only a few commands may specify unsupported LUNs */
- else if ((flags & USBSTRG_FLAGS_LUNNOTNEEDED) == 0)
+ else if ((flags & USBMSC_FLAGS_LUNNOTNEEDED) == 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDBADLUN), priv->cbwlun);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CMDBADLUN), priv->cbwlun);
ret = -EINVAL;
}
/* Extract the direction and data transfer length */
- dir = flags & USBSTRG_FLAGS_DIRMASK; /* Expected data direction */
+ dir = flags & USBMSC_FLAGS_DIRMASK; /* Expected data direction */
datlen = 0;
- if ((flags & USBSTRG_FLAGS_BLOCKXFR) == 0)
+ if ((flags & USBMSC_FLAGS_BLOCKXFR) == 0)
{
/* Non-block transfer. Data length: Host allocation to receive data
* (only for device-to-host transfers. At present, alloclen is set
@@ -1408,7 +1408,7 @@ static int inline usbstrg_setupcmd(FAR struct usbstrg_dev_s *priv, uint8_t cdble
{
/* No data.. then direction is none */
- dir = USBSTRG_FLAGS_DIRNONE;
+ dir = USBMSC_FLAGS_DIRNONE;
}
/* Compare the expected data length in the command to the data length
@@ -1419,8 +1419,8 @@ static int inline usbstrg_setupcmd(FAR struct usbstrg_dev_s *priv, uint8_t cdble
{
/* Clip to the length in the CBW and declare a phase error */
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_PHASEERROR1), priv->cdb[0]);
- if ((flags & USBSTRG_FLAGS_BLOCKXFR) != 0)
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_PHASEERROR1), priv->cdb[0]);
+ if ((flags & USBMSC_FLAGS_BLOCKXFR) != 0)
{
priv->u.alloclen = priv->cbwlen;
}
@@ -1440,7 +1440,7 @@ static int inline usbstrg_setupcmd(FAR struct usbstrg_dev_s *priv, uint8_t cdble
if (priv->cbwdir != dir && datlen > 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_PHASEERROR2), priv->cdb[0]);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_PHASEERROR2), priv->cdb[0]);
priv->phaseerror = 1;
ret = -EINVAL;
}
@@ -1451,7 +1451,7 @@ static int inline usbstrg_setupcmd(FAR struct usbstrg_dev_s *priv, uint8_t cdble
if (cdblen != priv->cdblen)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_PHASEERROR3), priv->cdb[0]);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_PHASEERROR3), priv->cdb[0]);
priv->phaseerror = 1;
ret = -EINVAL;
}
@@ -1460,7 +1460,7 @@ static int inline usbstrg_setupcmd(FAR struct usbstrg_dev_s *priv, uint8_t cdble
{
/* Retain the sense data for the REQUEST SENSE command */
- if ((flags & USBSTRG_FLAGS_RETAINSENSEDATA) == 0)
+ if ((flags & USBMSC_FLAGS_RETAINSENSEDATA) == 0)
{
/* Discard the sense data */
@@ -1472,11 +1472,11 @@ static int inline usbstrg_setupcmd(FAR struct usbstrg_dev_s *priv, uint8_t cdble
* commands is permitted.
*/
- if (lun->uad != SCSI_KCQ_NOSENSE && (flags & USBSTRG_FLAGS_UACOKAY) != 0)
+ if (lun->uad != SCSI_KCQ_NOSENSE && (flags & USBMSC_FLAGS_UACOKAY) != 0)
{
/* Command not permitted */
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDUNEVIOLATION), priv->cbwlun);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CMDUNEVIOLATION), priv->cbwlun);
lun->sd = lun->uad;
lun->uad = SCSI_KCQ_NOSENSE;
ret = -EINVAL;
@@ -1489,7 +1489,7 @@ static int inline usbstrg_setupcmd(FAR struct usbstrg_dev_s *priv, uint8_t cdble
if (priv->cdb[cdblen-1] != 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_SCSICMDCONTROL), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_SCSICMDCONTROL), 0);
if (lun)
{
lun->sd = SCSI_KCQIR_INVALIDFIELDINCBA;
@@ -1500,56 +1500,56 @@ static int inline usbstrg_setupcmd(FAR struct usbstrg_dev_s *priv, uint8_t cdble
}
/****************************************************************************
- * Name: usbstrg_idlestate
+ * Name: usbmsc_idlestate
*
* Description:
- * Called from the worker thread in the USBSTRG_STATE_IDLE state. Checks
+ * Called from the worker thread in the USBMSC_STATE_IDLE state. Checks
* for the receipt of a bulk CBW.
*
* Returned value:
* If no new, valid CBW is available, this function returns a negated errno.
* Otherwise, when a new CBW is successfully parsed, this function sets
- * priv->thstate to USBSTRG_STATE_CMDPARSE and returns OK.
+ * priv->thstate to USBMSC_STATE_CMDPARSE and returns OK.
*
****************************************************************************/
-static int usbstrg_idlestate(FAR struct usbstrg_dev_s *priv)
+static int usbmsc_idlestate(FAR struct usbmsc_dev_s *priv)
{
- FAR struct usbstrg_req_s *privreq;
+ FAR struct usbmsc_req_s *privreq;
FAR struct usbdev_req_s *req;
- FAR struct usbstrg_cbw_s *cbw;
+ FAR struct usbmsc_cbw_s *cbw;
irqstate_t flags;
int ret = -EINVAL;
/* Take a request from the rdreqlist */
flags = irqsave();
- privreq = (FAR struct usbstrg_req_s *)sq_remfirst(&priv->rdreqlist);
+ privreq = (FAR struct usbmsc_req_s *)sq_remfirst(&priv->rdreqlist);
irqrestore(flags);
/* Has anything been received? If not, just return an error.
* This will cause us to remain in the IDLE state. When a USB request is
- * received, the worker thread will be awakened in the USBSTRG_STATE_IDLE
+ * received, the worker thread will be awakened in the USBMSC_STATE_IDLE
* and we will be called again.
*/
if (!privreq)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_IDLERDREQLISTEMPTY), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_IDLERDREQLISTEMPTY), 0);
return -ENOMEM;
}
req = privreq->req;
- cbw = (FAR struct usbstrg_cbw_s *)req->buf;
+ cbw = (FAR struct usbmsc_cbw_s *)req->buf;
/* Handle the CBW */
- usbstrg_dumpdata("SCSCI CBW", (uint8_t*)cbw, USBSTRG_CBW_SIZEOF - USBSTRG_MAXCDBLEN);
- usbstrg_dumpdata(" CDB", cbw->cdb, MIN(cbw->cdblen, USBSTRG_MAXCDBLEN));
+ usbmsc_dumpdata("SCSCI CBW", (uint8_t*)cbw, USBMSC_CBW_SIZEOF - USBMSC_MAXCDBLEN);
+ usbmsc_dumpdata(" CDB", cbw->cdb, MIN(cbw->cdblen, USBMSC_MAXCDBLEN));
/* Check for properly formatted CBW? */
- if (req->xfrd != USBSTRG_CBW_SIZEOF ||
+ if (req->xfrd != USBMSC_CBW_SIZEOF ||
cbw->signature[0] != 'U' ||
cbw->signature[1] != 'S' ||
cbw->signature[2] != 'B' ||
@@ -1560,22 +1560,22 @@ static int usbstrg_idlestate(FAR struct usbstrg_dev_s *priv)
* (2) discard data from the endpoint.
*/
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_INVALIDCBWSIGNATURE), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_INVALIDCBWSIGNATURE), 0);
EP_STALL(priv->epbulkout);
EP_STALL(priv->epbulkin);
}
/* Is the CBW meaningful? */
- else if (cbw->lun >= priv->nluns || (cbw->flags & ~USBSTRG_CBWFLAG_IN) != 0 ||
- cbw->cdblen < 6 || cbw->cdblen > USBSTRG_MAXCDBLEN)
+ else if (cbw->lun >= priv->nluns || (cbw->flags & ~USBMSC_CBWFLAG_IN) != 0 ||
+ cbw->cdblen < 6 || cbw->cdblen > USBMSC_MAXCDBLEN)
{
/* CBS BAD: Stall the bulk endpoints. If the CBW is bad we must stall the
* bulk IN endpoint and either (1) stall the bulk OUT endpoint, or
* (2) discard data from the endpoint.
*/
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_INVALIDCBWCONTENT), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_INVALIDCBWCONTENT), 0);
EP_STALL(priv->epbulkout);
EP_STALL(priv->epbulkin);
}
@@ -1591,50 +1591,50 @@ static int usbstrg_idlestate(FAR struct usbstrg_dev_s *priv)
/* Extract the data direction */
- if ((cbw->flags & USBSTRG_CBWFLAG_IN) != 0)
+ if ((cbw->flags & USBMSC_CBWFLAG_IN) != 0)
{
/* IN: Device-to-host */
- priv->cbwdir = USBSTRG_FLAGS_DIRDEVICE2HOST;
+ priv->cbwdir = USBMSC_FLAGS_DIRDEVICE2HOST;
}
else
{
/* OUT: Host-to-device */
- priv->cbwdir = USBSTRG_FLAGS_DIRHOST2DEVICE;
+ priv->cbwdir = USBMSC_FLAGS_DIRHOST2DEVICE;
}
/* Get the max size of the data response */
- priv->cbwlen = usbstrg_getle32(cbw->datlen);
+ priv->cbwlen = usbmsc_getle32(cbw->datlen);
if (priv->cbwlen == 0)
{
/* No length? Then no direction either */
- priv->cbwdir = USBSTRG_FLAGS_DIRNONE;
+ priv->cbwdir = USBMSC_FLAGS_DIRNONE;
}
/* Extract and save the LUN index and TAG value */
priv->cbwlun = cbw->lun;
- priv->cbwtag = usbstrg_getle32(cbw->tag);
+ priv->cbwtag = usbmsc_getle32(cbw->tag);
/* Return the read request to the bulk out endpoint for re-filling */
req = privreq->req;
- req->len = CONFIG_USBSTRG_BULKOUTREQLEN;
+ req->len = CONFIG_USBMSC_BULKOUTREQLEN;
req->priv = privreq;
- req->callback = usbstrg_rdcomplete;
+ req->callback = usbmsc_rdcomplete;
if (EP_SUBMIT(priv->epbulkout, req) != OK)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_IDLERDSUBMIT), (uint16_t)-ret);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_IDLERDSUBMIT), (uint16_t)-ret);
}
/* Change to the CMDPARSE state and return success */
- usbtrace(TRACE_CLASSSTATE(USBSTRG_CLASSSTATE_IDLECMDPARSE), priv->cdb[0]);
- priv->thstate = USBSTRG_STATE_CMDPARSE;
+ usbtrace(TRACE_CLASSSTATE(USBMSC_CLASSSTATE_IDLECMDPARSE), priv->cdb[0]);
+ priv->thstate = USBMSC_STATE_CMDPARSE;
ret = OK;
}
@@ -1642,45 +1642,45 @@ static int usbstrg_idlestate(FAR struct usbstrg_dev_s *priv)
}
/****************************************************************************
- * Name: usbstrg_cmdparsestate
+ * Name: usbmsc_cmdparsestate
*
* Description:
- * Called from the worker thread in the USBSTRG_STATE_CMDPARSE state.
- * This state is entered when usbstrg_idlestate obtains a valid CBW
+ * Called from the worker thread in the USBMSC_STATE_CMDPARSE state.
+ * This state is entered when usbmsc_idlestate obtains a valid CBW
* containing SCSI commands. This function processes those SCSI commands.
*
* Returned value:
* If no write request is available or certain other errors occur, this
- * function returns a negated errno and stays in the USBSTRG_STATE_CMDPARSE
+ * function returns a negated errno and stays in the USBMSC_STATE_CMDPARSE
* state. Otherwise, when the new CBW is successfully process, this
- * function sets priv->thstate to one of USBSTRG_STATE_CMDREAD,
- * USBSTRG_STATE_CMDWRITE, or USBSTRG_STATE_CMDFINISH and returns OK.
+ * function sets priv->thstate to one of USBMSC_STATE_CMDREAD,
+ * USBMSC_STATE_CMDWRITE, or USBMSC_STATE_CMDFINISH and returns OK.
*
****************************************************************************/
-static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv)
+static int usbmsc_cmdparsestate(FAR struct usbmsc_dev_s *priv)
{
- FAR struct usbstrg_req_s *privreq;
+ FAR struct usbmsc_req_s *privreq;
FAR uint8_t *buf;
int ret = -EINVAL;
- usbstrg_dumpdata("SCSCI CDB", priv->cdb, priv->cdblen);
+ usbmsc_dumpdata("SCSCI CDB", priv->cdb, priv->cdblen);
/* Check if there is a request in the wrreqlist that we will be able to
* use for data or status.
*/
- privreq = (FAR struct usbstrg_req_s *)sq_peek(&priv->wrreqlist);
+ privreq = (FAR struct usbmsc_req_s *)sq_peek(&priv->wrreqlist);
/* If there no request structures available, then just return an error.
* This will cause us to remain in the CMDPARSE state. When a request is
- * returned, the worker thread will be awakened in the USBSTRG_STATE_CMDPARSE
+ * returned, the worker thread will be awakened in the USBMSC_STATE_CMDPARSE
* and we will be called again.
*/
if (!privreq)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDPARSEWRREQLISTEMPTY), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CMDPARSEWRREQLISTEMPTY), 0);
return -ENOMEM;
}
DEBUGASSERT(privreq->req && privreq->req->buf);
@@ -1702,14 +1702,14 @@ static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv)
switch (priv->cdb[0])
{
case SCSI_CMD_TESTUNITREADY: /* 0x00 Mandatory */
- ret = usbstrg_cmdtestunitready(priv);
+ ret = usbmsc_cmdtestunitready(priv);
break;
/* case SCSI_CMD_REZEROUNIT: * 0x01 Obsolete
* * 0x02 Vendor-specific */
case SCSI_CMD_REQUESTSENSE: /* 0x03 Mandatory */
- ret = usbstrg_cmdrequestsense(priv, buf);
+ ret = usbmsc_cmdrequestsense(priv, buf);
break;
/* case SCSI_CMD_FORMAT_UNIT: * 0x04 Mandatory, but not implemented
@@ -1718,13 +1718,13 @@ static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv)
* case SCSI_CMD_REASSIGNBLOCKS: * 0x07 Optional */
case SCSI_CMD_READ6: /* 0x08 Mandatory */
- ret = usbstrg_cmdread6(priv);
+ ret = usbmsc_cmdread6(priv);
break;
/* * 0x09 Vendor specific */
case SCSI_CMD_WRITE6: /* 0x0a Optional */
- ret = usbstrg_cmdwrite6(priv);
+ ret = usbmsc_cmdwrite6(priv);
break;
/* case SCSI_CMD_SEEK6: * 0x0b Obsolete
@@ -1732,13 +1732,13 @@ static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv)
* case SCSI_CMD_SPACE6: * 0x11 Vendor specific */
case SCSI_CMD_INQUIRY: /* 0x12 Mandatory */
- ret = usbstrg_cmdinquiry(priv, buf);
+ ret = usbmsc_cmdinquiry(priv, buf);
break;
/* * 0x13-0x14 Vendor specific */
case SCSI_CMD_MODESELECT6: /* 0x15 Optional */
- ret = usbstrg_cmdmodeselect6(priv);
+ ret = usbmsc_cmdmodeselect6(priv);
break;
/* case SCSI_CMD_RESERVE6: * 0x16 Obsolete
@@ -1747,39 +1747,39 @@ static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv)
* * 0x19 Vendor specific */
case SCSI_CMD_MODESENSE6: /* 0x1a Optional */
- ret = usbstrg_cmdmodesense6(priv, buf);
+ ret = usbmsc_cmdmodesense6(priv, buf);
break;
case SCSI_CMD_STARTSTOPUNIT: /* 0x1b Optional */
- ret = usbstrg_cmdstartstopunit(priv);
+ ret = usbmsc_cmdstartstopunit(priv);
break;
/* case SCSI_CMD_RECEIVEDIAGNOSTICRESULTS: * 0x1c Optional
* case SCSI_CMD_SENDDIAGNOSTIC: * 0x1d Mandatory, but not implemented */
case SCSI_CMD_PREVENTMEDIAREMOVAL: /* 0x1e Optional */
- ret = usbstrg_cmdpreventmediumremoval(priv);
+ ret = usbmsc_cmdpreventmediumremoval(priv);
break;
/* * 0x20-22 Vendor specific */
case SCSI_CMD_READFORMATCAPACITIES: /* 0x23 Vendor-specific (defined in MMC spec) */
- ret = usbstrg_cmdreadformatcapacity(priv, buf);
+ ret = usbmsc_cmdreadformatcapacity(priv, buf);
break;
/* * 0x24 Vendor specific */
case SCSI_CMD_READCAPACITY10: /* 0x25 Mandatory */
- ret = usbstrg_cmdreadcapacity10(priv, buf);
+ ret = usbmsc_cmdreadcapacity10(priv, buf);
break;
/* * 0x26-27 Vendor specific */
case SCSI_CMD_READ10: /* 0x28 Mandatory */
- ret = usbstrg_cmdread10(priv);
+ ret = usbmsc_cmdread10(priv);
break;
/* * 0x29 Vendor specific */
case SCSI_CMD_WRITE10: /* 0x2a Optional */
- ret = usbstrg_cmdwrite10(priv);
+ ret = usbmsc_cmdwrite10(priv);
break;
/* case SCSI_CMD_SEEK10: * 0x2b Obsolete
@@ -1787,7 +1787,7 @@ static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv)
* case SCSI_CMD_WRITEANDVERIFY: * 0x2e Optional */
case SCSI_CMD_VERIFY10: /* 0x2f Optional, but needed my MS Windows */
- ret = usbstrg_cmdverify10(priv);
+ ret = usbmsc_cmdverify10(priv);
break;
/* case SCSI_CMD_SEARCHDATAHIGH: * 0x30 Obsolete
@@ -1797,7 +1797,7 @@ static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv)
* case SCSI_CMD_PREFETCH10: * 0x34 Optional */
case SCSI_CMD_SYNCHCACHE10: /* 0x35 Optional */
- ret = usbstrg_cmdsynchronizecache10(priv);
+ ret = usbmsc_cmdsynchronizecache10(priv);
break;
/* case SCSI_CMD_LOCKCACHE: * 0x36 Obsolete
@@ -1817,14 +1817,14 @@ static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv)
* case SCSI_CMD_XDREAD10: * 0x52 Optional */
case SCSI_CMD_MODESELECT10: /* 0x55 Optional */
- ret = usbstrg_cmdmodeselect10(priv);
+ ret = usbmsc_cmdmodeselect10(priv);
break;
/* case SCSI_CMD_RESERVE10: * 0x56 Obsolete
* case SCSI_CMD_RELEASE10: * 0x57 Obsolete */
case SCSI_CMD_MODESENSE10: /* 0x5a Optional */
- ret = usbstrg_cmdmodesense10(priv, buf);
+ ret = usbmsc_cmdmodesense10(priv, buf);
break;
/* case SCSI_CMD_PERSISTENTRESERVEIN: * 0x5e Optional
@@ -1855,11 +1855,11 @@ static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv)
* case SCSI_CMD_MOVEMEDIUMATTACHED: * 0xa7 Optional (MCHNGR==0) */
case SCSI_CMD_READ12: /* 0xa8 Optional */
- ret = usbstrg_cmdread12(priv);
+ ret = usbmsc_cmdread12(priv);
break;
case SCSI_CMD_WRITE12: /* 0xaa Optional */
- ret = usbstrg_cmdwrite12(priv);
+ ret = usbmsc_cmdwrite12(priv);
break;
/* case SCSI_CMD_READMEDIASERIALNUMBER: * 0xab Optional
@@ -1889,7 +1889,7 @@ static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv)
/* Is a response required? (Not for read6/10/12 and write6/10/12). */
- if (priv->thstate == USBSTRG_STATE_CMDPARSE)
+ if (priv->thstate == USBMSC_STATE_CMDPARSE)
{
/* All commands come through this path (EXCEPT read6/10/12 and write6/10/12).
* For all other commands, the following setup is expected for the response
@@ -1921,7 +1921,7 @@ static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv)
* in the response:
*/
- if (priv->cbwdir == USBSTRG_FLAGS_DIRDEVICE2HOST)
+ if (priv->cbwdir == USBMSC_FLAGS_DIRDEVICE2HOST)
{
/* The number of bytes in the response cannot exceed the host
* 'allocation length' in the command.
@@ -1945,28 +1945,28 @@ static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv)
* 3. Return OK to continue; <0 to wait for the next event
*/
- usbtrace(TRACE_CLASSSTATE(USBSTRG_CLASSSTATE_CMDPARSECMDFINISH), priv->cdb[0]);
- priv->thstate = USBSTRG_STATE_CMDFINISH;
+ usbtrace(TRACE_CLASSSTATE(USBMSC_CLASSSTATE_CMDPARSECMDFINISH), priv->cdb[0]);
+ priv->thstate = USBMSC_STATE_CMDFINISH;
ret = OK;
}
return ret;
}
/****************************************************************************
- * Name: usbstrg_cmdreadstate
+ * Name: usbmsc_cmdreadstate
*
* Description:
- * Called from the worker thread in the USBSTRG_STATE_CMDREAD state.
- * The USBSTRG_STATE_CMDREAD state is entered when usbstrg_cmdparsestate
+ * Called from the worker thread in the USBMSC_STATE_CMDREAD state.
+ * The USBMSC_STATE_CMDREAD state is entered when usbmsc_cmdparsestate
* obtains a valid SCSI read command. This state is really a continuation
- * of the USBSTRG_STATE_CMDPARSE state that handles extended SCSI read
+ * of the USBMSC_STATE_CMDPARSE state that handles extended SCSI read
* command handling.
*
* Returned value:
* If no USBDEV write request is available or certain other errors occur, this
- * function returns a negated errno and stays in the USBSTRG_STATE_CMDREAD
+ * function returns a negated errno and stays in the USBMSC_STATE_CMDREAD
* state. Otherwise, when the new SCSI read command is fully processed,
- * this function sets priv->thstate to USBSTRG_STATE_CMDFINISH and returns OK.
+ * this function sets priv->thstate to USBMSC_STATE_CMDFINISH and returns OK.
*
* State variables:
* xfrlen - holds the number of sectors read to be read.
@@ -1977,10 +1977,10 @@ static int usbstrg_cmdparsestate(FAR struct usbstrg_dev_s *priv)
*
****************************************************************************/
-static int usbstrg_cmdreadstate(FAR struct usbstrg_dev_s *priv)
+static int usbmsc_cmdreadstate(FAR struct usbmsc_dev_s *priv)
{
- FAR struct usbstrg_lun_s *lun = priv->lun;
- FAR struct usbstrg_req_s *privreq;
+ FAR struct usbmsc_lun_s *lun = priv->lun;
+ FAR struct usbmsc_req_s *privreq;
FAR struct usbdev_req_s *req;
irqstate_t flags;
ssize_t nread;
@@ -1996,7 +1996,7 @@ static int usbstrg_cmdreadstate(FAR struct usbstrg_dev_s *priv)
while (priv->u.xfrlen > 0 || priv->nsectbytes > 0)
{
- usbtrace(TRACE_CLASSSTATE(USBSTRG_CLASSSTATE_CMDREAD), priv->u.xfrlen);
+ usbtrace(TRACE_CLASSSTATE(USBMSC_CLASSSTATE_CMDREAD), priv->u.xfrlen);
/* Is the I/O buffer empty? */
@@ -2004,10 +2004,10 @@ static int usbstrg_cmdreadstate(FAR struct usbstrg_dev_s *priv)
{
/* Yes.. read the next sector */
- nread = USBSTRG_DRVR_READ(lun, priv->iobuffer, priv->sector, 1);
+ nread = USBMSC_DRVR_READ(lun, priv->iobuffer, priv->sector, 1);
if (nread < 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDREADREADFAIL), -nread);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CMDREADREADFAIL), -nread);
lun->sd = SCSI_KCQME_UNRRE1;
lun->sdinfo = priv->sector;
break;
@@ -2022,17 +2022,17 @@ static int usbstrg_cmdreadstate(FAR struct usbstrg_dev_s *priv)
* use for data transfer.
*/
- privreq = (FAR struct usbstrg_req_s *)sq_peek(&priv->wrreqlist);
+ privreq = (FAR struct usbmsc_req_s *)sq_peek(&priv->wrreqlist);
/* If there no request structures available, then just return an error.
* This will cause us to remain in the CMDREAD state. When a request is
- * returned, the worker thread will be awakened in the USBSTRG_STATE_CMDREAD
+ * returned, the worker thread will be awakened in the USBMSC_STATE_CMDREAD
* and we will be called again.
*/
if (!privreq)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDREADWRRQEMPTY), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CMDREADWRRQEMPTY), 0);
priv->nreqbytes = 0;
return -ENOMEM;
}
@@ -2045,7 +2045,7 @@ static int usbstrg_cmdreadstate(FAR struct usbstrg_dev_s *priv)
src = &priv->iobuffer[lun->sectorsize - priv->nsectbytes];
dest = &req->buf[priv->nreqbytes];
- nbytes = MIN(CONFIG_USBSTRG_BULKINREQLEN - priv->nreqbytes, priv->nsectbytes);
+ nbytes = MIN(CONFIG_USBMSC_BULKINREQLEN - priv->nreqbytes, priv->nsectbytes);
/* Copy the data from the sector buffer to the USB request and update counts */
@@ -2057,7 +2057,7 @@ static int usbstrg_cmdreadstate(FAR struct usbstrg_dev_s *priv)
* then submit the request
*/
- if (priv->nreqbytes >= CONFIG_USBSTRG_BULKINREQLEN ||
+ if (priv->nreqbytes >= CONFIG_USBMSC_BULKINREQLEN ||
(priv->u.xfrlen <= 0 && priv->nsectbytes <= 0))
{
/* Remove the request that we just filled from wrreqlist (we've already checked
@@ -2065,20 +2065,20 @@ static int usbstrg_cmdreadstate(FAR struct usbstrg_dev_s *priv)
*/
flags = irqsave();
- privreq = (FAR struct usbstrg_req_s *)sq_remfirst(&priv->wrreqlist);
+ privreq = (FAR struct usbmsc_req_s *)sq_remfirst(&priv->wrreqlist);
irqrestore(flags);
/* And submit the request to the bulk IN endpoint */
req->len = priv->nreqbytes;
req->priv = privreq;
- req->callback = usbstrg_wrcomplete;
+ req->callback = usbmsc_wrcomplete;
req->flags = 0;
ret = EP_SUBMIT(priv->epbulkin, req);
if (ret != OK)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDREADSUBMIT), (uint16_t)-ret);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CMDREADSUBMIT), (uint16_t)-ret);
lun->sd = SCSI_KCQME_UNRRE1;
lun->sdinfo = priv->sector;
break;
@@ -2093,26 +2093,26 @@ static int usbstrg_cmdreadstate(FAR struct usbstrg_dev_s *priv)
}
}
- usbtrace(TRACE_CLASSSTATE(USBSTRG_CLASSSTATE_CMDREADCMDFINISH), priv->u.xfrlen);
- priv->thstate = USBSTRG_STATE_CMDFINISH;
+ usbtrace(TRACE_CLASSSTATE(USBMSC_CLASSSTATE_CMDREADCMDFINISH), priv->u.xfrlen);
+ priv->thstate = USBMSC_STATE_CMDFINISH;
return OK;
}
/****************************************************************************
- * Name: usbstrg_cmdwritestate
+ * Name: usbmsc_cmdwritestate
*
* Description:
- * Called from the worker thread in the USBSTRG_STATE_CMDWRITE state.
- * The USBSTRG_STATE_CMDWRITE state is entered when usbstrg_cmdparsestate
+ * Called from the worker thread in the USBMSC_STATE_CMDWRITE state.
+ * The USBMSC_STATE_CMDWRITE state is entered when usbmsc_cmdparsestate
* obtains a valid SCSI write command. This state is really a continuation
- * of the USBSTRG_STATE_CMDPARSE state that handles extended SCSI write
+ * of the USBMSC_STATE_CMDPARSE state that handles extended SCSI write
* command handling.
*
* Returned value:
* If no USBDEV write request is available or certain other errors occur, this
- * function returns a negated errno and stays in the USBSTRG_STATE_CMDWRITE
+ * function returns a negated errno and stays in the USBMSC_STATE_CMDWRITE
* state. Otherwise, when the new SCSI write command is fully processed,
- * this function sets priv->thstate to USBSTRG_STATE_CMDFINISH and returns OK.
+ * this function sets priv->thstate to USBMSC_STATE_CMDFINISH and returns OK.
*
* State variables:
* xfrlen - holds the number of sectors read to be written.
@@ -2123,10 +2123,10 @@ static int usbstrg_cmdreadstate(FAR struct usbstrg_dev_s *priv)
*
****************************************************************************/
-static int usbstrg_cmdwritestate(FAR struct usbstrg_dev_s *priv)
+static int usbmsc_cmdwritestate(FAR struct usbmsc_dev_s *priv)
{
- FAR struct usbstrg_lun_s *lun = priv->lun;
- FAR struct usbstrg_req_s *privreq;
+ FAR struct usbmsc_lun_s *lun = priv->lun;
+ FAR struct usbmsc_req_s *privreq;
FAR struct usbdev_req_s *req;
ssize_t nwritten;
uint16_t xfrd;
@@ -2142,23 +2142,23 @@ static int usbstrg_cmdwritestate(FAR struct usbstrg_dev_s *priv)
while (priv->u.xfrlen > 0)
{
- usbtrace(TRACE_CLASSSTATE(USBSTRG_CLASSSTATE_CMDWRITE), priv->u.xfrlen);
+ usbtrace(TRACE_CLASSSTATE(USBMSC_CLASSSTATE_CMDWRITE), priv->u.xfrlen);
/* Check if there is a request in the rdreqlist containing additional
* data to be written.
*/
- privreq = (FAR struct usbstrg_req_s *)sq_remfirst(&priv->rdreqlist);
+ privreq = (FAR struct usbmsc_req_s *)sq_remfirst(&priv->rdreqlist);
/* If there no request data available, then just return an error.
* This will cause us to remain in the CMDWRITE state. When a filled request is
- * received, the worker thread will be awakened in the USBSTRG_STATE_CMDWRITE
+ * received, the worker thread will be awakened in the USBMSC_STATE_CMDWRITE
* and we will be called again.
*/
if (!privreq)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDWRITERDRQEMPTY), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CMDWRITERDRQEMPTY), 0);
priv->nreqbytes = 0;
return -ENOMEM;
}
@@ -2192,10 +2192,10 @@ static int usbstrg_cmdwritestate(FAR struct usbstrg_dev_s *priv)
{
/* Yes.. Write the next sector */
- nwritten = USBSTRG_DRVR_WRITE(lun, priv->iobuffer, priv->sector, 1);
+ nwritten = USBMSC_DRVR_WRITE(lun, priv->iobuffer, priv->sector, 1);
if (nwritten < 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDWRITEWRITEFAIL), -nwritten);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CMDWRITEWRITEFAIL), -nwritten);
lun->sd = SCSI_KCQME_WRITEFAULTAUTOREALLOCFAILED;
lun->sdinfo = priv->sector;
goto errout;
@@ -2213,19 +2213,19 @@ static int usbstrg_cmdwritestate(FAR struct usbstrg_dev_s *priv)
* to get the next read request.
*/
- req->len = CONFIG_USBSTRG_BULKOUTREQLEN;
+ req->len = CONFIG_USBMSC_BULKOUTREQLEN;
req->priv = privreq;
- req->callback = usbstrg_rdcomplete;
+ req->callback = usbmsc_rdcomplete;
ret = EP_SUBMIT(priv->epbulkout, req);
if (ret != OK)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDWRITERDSUBMIT), (uint16_t)-ret);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CMDWRITERDSUBMIT), (uint16_t)-ret);
}
/* Did the host decide to stop early? */
- if (xfrd != CONFIG_USBSTRG_BULKOUTREQLEN)
+ if (xfrd != CONFIG_USBMSC_BULKOUTREQLEN)
{
priv->shortpacket = 1;
goto errout;
@@ -2233,30 +2233,30 @@ static int usbstrg_cmdwritestate(FAR struct usbstrg_dev_s *priv)
}
errout:
- usbtrace(TRACE_CLASSSTATE(USBSTRG_CLASSSTATE_CMDWRITECMDFINISH), priv->u.xfrlen);
- priv->thstate = USBSTRG_STATE_CMDFINISH;
+ usbtrace(TRACE_CLASSSTATE(USBMSC_CLASSSTATE_CMDWRITECMDFINISH), priv->u.xfrlen);
+ priv->thstate = USBMSC_STATE_CMDFINISH;
return OK;
}
/****************************************************************************
- * Name: usbstrg_cmdfinishstate
+ * Name: usbmsc_cmdfinishstate
*
* Description:
- * Called from the worker thread in the USBSTRG_STATE_CMDFINISH state.
- * The USBSTRG_STATE_CMDFINISH state is entered when processing of a
+ * Called from the worker thread in the USBMSC_STATE_CMDFINISH state.
+ * The USBMSC_STATE_CMDFINISH state is entered when processing of a
* command has finished but before status has been returned.
*
* Returned value:
* If no USBDEV write request is available or certain other errors occur, this
- * function returns a negated errno and stays in the USBSTRG_STATE_CMDFINISH
+ * function returns a negated errno and stays in the USBMSC_STATE_CMDFINISH
* state. Otherwise, when the command is fully processed, this function
- * sets priv->thstate to USBSTRG_STATE_CMDSTATUS and returns OK.
+ * sets priv->thstate to USBMSC_STATE_CMDSTATUS and returns OK.
*
****************************************************************************/
-static int usbstrg_cmdfinishstate(FAR struct usbstrg_dev_s *priv)
+static int usbmsc_cmdfinishstate(FAR struct usbmsc_dev_s *priv)
{
- FAR struct usbstrg_req_s *privreq;
+ FAR struct usbmsc_req_s *privreq;
irqstate_t flags;
int ret = OK;
@@ -2264,17 +2264,17 @@ static int usbstrg_cmdfinishstate(FAR struct usbstrg_dev_s *priv)
* use for data transfer.
*/
- privreq = (FAR struct usbstrg_req_s *)sq_peek(&priv->wrreqlist);
+ privreq = (FAR struct usbmsc_req_s *)sq_peek(&priv->wrreqlist);
/* If there no request structures available, then just return an error.
* This will cause us to remain in the CMDREAD state. When a request is
- * returned, the worker thread will be awakened in the USBSTRG_STATE_CMDREAD
+ * returned, the worker thread will be awakened in the USBMSC_STATE_CMDREAD
* and we will be called again.
*/
if (!privreq)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDFINISHRQEMPTY), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CMDFINISHRQEMPTY), 0);
return -ENOMEM;
}
@@ -2284,7 +2284,7 @@ static int usbstrg_cmdfinishstate(FAR struct usbstrg_dev_s *priv)
{
/* Device-to-host: All but the last data buffer has been sent */
- case USBSTRG_FLAGS_DIRDEVICE2HOST:
+ case USBMSC_FLAGS_DIRDEVICE2HOST:
if (priv->cbwlen > 0)
{
/* On most commands (the exception is outgoing, write commands),
@@ -2300,21 +2300,21 @@ static int usbstrg_cmdfinishstate(FAR struct usbstrg_dev_s *priv)
*/
flags = irqsave();
- privreq = (FAR struct usbstrg_req_s *)sq_remfirst(&priv->wrreqlist);
+ privreq = (FAR struct usbmsc_req_s *)sq_remfirst(&priv->wrreqlist);
irqrestore(flags);
/* Send the write request */
req = privreq->req;
req->len = priv->nreqbytes;
- req->callback = usbstrg_wrcomplete;
+ req->callback = usbmsc_wrcomplete;
req->priv = privreq;
req->flags = USBDEV_REQFLAGS_NULLPKT;
ret = EP_SUBMIT(priv->epbulkin, privreq->req);
if (ret < 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDFINISHSUBMIT), (uint16_t)-ret);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CMDFINISHSUBMIT), (uint16_t)-ret);
}
}
@@ -2322,9 +2322,9 @@ static int usbstrg_cmdfinishstate(FAR struct usbstrg_dev_s *priv)
if (priv->residue > 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDFINISHRESIDUE), (uint16_t)priv->residue);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CMDFINISHRESIDUE), (uint16_t)priv->residue);
-#ifdef CONFIG_USBSTRG_RACEWAR
+#ifdef CONFIG_USBMSC_RACEWAR
/* (See description of the workaround at the top of the file).
* First, wait for the transfer to complete, then stall the endpoint
*/
@@ -2344,7 +2344,7 @@ static int usbstrg_cmdfinishstate(FAR struct usbstrg_dev_s *priv)
/* Host-to-device: We have processed all we want of the host data. */
- case USBSTRG_FLAGS_DIRHOST2DEVICE:
+ case USBMSC_FLAGS_DIRHOST2DEVICE:
if (priv->residue > 0)
{
/* Did the host stop sending unexpectedly early? */
@@ -2352,82 +2352,82 @@ static int usbstrg_cmdfinishstate(FAR struct usbstrg_dev_s *priv)
flags = irqsave();
if (priv->shortpacket)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDFINISHSHORTPKT), (uint16_t)priv->residue);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CMDFINISHSHORTPKT), (uint16_t)priv->residue);
}
/* Unprocessed incoming data: STALL and cancel requests. */
else
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDFINSHSUBMIT), (uint16_t)priv->residue);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CMDFINSHSUBMIT), (uint16_t)priv->residue);
EP_STALL(priv->epbulkout);
}
- priv->theventset |= USBSTRG_EVENT_ABORTBULKOUT;
+ priv->theventset |= USBMSC_EVENT_ABORTBULKOUT;
irqrestore(flags);
}
break;
default:
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDFINSHDIR), priv->cbwdir);
- case USBSTRG_FLAGS_DIRNONE: /* Nothing to send */
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CMDFINSHDIR), priv->cbwdir);
+ case USBMSC_FLAGS_DIRNONE: /* Nothing to send */
break;
}
/* Return to the IDLE state */
- usbtrace(TRACE_CLASSSTATE(USBSTRG_CLASSSTATE_CMDFINISHCMDSTATUS), 0);
- priv->thstate = USBSTRG_STATE_CMDSTATUS;
+ usbtrace(TRACE_CLASSSTATE(USBMSC_CLASSSTATE_CMDFINISHCMDSTATUS), 0);
+ priv->thstate = USBMSC_STATE_CMDSTATUS;
return OK;
}
/****************************************************************************
- * Name: usbstrg_cmdstatusstate
+ * Name: usbmsc_cmdstatusstate
*
* Description:
- * Called from the worker thread in the USBSTRG_STATE_CMDSTATUS state.
+ * Called from the worker thread in the USBMSC_STATE_CMDSTATUS state.
* That state is after a CBW has been fully processed. This function sends
* the concluding CSW.
*
* Returned value:
* If no write request is available or certain other errors occur, this
- * function returns a negated errno and stays in the USBSTRG_STATE_CMDSTATUS
+ * function returns a negated errno and stays in the USBMSC_STATE_CMDSTATUS
* state. Otherwise, when the SCSI statis is successfully returned, this
- * function sets priv->thstate to USBSTRG_STATE_IDLE and returns OK.
+ * function sets priv->thstate to USBMSC_STATE_IDLE and returns OK.
*
****************************************************************************/
-static int usbstrg_cmdstatusstate(FAR struct usbstrg_dev_s *priv)
+static int usbmsc_cmdstatusstate(FAR struct usbmsc_dev_s *priv)
{
- FAR struct usbstrg_lun_s *lun = priv->lun;
- FAR struct usbstrg_req_s *privreq;
+ FAR struct usbmsc_lun_s *lun = priv->lun;
+ FAR struct usbmsc_req_s *privreq;
FAR struct usbdev_req_s *req;
- FAR struct usbstrg_csw_s *csw;
+ FAR struct usbmsc_csw_s *csw;
irqstate_t flags;
uint32_t sd;
- uint8_t status = USBSTRG_CSWSTATUS_PASS;
+ uint8_t status = USBMSC_CSWSTATUS_PASS;
int ret;
/* Take a request from the wrreqlist */
flags = irqsave();
- privreq = (FAR struct usbstrg_req_s *)sq_remfirst(&priv->wrreqlist);
+ privreq = (FAR struct usbmsc_req_s *)sq_remfirst(&priv->wrreqlist);
irqrestore(flags);
/* If there no request structures available, then just return an error.
* This will cause us to remain in the CMDSTATUS status. When a request is
- * returned, the worker thread will be awakened in the USBSTRG_STATE_CMDSTATUS
+ * returned, the worker thread will be awakened in the USBMSC_STATE_CMDSTATUS
* and we will be called again.
*/
if (!privreq)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDSTATUSRDREQLISTEMPTY), 0);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_CMDSTATUSRDREQLISTEMPTY), 0);
return -ENOMEM;
}
req = privreq->req;
- csw = (struct usbstrg_csw_s*)req->buf;
+ csw = (struct usbmsc_csw_s*)req->buf;
/* Extract the sense data from the LUN structure */
@@ -2444,14 +2444,14 @@ static int usbstrg_cmdstatusstate(FAR struct usbstrg_dev_s *priv)
if (priv->phaseerror)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_SNDPHERROR), 0);
- status = USBSTRG_CSWSTATUS_PHASEERROR;
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_SNDPHERROR), 0);
+ status = USBMSC_CSWSTATUS_PHASEERROR;
sd = SCSI_KCQIR_INVALIDCOMMAND;
}
else if (sd != SCSI_KCQ_NOSENSE)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_SNDCSWFAIL), 0);
- status = USBSTRG_CSWSTATUS_FAIL;
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_SNDCSWFAIL), 0);
+ status = USBMSC_CSWSTATUS_FAIL;
}
/* Format and submit the CSW */
@@ -2460,21 +2460,21 @@ static int usbstrg_cmdstatusstate(FAR struct usbstrg_dev_s *priv)
csw->signature[1] = 'S';
csw->signature[2] = 'B';
csw->signature[3] = 'S';
- usbstrg_putle32(csw->tag, priv->cbwtag);
- usbstrg_putle32(csw->residue, priv->residue);
+ usbmsc_putle32(csw->tag, priv->cbwtag);
+ usbmsc_putle32(csw->residue, priv->residue);
csw->status = status;
- usbstrg_dumpdata("SCSCI CSW", (uint8_t*)csw, USBSTRG_CSW_SIZEOF);
+ usbmsc_dumpdata("SCSCI CSW", (uint8_t*)csw, USBMSC_CSW_SIZEOF);
- req->len = USBSTRG_CSW_SIZEOF;
- req->callback = usbstrg_wrcomplete;
+ req->len = USBMSC_CSW_SIZEOF;
+ req->callback = usbmsc_wrcomplete;
req->priv = privreq;
req->flags = USBDEV_REQFLAGS_NULLPKT;
ret = EP_SUBMIT(priv->epbulkin, req);
if (ret < 0)
{
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_SNDSTATUSSUBMIT), (uint16_t)-ret);
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_SNDSTATUSSUBMIT), (uint16_t)-ret);
flags = irqsave();
(void)sq_addlast((sq_entry_t*)privreq, &priv->wrreqlist);
irqrestore(flags);
@@ -2482,8 +2482,8 @@ static int usbstrg_cmdstatusstate(FAR struct usbstrg_dev_s *priv)
/* Return to the IDLE state */
- usbtrace(TRACE_CLASSSTATE(USBSTRG_CLASSSTATE_CMDSTATUSIDLE), 0);
- priv->thstate = USBSTRG_STATE_IDLE;
+ usbtrace(TRACE_CLASSSTATE(USBMSC_CLASSSTATE_CMDSTATUSIDLE), 0);
+ priv->thstate = USBMSC_STATE_IDLE;
return OK;
}
@@ -2492,7 +2492,7 @@ static int usbstrg_cmdstatusstate(FAR struct usbstrg_dev_s *priv)
****************************************************************************/
/****************************************************************************
- * Name: usbstrg_workerthread
+ * Name: usbmsc_workerthread
*
* Description:
* This is the main function of the USB storage worker thread. It loops
@@ -2500,9 +2500,9 @@ static int usbstrg_cmdstatusstate(FAR struct usbstrg_dev_s *priv)
*
****************************************************************************/
-void *usbstrg_workerthread(void *arg)
+void *usbmsc_workerthread(void *arg)
{
- struct usbstrg_dev_s *priv = (struct usbstrg_dev_s *)arg;
+ struct usbmsc_dev_s *priv = (struct usbmsc_dev_s *)arg;
irqstate_t flags;
uint16_t eventset;
int ret;
@@ -2512,23 +2512,23 @@ void *usbstrg_workerthread(void *arg)
*/
pthread_mutex_lock(&priv->mutex);
- priv->thstate = USBSTRG_STATE_STARTED;
- while ((priv->theventset & USBSTRG_EVENT_READY) != 0 &&
- (priv->theventset & USBSTRG_EVENT_TERMINATEREQUEST) != 0)
+ priv->thstate = USBMSC_STATE_STARTED;
+ while ((priv->theventset & USBMSC_EVENT_READY) != 0 &&
+ (priv->theventset & USBMSC_EVENT_TERMINATEREQUEST) != 0)
{
pthread_cond_wait(&priv->cond, &priv->mutex);
}
/* Transition to the INITIALIZED/IDLE state */
- priv->thstate = USBSTRG_STATE_IDLE;
+ priv->thstate = USBMSC_STATE_IDLE;
eventset = priv->theventset;
- priv->theventset = USBSTRG_EVENT_NOEVENTS;
+ priv->theventset = USBMSC_EVENT_NOEVENTS;
pthread_mutex_unlock(&priv->mutex);
/* Then loop until we are asked to terminate */
- while ((eventset & USBSTRG_EVENT_TERMINATEREQUEST) == 0)
+ while ((eventset & USBMSC_EVENT_TERMINATEREQUEST) == 0)
{
/* Wait for some interesting event. Note that we must both take the
* lock (to eliminate race conditions with other threads) and disable
@@ -2537,7 +2537,7 @@ void *usbstrg_workerthread(void *arg)
pthread_mutex_lock(&priv->mutex);
flags = irqsave();
- if (priv->theventset == USBSTRG_EVENT_NOEVENTS)
+ if (priv->theventset == USBMSC_EVENT_NOEVENTS)
{
pthread_cond_wait(&priv->cond, &priv->mutex);
}
@@ -2548,25 +2548,25 @@ void *usbstrg_workerthread(void *arg)
*/
eventset = priv->theventset;
- priv->theventset = USBSTRG_EVENT_NOEVENTS;
+ priv->theventset = USBMSC_EVENT_NOEVENTS;
pthread_mutex_unlock(&priv->mutex);
/* Were we awakened by some event that requires immediate action?
*
- * - The USBSTRG_EVENT_DISCONNECT is signalled from the disconnect method
+ * - The USBMSC_EVENT_DISCONNECT is signalled from the disconnect method
* after all transfers have been stopped, when the host is disconnected.
*
- * - The CUSBSTRG_EVENT_RESET is signalled when the bulk-storage-specific
- * USBSTRG_REQ_MSRESET EP0 setup received. We must stop the current
+ * - The CUSBMSC_EVENT_RESET is signalled when the bulk-storage-specific
+ * USBMSC_REQ_MSRESET EP0 setup received. We must stop the current
* operation and reinialize state.
*
- * - The USBSTRG_EVENT_CFGCHANGE is signaled when the EP0 setup logic
+ * - The USBMSC_EVENT_CFGCHANGE is signaled when the EP0 setup logic
* receives a valid USB_REQ_SETCONFIGURATION request
*
- * - The USBSTRG_EVENT_IFCHANGE is signaled when the EP0 setup logic
+ * - The USBMSC_EVENT_IFCHANGE is signaled when the EP0 setup logic
* receives a valid USB_REQ_SETINTERFACE request
*
- * - The USBSTRG_EVENT_ABORTBULKOUT event is signalled by the CMDFINISH
+ * - The USBMSC_EVENT_ABORTBULKOUT event is signalled by the CMDFINISH
* logic when there is a residue after processing a host-to-device
* transfer. We need to discard all incoming request.
*
@@ -2574,33 +2574,33 @@ void *usbstrg_workerthread(void *arg)
* drive the state machine.
*/
- if ((eventset & (USBSTRG_EVENT_DISCONNECT|USBSTRG_EVENT_RESET|USBSTRG_EVENT_CFGCHANGE|
- USBSTRG_EVENT_IFCHANGE|USBSTRG_EVENT_ABORTBULKOUT)) != 0)
+ if ((eventset & (USBMSC_EVENT_DISCONNECT|USBMSC_EVENT_RESET|USBMSC_EVENT_CFGCHANGE|
+ USBMSC_EVENT_IFCHANGE|USBMSC_EVENT_ABORTBULKOUT)) != 0)
{
/* These events require that the current configuration be reset */
- if ((eventset & USBSTRG_EVENT_IFCHANGE) != 0)
+ if ((eventset & USBMSC_EVENT_IFCHANGE) != 0)
{
- usbstrg_resetconfig(priv);
+ usbmsc_resetconfig(priv);
}
/* These events require that a new configuration be established */
- if ((eventset & (USBSTRG_EVENT_CFGCHANGE|USBSTRG_EVENT_IFCHANGE)) != 0)
+ if ((eventset & (USBMSC_EVENT_CFGCHANGE|USBMSC_EVENT_IFCHANGE)) != 0)
{
- usbstrg_setconfig(priv, priv->thvalue);
+ usbmsc_setconfig(priv, priv->thvalue);
}
/* These events required that we send a deferred EP0 setup response */
- if ((eventset & (USBSTRG_EVENT_RESET|USBSTRG_EVENT_CFGCHANGE|USBSTRG_EVENT_IFCHANGE)) != 0)
+ if ((eventset & (USBMSC_EVENT_RESET|USBMSC_EVENT_CFGCHANGE|USBMSC_EVENT_IFCHANGE)) != 0)
{
- usbstrg_deferredresponse(priv, false);
+ usbmsc_deferredresponse(priv, false);
}
/* For all of these events... terminate any transactions in progress */
- priv->thstate = USBSTRG_STATE_IDLE;
+ priv->thstate = USBMSC_STATE_IDLE;
}
irqrestore(flags);
@@ -2620,36 +2620,36 @@ void *usbstrg_workerthread(void *arg)
{
switch (priv->thstate)
{
- case USBSTRG_STATE_IDLE: /* Started and waiting for commands */
- ret = usbstrg_idlestate(priv);
+ case USBMSC_STATE_IDLE: /* Started and waiting for commands */
+ ret = usbmsc_idlestate(priv);
break;
- case USBSTRG_STATE_CMDPARSE: /* Parsing the received a command */
- ret = usbstrg_cmdparsestate(priv);
+ case USBMSC_STATE_CMDPARSE: /* Parsing the received a command */
+ ret = usbmsc_cmdparsestate(priv);
break;
- case USBSTRG_STATE_CMDREAD: /* Continuing to process a SCSI read command */
- ret = usbstrg_cmdreadstate(priv);
+ case USBMSC_STATE_CMDREAD: /* Continuing to process a SCSI read command */
+ ret = usbmsc_cmdreadstate(priv);
break;
- case USBSTRG_STATE_CMDWRITE: /* Continuing to process a SCSI write command */
- ret = usbstrg_cmdwritestate(priv);
+ case USBMSC_STATE_CMDWRITE: /* Continuing to process a SCSI write command */
+ ret = usbmsc_cmdwritestate(priv);
break;
- case USBSTRG_STATE_CMDFINISH: /* Finish command processing */
- ret = usbstrg_cmdfinishstate(priv);
+ case USBMSC_STATE_CMDFINISH: /* Finish command processing */
+ ret = usbmsc_cmdfinishstate(priv);
break;
- case USBSTRG_STATE_CMDSTATUS: /* Processing the status phase of a command */
- ret = usbstrg_cmdstatusstate(priv);
+ case USBMSC_STATE_CMDSTATUS: /* Processing the status phase of a command */
+ ret = usbmsc_cmdstatusstate(priv);
break;
- case USBSTRG_STATE_NOTSTARTED: /* Thread has not yet been started */
- case USBSTRG_STATE_STARTED: /* Started, but is not yet initialized */
- case USBSTRG_STATE_TERMINATED: /* Thread has exitted */
+ case USBMSC_STATE_NOTSTARTED: /* Thread has not yet been started */
+ case USBMSC_STATE_STARTED: /* Started, but is not yet initialized */
+ case USBMSC_STATE_TERMINATED: /* Thread has exitted */
default:
- usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_INVALIDSTATE), priv->thstate);
- priv->thstate = USBSTRG_STATE_IDLE;
+ usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_INVALIDSTATE), priv->thstate);
+ priv->thstate = USBMSC_STATE_IDLE;
ret = OK;
break;
}
@@ -2659,6 +2659,6 @@ void *usbstrg_workerthread(void *arg)
/* Transition to the TERMINATED state and exit */
- priv->thstate = USBSTRG_STATE_TERMINATED;
+ priv->thstate = USBMSC_STATE_TERMINATED;
return NULL;
}
diff --git a/nuttx/drivers/usbhost/usbhost_storage.c b/nuttx/drivers/usbhost/usbhost_storage.c
index 8f5864b6d..82409eac3 100644
--- a/nuttx/drivers/usbhost/usbhost_storage.c
+++ b/nuttx/drivers/usbhost/usbhost_storage.c
@@ -161,8 +161,8 @@ static inline void usbhost_mkdevname(FAR struct usbhost_state_s *priv, char *dev
/* CBW/CSW debug helpers */
#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_VERBOSE)
-static void usbhost_dumpcbw(FAR struct usbstrg_cbw_s *cbw);
-static void usbhost_dumpcsw(FAR struct usbstrg_csw_s *csw);
+static void usbhost_dumpcbw(FAR struct usbmsc_cbw_s *cbw);
+static void usbhost_dumpcsw(FAR struct usbmsc_csw_s *csw);
#else
# define usbhost_dumpcbw(cbw);
# define usbhost_dumpcsw(csw);
@@ -170,16 +170,16 @@ static void usbhost_dumpcsw(FAR struct usbstrg_csw_s *csw);
/* CBW helpers */
-static inline void usbhost_requestsensecbw(FAR struct usbstrg_cbw_s *cbw);
-static inline void usbhost_testunitreadycbw(FAR struct usbstrg_cbw_s *cbw);
-static inline void usbhost_readcapacitycbw(FAR struct usbstrg_cbw_s *cbw);
-static inline void usbhost_inquirycbw (FAR struct usbstrg_cbw_s *cbw);
+static inline void usbhost_requestsensecbw(FAR struct usbmsc_cbw_s *cbw);
+static inline void usbhost_testunitreadycbw(FAR struct usbmsc_cbw_s *cbw);
+static inline void usbhost_readcapacitycbw(FAR struct usbmsc_cbw_s *cbw);
+static inline void usbhost_inquirycbw (FAR struct usbmsc_cbw_s *cbw);
static inline void usbhost_readcbw (size_t startsector, uint16_t blocksize,
unsigned int nsectors,
- FAR struct usbstrg_cbw_s *cbw);
+ FAR struct usbmsc_cbw_s *cbw);
static inline void usbhost_writecbw(size_t startsector, uint16_t blocksize,
unsigned int nsectors,
- FAR struct usbstrg_cbw_s *cbw);
+ FAR struct usbmsc_cbw_s *cbw);
/* Command helpers */
static inline int usbhost_maxlunreq(FAR struct usbhost_state_s *priv);
@@ -214,7 +214,7 @@ static void usbhost_putbe32(uint8_t *dest, uint32_t val);
static inline int usbhost_talloc(FAR struct usbhost_state_s *priv);
static inline int usbhost_tfree(FAR struct usbhost_state_s *priv);
-static FAR struct usbstrg_cbw_s *usbhost_cbwalloc(FAR struct usbhost_state_s *priv);
+static FAR struct usbmsc_cbw_s *usbhost_cbwalloc(FAR struct usbhost_state_s *priv);
/* struct usbhost_registry_s methods */
@@ -256,8 +256,8 @@ static int usbhost_ioctl(FAR struct inode *inode, int cmd,
static const const struct usbhost_id_s g_id =
{
USB_CLASS_MASS_STORAGE, /* base */
- USBSTRG_SUBCLASS_SCSI, /* subclass */
- USBSTRG_PROTO_BULKONLY, /* proto */
+ USBMSC_SUBCLASS_SCSI, /* subclass */
+ USBMSC_PROTO_BULKONLY, /* proto */
0, /* vid */
0 /* pid */
};
@@ -494,7 +494,7 @@ static inline void usbhost_mkdevname(FAR struct usbhost_state_s *priv, char *dev
****************************************************************************/
#if defined(CONFIG_DEBUG_USB) && defined(CONFIG_DEBUG_VERBOSE)
-static void usbhost_dumpcbw(FAR struct usbstrg_cbw_s *cbw)
+static void usbhost_dumpcbw(FAR struct usbmsc_cbw_s *cbw)
{
int i;
@@ -515,7 +515,7 @@ static void usbhost_dumpcbw(FAR struct usbstrg_cbw_s *cbw)
}
}
-static void usbhost_dumpcsw(FAR struct usbstrg_csw_s *csw)
+static void usbhost_dumpcsw(FAR struct usbmsc_csw_s *csw)
{
uvdbg("CSW:\n");
uvdbg(" signature: %08x\n", usbhost_getle32(csw->signature));
@@ -539,14 +539,14 @@ static void usbhost_dumpcsw(FAR struct usbstrg_csw_s *csw)
*
****************************************************************************/
-static inline void usbhost_requestsensecbw(FAR struct usbstrg_cbw_s *cbw)
+static inline void usbhost_requestsensecbw(FAR struct usbmsc_cbw_s *cbw)
{
FAR struct scsicmd_requestsense_s *reqsense;
/* Format the CBW */
usbhost_putle32(cbw->datlen, SCSIRESP_FIXEDSENSEDATA_SIZEOF);
- cbw->flags = USBSTRG_CBWFLAG_IN;
+ cbw->flags = USBMSC_CBWFLAG_IN;
cbw->cdblen = SCSICMD_REQUESTSENSE_SIZEOF;
/* Format the CDB */
@@ -558,7 +558,7 @@ static inline void usbhost_requestsensecbw(FAR struct usbstrg_cbw_s *cbw)
usbhost_dumpcbw(cbw);
}
-static inline void usbhost_testunitreadycbw(FAR struct usbstrg_cbw_s *cbw)
+static inline void usbhost_testunitreadycbw(FAR struct usbmsc_cbw_s *cbw)
{
/* Format the CBW */
@@ -571,14 +571,14 @@ static inline void usbhost_testunitreadycbw(FAR struct usbstrg_cbw_s *cbw)
usbhost_dumpcbw(cbw);
}
-static inline void usbhost_readcapacitycbw(FAR struct usbstrg_cbw_s *cbw)
+static inline void usbhost_readcapacitycbw(FAR struct usbmsc_cbw_s *cbw)
{
FAR struct scsicmd_readcapacity10_s *rcap10;
/* Format the CBW */
usbhost_putle32(cbw->datlen, SCSIRESP_READCAPACITY10_SIZEOF);
- cbw->flags = USBSTRG_CBWFLAG_IN;
+ cbw->flags = USBMSC_CBWFLAG_IN;
cbw->cdblen = SCSICMD_READCAPACITY10_SIZEOF;
/* Format the CDB */
@@ -589,14 +589,14 @@ static inline void usbhost_readcapacitycbw(FAR struct usbstrg_cbw_s *cbw)
usbhost_dumpcbw(cbw);
}
-static inline void usbhost_inquirycbw (FAR struct usbstrg_cbw_s *cbw)
+static inline void usbhost_inquirycbw (FAR struct usbmsc_cbw_s *cbw)
{
FAR struct scscicmd_inquiry_s *inq;
/* Format the CBW */
usbhost_putle32(cbw->datlen, SCSIRESP_INQUIRY_SIZEOF);
- cbw->flags = USBSTRG_CBWFLAG_IN;
+ cbw->flags = USBMSC_CBWFLAG_IN;
cbw->cdblen = SCSICMD_INQUIRY_SIZEOF;
/* Format the CDB */
@@ -610,14 +610,14 @@ static inline void usbhost_inquirycbw (FAR struct usbstrg_cbw_s *cbw)
static inline void
usbhost_readcbw (size_t startsector, uint16_t blocksize,
- unsigned int nsectors, FAR struct usbstrg_cbw_s *cbw)
+ unsigned int nsectors, FAR struct usbmsc_cbw_s *cbw)
{
FAR struct scsicmd_read10_s *rd10;
/* Format the CBW */
usbhost_putle32(cbw->datlen, blocksize * nsectors);
- cbw->flags = USBSTRG_CBWFLAG_IN;
+ cbw->flags = USBMSC_CBWFLAG_IN;
cbw->cdblen = SCSICMD_READ10_SIZEOF;
/* Format the CDB */
@@ -632,7 +632,7 @@ usbhost_readcbw (size_t startsector, uint16_t blocksize,
static inline void
usbhost_writecbw(size_t startsector, uint16_t blocksize,
- unsigned int nsectors, FAR struct usbstrg_cbw_s *cbw)
+ unsigned int nsectors, FAR struct usbmsc_cbw_s *cbw)
{
FAR struct scsicmd_write10_s *wr10;
@@ -679,7 +679,7 @@ static inline int usbhost_maxlunreq(FAR struct usbhost_state_s *priv)
uvdbg("Request maximum logical unit number\n");
memset(req, 0, sizeof(struct usb_ctrlreq_s));
req->type = USB_DIR_IN|USB_REQ_TYPE_CLASS|USB_REQ_RECIPIENT_INTERFACE;
- req->req = USBSTRG_REQ_GETMAXLUN;
+ req->req = USBMSC_REQ_GETMAXLUN;
usbhost_putle16(req->len, 1);
ret = DRVR_CTRLIN(priv->drvr, req, priv->tbuffer);
@@ -696,7 +696,7 @@ static inline int usbhost_maxlunreq(FAR struct usbhost_state_s *priv)
static inline int usbhost_testunitready(FAR struct usbhost_state_s *priv)
{
- FAR struct usbstrg_cbw_s *cbw;
+ FAR struct usbmsc_cbw_s *cbw;
int result;
/* Initialize a CBW (re-using the allocated transfer buffer) */
@@ -712,16 +712,16 @@ static inline int usbhost_testunitready(FAR struct usbhost_state_s *priv)
usbhost_testunitreadycbw(cbw);
result = DRVR_TRANSFER(priv->drvr, priv->bulkout,
- (uint8_t*)cbw, USBSTRG_CBW_SIZEOF);
+ (uint8_t*)cbw, USBMSC_CBW_SIZEOF);
if (result == OK)
{
/* Receive the CSW */
result = DRVR_TRANSFER(priv->drvr, priv->bulkin,
- priv->tbuffer, USBSTRG_CSW_SIZEOF);
+ priv->tbuffer, USBMSC_CSW_SIZEOF);
if (result == OK)
{
- usbhost_dumpcsw((FAR struct usbstrg_csw_s *)priv->tbuffer);
+ usbhost_dumpcsw((FAR struct usbmsc_csw_s *)priv->tbuffer);
}
}
return result;
@@ -729,7 +729,7 @@ static inline int usbhost_testunitready(FAR struct usbhost_state_s *priv)
static inline int usbhost_requestsense(FAR struct usbhost_state_s *priv)
{
- FAR struct usbstrg_cbw_s *cbw;
+ FAR struct usbmsc_cbw_s *cbw;
int result;
/* Initialize a CBW (re-using the allocated transfer buffer) */
@@ -745,7 +745,7 @@ static inline int usbhost_requestsense(FAR struct usbhost_state_s *priv)
usbhost_requestsensecbw(cbw);
result = DRVR_TRANSFER(priv->drvr, priv->bulkout,
- (uint8_t*)cbw, USBSTRG_CBW_SIZEOF);
+ (uint8_t*)cbw, USBMSC_CBW_SIZEOF);
if (result == OK)
{
/* Receive the sense data response */
@@ -757,10 +757,10 @@ static inline int usbhost_requestsense(FAR struct usbhost_state_s *priv)
/* Receive the CSW */
result = DRVR_TRANSFER(priv->drvr, priv->bulkin,
- priv->tbuffer, USBSTRG_CSW_SIZEOF);
+ priv->tbuffer, USBMSC_CSW_SIZEOF);
if (result == OK)
{
- usbhost_dumpcsw((FAR struct usbstrg_csw_s *)priv->tbuffer);
+ usbhost_dumpcsw((FAR struct usbmsc_csw_s *)priv->tbuffer);
}
}
}
@@ -770,7 +770,7 @@ static inline int usbhost_requestsense(FAR struct usbhost_state_s *priv)
static inline int usbhost_readcapacity(FAR struct usbhost_state_s *priv)
{
- FAR struct usbstrg_cbw_s *cbw;
+ FAR struct usbmsc_cbw_s *cbw;
FAR struct scsiresp_readcapacity10_s *resp;
int result;
@@ -787,7 +787,7 @@ static inline int usbhost_readcapacity(FAR struct usbhost_state_s *priv)
usbhost_readcapacitycbw(cbw);
result = DRVR_TRANSFER(priv->drvr, priv->bulkout,
- (uint8_t*)cbw, USBSTRG_CBW_SIZEOF);
+ (uint8_t*)cbw, USBMSC_CBW_SIZEOF);
if (result == OK)
{
/* Receive the read capacity CBW IN response */
@@ -805,10 +805,10 @@ static inline int usbhost_readcapacity(FAR struct usbhost_state_s *priv)
/* Receive the CSW */
result = DRVR_TRANSFER(priv->drvr, priv->bulkin,
- priv->tbuffer, USBSTRG_CSW_SIZEOF);
+ priv->tbuffer, USBMSC_CSW_SIZEOF);
if (result == OK)
{
- usbhost_dumpcsw((FAR struct usbstrg_csw_s *)priv->tbuffer);
+ usbhost_dumpcsw((FAR struct usbmsc_csw_s *)priv->tbuffer);
}
}
}
@@ -818,7 +818,7 @@ static inline int usbhost_readcapacity(FAR struct usbhost_state_s *priv)
static inline int usbhost_inquiry(FAR struct usbhost_state_s *priv)
{
- FAR struct usbstrg_cbw_s *cbw;
+ FAR struct usbmsc_cbw_s *cbw;
FAR struct scsiresp_inquiry_s *resp;
int result;
@@ -835,7 +835,7 @@ static inline int usbhost_inquiry(FAR struct usbhost_state_s *priv)
usbhost_inquirycbw(cbw);
result = DRVR_TRANSFER(priv->drvr, priv->bulkout,
- (uint8_t*)cbw, USBSTRG_CBW_SIZEOF);
+ (uint8_t*)cbw, USBMSC_CBW_SIZEOF);
if (result == OK)
{
/* Receive the CBW IN response */
@@ -851,10 +851,10 @@ static inline int usbhost_inquiry(FAR struct usbhost_state_s *priv)
/* Receive the CSW */
result = DRVR_TRANSFER(priv->drvr, priv->bulkin,
- priv->tbuffer, USBSTRG_CSW_SIZEOF);
+ priv->tbuffer, USBMSC_CSW_SIZEOF);
if (result == OK)
{
- usbhost_dumpcsw((FAR struct usbstrg_csw_s *)priv->tbuffer);
+ usbhost_dumpcsw((FAR struct usbmsc_csw_s *)priv->tbuffer);
}
}
}
@@ -1168,7 +1168,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv,
static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv)
{
- FAR struct usbstrg_csw_s *csw;
+ FAR struct usbmsc_csw_s *csw;
unsigned int retries;
int ret = OK;
@@ -1208,7 +1208,7 @@ static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv)
{
/* Is the unit is ready */
- csw = (FAR struct usbstrg_csw_s *)priv->tbuffer;
+ csw = (FAR struct usbmsc_csw_s *)priv->tbuffer;
if (csw->status == 0)
{
/* Yes... break out of the loop */
@@ -1244,7 +1244,7 @@ static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv)
{
/* Check the CSW for errors */
- csw = (FAR struct usbstrg_csw_s *)priv->tbuffer;
+ csw = (FAR struct usbmsc_csw_s *)priv->tbuffer;
if (csw->status != 0)
{
udbg("ERROR: CSW status error: %d\n", csw->status);
@@ -1265,7 +1265,7 @@ static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv)
{
/* Check the CSW for errors */
- csw = (FAR struct usbstrg_csw_s *)priv->tbuffer;
+ csw = (FAR struct usbmsc_csw_s *)priv->tbuffer;
if (csw->status != 0)
{
udbg("ERROR: CSW status error: %d\n", csw->status);
@@ -1563,17 +1563,17 @@ static inline int usbhost_tfree(FAR struct usbhost_state_s *priv)
*
****************************************************************************/
-static FAR struct usbstrg_cbw_s *usbhost_cbwalloc(FAR struct usbhost_state_s *priv)
+static FAR struct usbmsc_cbw_s *usbhost_cbwalloc(FAR struct usbhost_state_s *priv)
{
- FAR struct usbstrg_cbw_s *cbw = NULL;
+ FAR struct usbmsc_cbw_s *cbw = NULL;
- DEBUGASSERT(priv->tbuffer && priv->tbuflen >= sizeof(struct usbstrg_cbw_s))
+ DEBUGASSERT(priv->tbuffer && priv->tbuflen >= sizeof(struct usbmsc_cbw_s))
/* Intialize the CBW sructure */
- cbw = (FAR struct usbstrg_cbw_s *)priv->tbuffer;
- memset(cbw, 0, sizeof(struct usbstrg_cbw_s));
- usbhost_putle32(cbw->signature, USBSTRG_CBW_SIGNATURE);
+ cbw = (FAR struct usbmsc_cbw_s *)priv->tbuffer;
+ memset(cbw, 0, sizeof(struct usbmsc_cbw_s));
+ usbhost_putle32(cbw->signature, USBMSC_CBW_SIGNATURE);
return cbw;
}
@@ -1936,7 +1936,7 @@ static ssize_t usbhost_read(FAR struct inode *inode, unsigned char *buffer,
}
else if (nsectors > 0)
{
- FAR struct usbstrg_cbw_s *cbw;
+ FAR struct usbmsc_cbw_s *cbw;
usbhost_takesem(&priv->exclsem);
@@ -1957,7 +1957,7 @@ static ssize_t usbhost_read(FAR struct inode *inode, unsigned char *buffer,
usbhost_readcbw(startsector, priv->blocksize, nsectors, cbw);
result = DRVR_TRANSFER(priv->drvr, priv->bulkout,
- (uint8_t*)cbw, USBSTRG_CBW_SIZEOF);
+ (uint8_t*)cbw, USBMSC_CBW_SIZEOF);
if (result == OK)
{
/* Receive the user data */
@@ -1969,14 +1969,14 @@ static ssize_t usbhost_read(FAR struct inode *inode, unsigned char *buffer,
/* Receive the CSW */
result = DRVR_TRANSFER(priv->drvr, priv->bulkin,
- priv->tbuffer, USBSTRG_CSW_SIZEOF);
+ priv->tbuffer, USBMSC_CSW_SIZEOF);
if (result == OK)
{
- FAR struct usbstrg_csw_s *csw;
+ FAR struct usbmsc_csw_s *csw;
/* Check the CSW status */
- csw = (FAR struct usbstrg_csw_s *)priv->tbuffer;
+ csw = (FAR struct usbmsc_csw_s *)priv->tbuffer;
if (csw->status == 0)
{
ret = nsectors;
@@ -2028,7 +2028,7 @@ static ssize_t usbhost_write(FAR struct inode *inode, const unsigned char *buffe
}
else
{
- FAR struct usbstrg_cbw_s *cbw;
+ FAR struct usbmsc_cbw_s *cbw;
usbhost_takesem(&priv->exclsem);
@@ -2049,7 +2049,7 @@ static ssize_t usbhost_write(FAR struct inode *inode, const unsigned char *buffe
usbhost_writecbw(startsector, priv->blocksize, nsectors, cbw);
result = DRVR_TRANSFER(priv->drvr, priv->bulkout,
- (uint8_t*)cbw, USBSTRG_CBW_SIZEOF);
+ (uint8_t*)cbw, USBMSC_CBW_SIZEOF);
if (result == OK)
{
/* Send the user data */
@@ -2061,14 +2061,14 @@ static ssize_t usbhost_write(FAR struct inode *inode, const unsigned char *buffe
/* Receive the CSW */
result = DRVR_TRANSFER(priv->drvr, priv->bulkin,
- priv->tbuffer, USBSTRG_CSW_SIZEOF);
+ priv->tbuffer, USBMSC_CSW_SIZEOF);
if (result == OK)
{
- FAR struct usbstrg_csw_s *csw;
+ FAR struct usbmsc_csw_s *csw;
/* Check the CSW status */
- csw = (FAR struct usbstrg_csw_s *)priv->tbuffer;
+ csw = (FAR struct usbmsc_csw_s *)priv->tbuffer;
if (csw->status == 0)
{
ret = nsectors;
diff --git a/nuttx/include/nuttx/usb/storage.h b/nuttx/include/nuttx/usb/storage.h
index 150149c83..9b9566d40 100644
--- a/nuttx/include/nuttx/usb/storage.h
+++ b/nuttx/include/nuttx/usb/storage.h
@@ -56,42 +56,42 @@
/* Mass storage requests */
-#define USBSTRG_TYPE_SETUPIN (USB_DIR_IN|USB_REQ_TYPE_CLASS|USB_REQ_RECIPIENT_INTERFACE)
-#define USBSTRG_TYPE_SETUPOUT (USB_DIR_OUT|USB_REQ_TYPE_CLASS|USB_REQ_RECIPIENT_INTERFACE)
+#define USBMSC_TYPE_SETUPIN (USB_DIR_IN|USB_REQ_TYPE_CLASS|USB_REQ_RECIPIENT_INTERFACE)
+#define USBMSC_TYPE_SETUPOUT (USB_DIR_OUT|USB_REQ_TYPE_CLASS|USB_REQ_RECIPIENT_INTERFACE)
-#define USBSTRG_REQ_MSRESET (0xff) /* Reset mass storage device and interface */
-#define USBSTRG_REQ_GETMAXLUN (0xfe) /* Return number LUNs supported */
+#define USBMSC_REQ_MSRESET (0xff) /* Reset mass storage device and interface */
+#define USBMSC_REQ_GETMAXLUN (0xfe) /* Return number LUNs supported */
/* Mass storage subclass codes */
-#define USBSTRG_SUBCLASS_RBC (0x01) /* Reduced block commands (e.g., flash devices) */
-#define USBSTRG_SUBCLASS_SFF1 (0x02) /* SFF-8020i/MMC-2 (ATAPI) (e.g., C/DVD) */
-#define USBSTRG_SUBCLASS_QIC (0x03) /* QIC-157 (e.g., tape device) */
-#define USBSTRG_SUBCLASS_UFI (0x04) /* e.g. floppy device */
-#define USBSTRG_SUBCLASS_SFF2 (0x05) /* SFF-8070i (e.g. floppy disk) */
-#define USBSTRG_SUBCLASS_SCSI (0x06) /* SCSI transparent */
+#define USBMSC_SUBCLASS_RBC (0x01) /* Reduced block commands (e.g., flash devices) */
+#define USBMSC_SUBCLASS_SFF1 (0x02) /* SFF-8020i/MMC-2 (ATAPI) (e.g., C/DVD) */
+#define USBMSC_SUBCLASS_QIC (0x03) /* QIC-157 (e.g., tape device) */
+#define USBMSC_SUBCLASS_UFI (0x04) /* e.g. floppy device */
+#define USBMSC_SUBCLASS_SFF2 (0x05) /* SFF-8070i (e.g. floppy disk) */
+#define USBMSC_SUBCLASS_SCSI (0x06) /* SCSI transparent */
/* Mass storage transport protocols */
-#define USBSTRG_PROTO_CBI0 (0x00) /* CBI transport with command completion interrupt */
-#define USBSTRG_PROTO_CBI1 (0x01) /* CBI transport without command completion interrupt */
-#define USBSTRG_PROTO_BULKONLY (0x50) /* Bulk only transport */
+#define USBMSC_PROTO_CBI0 (0x00) /* CBI transport with command completion interrupt */
+#define USBMSC_PROTO_CBI1 (0x01) /* CBI transport without command completion interrupt */
+#define USBMSC_PROTO_BULKONLY (0x50) /* Bulk only transport */
/* Common Block Wrapper (CBW) */
-#define USBSTRG_CBW_SIZEOF (31)
-#define USBSTRG_CBW_SIGNATURE (0x43425355) /* Little endian USBC */
-#define USBSTRG_CBWFLAG_IN (0x80) /* Bit 7=1: Direction = IN */
+#define USBMSC_CBW_SIZEOF (31)
+#define USBMSC_CBW_SIGNATURE (0x43425355) /* Little endian USBC */
+#define USBMSC_CBWFLAG_IN (0x80) /* Bit 7=1: Direction = IN */
-#define USBSTRG_MAXCDBLEN (16) /* Max length of SCSI Command Data Block */
+#define USBMSC_MAXCDBLEN (16) /* Max length of SCSI Command Data Block */
/* Command Status Wrapper (CSW) */
-#define USBSTRG_CSW_SIZEOF (13)
-#define USBSTRG_CSW_SIGNATURE (0x53425355) /* Little endian 'USBS' */
-#define USBSTRG_CSWSTATUS_PASS (0)
-#define USBSTRG_CSWSTATUS_FAIL (1)
-#define USBSTRG_CSWSTATUS_PHASEERROR (2)
+#define USBMSC_CSW_SIZEOF (13)
+#define USBMSC_CSW_SIGNATURE (0x53425355) /* Little endian 'USBS' */
+#define USBMSC_CSWSTATUS_PASS (0)
+#define USBMSC_CSWSTATUS_FAIL (1)
+#define USBMSC_CSWSTATUS_PHASEERROR (2)
/************************************************************************************
* Public Types
@@ -99,7 +99,7 @@
/* Command Block Wrapper (CBW) */
-struct usbstrg_cbw_s
+struct usbmsc_cbw_s
{
uint8_t signature[4]; /* 'USBC' = 0x43425355 */
uint8_t tag[4]; /* Depends on command id */
@@ -107,12 +107,12 @@ struct usbstrg_cbw_s
uint8_t flags; /* Bit 7: Direction=IN (other obsolete or reserved) */
uint8_t lun; /* LUN (normally 0) */
uint8_t cdblen; /* len of cdb[] */
- uint8_t cdb[USBSTRG_MAXCDBLEN]; /* Command Data Block */
+ uint8_t cdb[USBMSC_MAXCDBLEN]; /* Command Data Block */
};
/* Command Status Wrapper (CSW) */
-struct usbstrg_csw_s
+struct usbmsc_csw_s
{
uint8_t signature[4]; /* 'USBS' = 0x53425355 */
uint8_t tag[4]; /* Same tag as original command */
diff --git a/nuttx/include/nuttx/usb/usbdev.h b/nuttx/include/nuttx/usb/usbdev.h
index 8c4b3ff26..3f694a551 100644
--- a/nuttx/include/nuttx/usb/usbdev.h
+++ b/nuttx/include/nuttx/usb/usbdev.h
@@ -361,7 +361,7 @@ EXTERN int usbdev_serialinitialize(int minor);
* Description:
* If the mass storage class driver is part of composite device, then
* its instantiation and configuration is a multi-step, board-specific,
- * process (See comments for usbstrg_configure below). In this case,
+ * process (See comments for usbmsc_configure below). In this case,
* board-specific logic must provide board_mscclassobject().
*
* board_mscclassobject() is called from the composite driver. It must
@@ -378,21 +378,21 @@ EXTERN int usbdev_serialinitialize(int minor);
*
****************************************************************************/
-#if defined(CONFIG_USBDEV_COMPOSITE) && defined(CONFIG_USBSTRG_COMPOSITE)
+#if defined(CONFIG_USBDEV_COMPOSITE) && defined(CONFIG_USBMSC_COMPOSITE)
EXTERN int board_mscclassobject(FAR struct usbdevclass_driver_s **classdev);
#endif
/****************************************************************************
- * Name: usbstrg_configure
+ * Name: usbmsc_configure
*
* Description:
* One-time initialization of the USB storage driver. The initialization
* sequence is as follows:
*
- * 1. Call usbstrg_configure to perform one-time initialization specifying
+ * 1. Call usbmsc_configure to perform one-time initialization specifying
* the number of luns.
- * 2. Call usbstrg_bindlun to configure each supported LUN
- * 3. Call usbstrg_exportluns when all LUNs are configured
+ * 2. Call usbmsc_bindlun to configure each supported LUN
+ * 3. Call usbmsc_exportluns when all LUNs are configured
*
* Input Parameters:
* nluns - the number of LUNs that will be registered
@@ -403,16 +403,16 @@ EXTERN int board_mscclassobject(FAR struct usbdevclass_driver_s **classdev);
*
****************************************************************************/
-EXTERN int usbstrg_configure(unsigned int nluns, void **handle);
+EXTERN int usbmsc_configure(unsigned int nluns, void **handle);
/****************************************************************************
- * Name: usbstrg_bindlun
+ * Name: usbmsc_bindlun
*
* Description:
* Bind the block driver specified by drvrpath to a USB storage LUN.
*
* Input Parameters:
- * handle - The handle returned by a previous call to usbstrg_configure().
+ * handle - The handle returned by a previous call to usbmsc_configure().
* drvrpath - the full path to the block driver
* startsector - A sector offset into the block driver to the start of the
* partition on drvrpath (0 if no partitions)
@@ -425,18 +425,18 @@ EXTERN int usbstrg_configure(unsigned int nluns, void **handle);
*
****************************************************************************/
-EXTERN int usbstrg_bindlun(FAR void *handle, FAR const char *drvrpath,
+EXTERN int usbmsc_bindlun(FAR void *handle, FAR const char *drvrpath,
unsigned int lunno, off_t startsector, size_t nsectors,
bool readonly);
/****************************************************************************
- * Name: usbstrg_unbindlun
+ * Name: usbmsc_unbindlun
*
* Description:
* Un-bind the block driver for the specified LUN
*
* Input Parameters:
- * handle - The handle returned by a previous call to usbstrg_configure().
+ * handle - The handle returned by a previous call to usbmsc_configure().
* lun - the LUN to unbind from
*
* Returned Value:
@@ -444,24 +444,24 @@ EXTERN int usbstrg_bindlun(FAR void *handle, FAR const char *drvrpath,
*
****************************************************************************/
-EXTERN int usbstrg_unbindlun(FAR void *handle, unsigned int lunno);
+EXTERN int usbmsc_unbindlun(FAR void *handle, unsigned int lunno);
/****************************************************************************
- * Name: usbstrg_exportluns
+ * Name: usbmsc_exportluns
*
* Description:
* After all of the LUNs have been bound, this function may be called
* in order to export those LUNs in the USB storage device.
*
* Input Parameters:
- * handle - The handle returned by a previous call to usbstrg_configure().
+ * handle - The handle returned by a previous call to usbmsc_configure().
*
* Returned Value:
* 0 on success; a negated errno on failure
*
****************************************************************************/
-EXTERN int usbstrg_exportluns(FAR void *handle);
+EXTERN int usbmsc_exportluns(FAR void *handle);
/****************************************************************************
* Name: cdcser_classobject
@@ -470,32 +470,32 @@ EXTERN int usbstrg_exportluns(FAR void *handle);
* .
*
* Input Parameters:
- * handle - The handle returned by a previous call to usbstrg_configure().
+ * handle - The handle returned by a previous call to usbmsc_configure().
*
* Returned Value:
* 0 on success; a negated errno on failure
*
****************************************************************************/
-#if defined(CONFIG_USBDEV_COMPOSITE) && defined(CONFIG_USBSTRG_COMPOSITE)
-EXTERN int usbstrg_classobject(FAR void *handle, FAR struct usbdevclass_driver_s **classdev);
+#if defined(CONFIG_USBDEV_COMPOSITE) && defined(CONFIG_USBMSC_COMPOSITE)
+EXTERN int usbmsc_classobject(FAR void *handle, FAR struct usbdevclass_driver_s **classdev);
#endif
/****************************************************************************
- * Name: usbstrg_uninitialize
+ * Name: usbmsc_uninitialize
*
* Description:
* Un-initialize the USB storage class driver
*
* Input Parameters:
- * handle - The handle returned by a previous call to usbstrg_configure().
+ * handle - The handle returned by a previous call to usbmsc_configure().
*
* Returned Value:
* None
*
****************************************************************************/
-EXTERN void usbstrg_uninitialize(FAR void *handle);
+EXTERN void usbmsc_uninitialize(FAR void *handle);
#undef EXTERN
#if defined(__cplusplus)
diff --git a/nuttx/include/nuttx/usb/usbdev_trace.h b/nuttx/include/nuttx/usb/usbdev_trace.h
index ebf883132..ce9b4bebd 100644
--- a/nuttx/include/nuttx/usb/usbdev_trace.h
+++ b/nuttx/include/nuttx/usb/usbdev_trace.h
@@ -246,142 +246,142 @@
/* State transitions */
-#define USBSTRG_CLASSSTATE_IDLECMDPARSE 0x0001
-#define USBSTRG_CLASSSTATE_CMDPARSECMDFINISH 0x0002
-#define USBSTRG_CLASSSTATE_CMDPARSECMDREAD6 0x0003
-#define USBSTRG_CLASSSTATE_CMDPARSECMDREAD10 0x0004
-#define USBSTRG_CLASSSTATE_CMDPARSECMDREAD12 0x0005
-#define USBSTRG_CLASSSTATE_CMDPARSECMDWRITE6 0x0006
-#define USBSTRG_CLASSSTATE_CMDPARSECMDWRITE10 0x0007
-#define USBSTRG_CLASSSTATE_CMDPARSECMDWRITE12 0x0008
-#define USBSTRG_CLASSSTATE_CMDREAD 0x0009
-#define USBSTRG_CLASSSTATE_CMDREADCMDFINISH 0x000a
-#define USBSTRG_CLASSSTATE_CMDWRITE 0x000b
-#define USBSTRG_CLASSSTATE_CMDWRITECMDFINISH 0x000c
-#define USBSTRG_CLASSSTATE_CMDFINISHCMDSTATUS 0x000d
-#define USBSTRG_CLASSSTATE_CMDSTATUSIDLE 0x000e
+#define USBMSC_CLASSSTATE_IDLECMDPARSE 0x0001
+#define USBMSC_CLASSSTATE_CMDPARSECMDFINISH 0x0002
+#define USBMSC_CLASSSTATE_CMDPARSECMDREAD6 0x0003
+#define USBMSC_CLASSSTATE_CMDPARSECMDREAD10 0x0004
+#define USBMSC_CLASSSTATE_CMDPARSECMDREAD12 0x0005
+#define USBMSC_CLASSSTATE_CMDPARSECMDWRITE6 0x0006
+#define USBMSC_CLASSSTATE_CMDPARSECMDWRITE10 0x0007
+#define USBMSC_CLASSSTATE_CMDPARSECMDWRITE12 0x0008
+#define USBMSC_CLASSSTATE_CMDREAD 0x0009
+#define USBMSC_CLASSSTATE_CMDREADCMDFINISH 0x000a
+#define USBMSC_CLASSSTATE_CMDWRITE 0x000b
+#define USBMSC_CLASSSTATE_CMDWRITECMDFINISH 0x000c
+#define USBMSC_CLASSSTATE_CMDFINISHCMDSTATUS 0x000d
+#define USBMSC_CLASSSTATE_CMDSTATUSIDLE 0x000e
/* Values of the class error ID used by the USB storage driver */
-#define USBSTRG_TRACEERR_ALLOCCTRLREQ 0x0001
-#define USBSTRG_TRACEERR_ALLOCDEVSTRUCT 0x0002
-#define USBSTRG_TRACEERR_ALLOCIOBUFFER 0x0003
-#define USBSTRG_TRACEERR_ALREADYCONFIGURED 0x0004
-#define USBSTRG_TRACEERR_ALREADYUNINIT 0x0005
-#define USBSTRG_TRACEERR_BADREQUEST 0x0006
-#define USBSTRG_TRACEERR_BINDLUNINVALIDARGS2 0x0007
-#define USBSTRG_TRACEERR_BINDLUNINVALIDARGS3 0x0008
-#define USBSTRG_TRACEERR_BINDLUNINVALIDARGS4 0x0009
-#define USBSTRG_TRACEERR_BINLUNINVALIDARGS1 0x000a
-#define USBSTRG_TRACEERR_BLKDRVEOPEN 0x000b
-#define USBSTRG_TRACEERR_CMDBADLUN 0x000c
-#define USBSTRG_TRACEERR_CMDFINISHRESIDUE 0x000d
-#define USBSTRG_TRACEERR_CMDFINISHRQEMPTY 0x000e
-#define USBSTRG_TRACEERR_CMDFINISHSHORTPKT 0x000f
-#define USBSTRG_TRACEERR_CMDFINISHSUBMIT 0x0010
-#define USBSTRG_TRACEERR_CMDFINSHDIR 0x0011
-#define USBSTRG_TRACEERR_CMDFINSHSUBMIT 0x0012
-#define USBSTRG_TRACEERR_CMDPARSEWRREQLISTEMPTY 0x0013
-#define USBSTRG_TRACEERR_CMDREADREADFAIL 0x0014
-#define USBSTRG_TRACEERR_CMDREADSUBMIT 0x0015
-#define USBSTRG_TRACEERR_CMDREADWRRQEMPTY 0x0016
-#define USBSTRG_TRACEERR_CMDSTATUSRDREQLISTEMPTY 0x0017
-#define USBSTRG_TRACEERR_CMDUNEVIOLATION 0x0018
-#define USBSTRG_TRACEERR_CMDWRITERDSUBMIT 0x0019
-#define USBSTRG_TRACEERR_CMDWRITERDRQEMPTY 0x001a
-#define USBSTRG_TRACEERR_CMDWRITEWRITEFAIL 0x001b
-#define USBSTRG_TRACEERR_CONFIGIDBAD 0x001c
-#define USBSTRG_TRACEERR_CONFIGNONE 0x001d
-#define USBSTRG_TRACEERR_DEFERREDRESPINVALIDARGS 0x001e
-#define USBSTRG_TRACEERR_DEFERREDRESPSTALLED 0x001f
-#define USBSTRG_TRACEERR_DEFERREDRESPSUBMIT 0x0020
-#define USBSTRG_TRACEERR_DEVREGISTER 0x0021
-#define USBSTRG_TRACEERR_DISCONNECTINVALIDARGS 0x0022
-#define USBSTRG_TRACEERR_EP0NOTBOUND1 0x0023
-#define USBSTRG_TRACEERR_EP0NOTBOUND2 0x0024
-#define USBSTRG_TRACEERR_EP0NOTBOUND3 0x0025
-#define USBSTRG_TRACEERR_EPBULKINALLOCFAIL 0x0026
-#define USBSTRG_TRACEERR_EPBULKINCONFIGFAIL 0x0027
-#define USBSTRG_TRACEERR_EPBULKOUTALLOCFAIL 0x0028
-#define USBSTRG_TRACEERR_EPBULKOUTCONFIGFAIL 0x0029
-#define USBSTRG_TRACEERR_EPRESPQ 0x002a
-#define USBSTRG_TRACEERR_EXPORTLUNSINVALIDARGS 0x002b
-#define USBSTRG_TRACEERR_GETMAXLUNNDX 0x002c
-#define USBSTRG_TRACEERR_GETUNKNOWNDESC 0x002d
-#define USBSTRG_TRACEERR_IDLERDREQLISTEMPTY 0x002e
-#define USBSTRG_TRACEERR_IDLERDSUBMIT 0x002f
-#define USBSTRG_TRACEERR_INQUIRYFLAGS 0x0030
-#define USBSTRG_TRACEERR_INTERNALCONFUSION1 0x0031
-#define USBSTRG_TRACEERR_INTERNALCONFUSION2 0x0032
-#define USBSTRG_TRACEERR_INVALIDCBWCONTENT 0x0033
-#define USBSTRG_TRACEERR_INVALIDCBWSIGNATURE 0x0034
-#define USBSTRG_TRACEERR_INVALIDSTATE 0x0035
-#define USBSTRG_TRACEERR_LUNALREADYBOUND 0x0036
-#define USBSTRG_TRACEERR_LUNNOTBOUND 0x0037
-#define USBSTRG_TRACEERR_MODEPAGEFLAGS 0x0038
-#define USBSTRG_TRACEERR_MODESENSE10FLAGS 0x0039
-#define USBSTRG_TRACEERR_MODESENSE6FLAGS 0x003a
-#define USBSTRG_TRACEERR_MSRESETNDX 0x003b
-#define USBSTRG_TRACEERR_NOGEOMETRY 0x003c
-#define USBSTRG_TRACEERR_NOTCONFIGURED 0x003d
-#define USBSTRG_TRACEERR_NOTREMOVABLE 0x003e
-#define USBSTRG_TRACEERR_PCSAVED 0x003f
-#define USBSTRG_TRACEERR_PHASEERROR1 0x0040
-#define USBSTRG_TRACEERR_PHASEERROR2 0x0041
-#define USBSTRG_TRACEERR_PHASEERROR3 0x0042
-#define USBSTRG_TRACEERR_PREVENTMEDIUMREMOVALPREVENT 0x0043
-#define USBSTRG_TRACEERR_RDALLOCREQ 0x0044
-#define USBSTRG_TRACEERR_RDCOMPLETEINVALIDARGS 0x0045
-#define USBSTRG_TRACEERR_RDCOMPLETERDSUBMIT 0x0046
-#define USBSTRG_TRACEERR_RDSHUTDOWN 0x0047
-#define USBSTRG_TRACEERR_RDSUBMIT 0x0048
-#define USBSTRG_TRACEERR_RDUNEXPECTED 0x0049
-#define USBSTRG_TRACEERR_READ10FLAGS 0x004a
-#define USBSTRG_TRACEERR_READ10LBARANGE 0x004b
-#define USBSTRG_TRACEERR_READ10MEDIANOTPRESENT 0x004c
-#define USBSTRG_TRACEERR_READ12FLAGS 0x004d
-#define USBSTRG_TRACEERR_READ12LBARANGE 0x004e
-#define USBSTRG_TRACEERR_READ12MEDIANOTPRESENT 0x004f
-#define USBSTRG_TRACEERR_READ6LBARANGE 0x0050
-#define USBSTRG_TRACEERR_READ6MEDIANOTPRESENT 0x0051
-#define USBSTRG_TRACEERR_READCAPACITYFLAGS 0x0052
-#define USBSTRG_TRACEERR_REALLOCIOBUFFER 0x0053
-#define USBSTRG_TRACEERR_REQRESULT 0x0054
-#define USBSTRG_TRACEERR_SCSICMDCONTROL 0x0055
-#define USBSTRG_TRACEERR_SETCONFIGINVALIDARGS 0x0056
-#define USBSTRG_TRACEERR_SETUPINVALIDARGS 0x0057
-#define USBSTRG_TRACEERR_SNDCSWFAIL 0x0058
-#define USBSTRG_TRACEERR_SNDPHERROR 0x0059
-#define USBSTRG_TRACEERR_SNDSTATUSSUBMIT 0x005a
-#define USBSTRG_TRACEERR_SYNCCACHEMEDIANOTPRESENT 0x005b
-#define USBSTRG_TRACEERR_THREADCREATE 0x005c
-#define USBSTRG_TRACEERR_TOOMANYLUNS 0x005d
-#define USBSTRG_TRACEERR_UNBINDINVALIDARGS 0x005e
-#define USBSTRG_TRACEERR_UNBINDLUNINVALIDARGS1 0x005f
-#define USBSTRG_TRACEERR_UNBINDLUNINVALIDARGS2 0x0060
-#define USBSTRG_TRACEERR_UNINITIALIZEINVALIDARGS 0x0061
-#define USBSTRG_TRACEERR_UNSUPPORTEDSTDREQ 0x0062
-#define USBSTRG_TRACEERR_VERIFY10FLAGS 0x0063
-#define USBSTRG_TRACEERR_VERIFY10LBARANGE 0x0064
-#define USBSTRG_TRACEERR_VERIFY10MEDIANOTPRESENT 0x0065
-#define USBSTRG_TRACEERR_VERIFY10NOBLOCKS 0x0066
-#define USBSTRG_TRACEERR_VERIFY10READFAIL 0x0067
-#define USBSTRG_TRACEERR_WRALLOCREQ 0x0068
-#define USBSTRG_TRACEERR_SNDPHERROR 0x0069
-#define USBSTRG_TRACEERR_WRCOMPLETEINVALIDARGS 0x006a
-#define USBSTRG_TRACEERR_WRITE10FLAGS 0x006b
-#define USBSTRG_TRACEERR_WRITE10LBARANGE 0x006c
-#define USBSTRG_TRACEERR_WRITE10MEDIANOTPRESENT 0x006d
-#define USBSTRG_TRACEERR_WRITE10READONLY 0x006e
-#define USBSTRG_TRACEERR_WRITE12FLAGS 0x006f
-#define USBSTRG_TRACEERR_WRITE12LBARANGE 0x0070
-#define USBSTRG_TRACEERR_WRITE12MEDIANOTPRESENT 0x0071
-#define USBSTRG_TRACEERR_WRITE12READONLY 0x0072
-#define USBSTRG_TRACEERR_WRITE6LBARANGE 0x0073
-#define USBSTRG_TRACEERR_WRITE6MEDIANOTPRESENT 0x0074
-#define USBSTRG_TRACEERR_WRITE6READONLY 0x0075
-#define USBSTRG_TRACEERR_WRSHUTDOWN 0x0076
-#define USBSTRG_TRACEERR_WRUNEXPECTED 0x0077
+#define USBMSC_TRACEERR_ALLOCCTRLREQ 0x0001
+#define USBMSC_TRACEERR_ALLOCDEVSTRUCT 0x0002
+#define USBMSC_TRACEERR_ALLOCIOBUFFER 0x0003
+#define USBMSC_TRACEERR_ALREADYCONFIGURED 0x0004
+#define USBMSC_TRACEERR_ALREADYUNINIT 0x0005
+#define USBMSC_TRACEERR_BADREQUEST 0x0006
+#define USBMSC_TRACEERR_BINDLUNINVALIDARGS2 0x0007
+#define USBMSC_TRACEERR_BINDLUNINVALIDARGS3 0x0008
+#define USBMSC_TRACEERR_BINDLUNINVALIDARGS4 0x0009
+#define USBMSC_TRACEERR_BINLUNINVALIDARGS1 0x000a
+#define USBMSC_TRACEERR_BLKDRVEOPEN 0x000b
+#define USBMSC_TRACEERR_CMDBADLUN 0x000c
+#define USBMSC_TRACEERR_CMDFINISHRESIDUE 0x000d
+#define USBMSC_TRACEERR_CMDFINISHRQEMPTY 0x000e
+#define USBMSC_TRACEERR_CMDFINISHSHORTPKT 0x000f
+#define USBMSC_TRACEERR_CMDFINISHSUBMIT 0x0010
+#define USBMSC_TRACEERR_CMDFINSHDIR 0x0011
+#define USBMSC_TRACEERR_CMDFINSHSUBMIT 0x0012
+#define USBMSC_TRACEERR_CMDPARSEWRREQLISTEMPTY 0x0013
+#define USBMSC_TRACEERR_CMDREADREADFAIL 0x0014
+#define USBMSC_TRACEERR_CMDREADSUBMIT 0x0015
+#define USBMSC_TRACEERR_CMDREADWRRQEMPTY 0x0016
+#define USBMSC_TRACEERR_CMDSTATUSRDREQLISTEMPTY 0x0017
+#define USBMSC_TRACEERR_CMDUNEVIOLATION 0x0018
+#define USBMSC_TRACEERR_CMDWRITERDSUBMIT 0x0019
+#define USBMSC_TRACEERR_CMDWRITERDRQEMPTY 0x001a
+#define USBMSC_TRACEERR_CMDWRITEWRITEFAIL 0x001b
+#define USBMSC_TRACEERR_CONFIGIDBAD 0x001c
+#define USBMSC_TRACEERR_CONFIGNONE 0x001d
+#define USBMSC_TRACEERR_DEFERREDRESPINVALIDARGS 0x001e
+#define USBMSC_TRACEERR_DEFERREDRESPSTALLED 0x001f
+#define USBMSC_TRACEERR_DEFERREDRESPSUBMIT 0x0020
+#define USBMSC_TRACEERR_DEVREGISTER 0x0021
+#define USBMSC_TRACEERR_DISCONNECTINVALIDARGS 0x0022
+#define USBMSC_TRACEERR_EP0NOTBOUND1 0x0023
+#define USBMSC_TRACEERR_EP0NOTBOUND2 0x0024
+#define USBMSC_TRACEERR_EP0NOTBOUND3 0x0025
+#define USBMSC_TRACEERR_EPBULKINALLOCFAIL 0x0026
+#define USBMSC_TRACEERR_EPBULKINCONFIGFAIL 0x0027
+#define USBMSC_TRACEERR_EPBULKOUTALLOCFAIL 0x0028
+#define USBMSC_TRACEERR_EPBULKOUTCONFIGFAIL 0x0029
+#define USBMSC_TRACEERR_EPRESPQ 0x002a
+#define USBMSC_TRACEERR_EXPORTLUNSINVALIDARGS 0x002b
+#define USBMSC_TRACEERR_GETMAXLUNNDX 0x002c
+#define USBMSC_TRACEERR_GETUNKNOWNDESC 0x002d
+#define USBMSC_TRACEERR_IDLERDREQLISTEMPTY 0x002e
+#define USBMSC_TRACEERR_IDLERDSUBMIT 0x002f
+#define USBMSC_TRACEERR_INQUIRYFLAGS 0x0030
+#define USBMSC_TRACEERR_INTERNALCONFUSION1 0x0031
+#define USBMSC_TRACEERR_INTERNALCONFUSION2 0x0032
+#define USBMSC_TRACEERR_INVALIDCBWCONTENT 0x0033
+#define USBMSC_TRACEERR_INVALIDCBWSIGNATURE 0x0034
+#define USBMSC_TRACEERR_INVALIDSTATE 0x0035
+#define USBMSC_TRACEERR_LUNALREADYBOUND 0x0036
+#define USBMSC_TRACEERR_LUNNOTBOUND 0x0037
+#define USBMSC_TRACEERR_MODEPAGEFLAGS 0x0038
+#define USBMSC_TRACEERR_MODESENSE10FLAGS 0x0039
+#define USBMSC_TRACEERR_MODESENSE6FLAGS 0x003a
+#define USBMSC_TRACEERR_MSRESETNDX 0x003b
+#define USBMSC_TRACEERR_NOGEOMETRY 0x003c
+#define USBMSC_TRACEERR_NOTCONFIGURED 0x003d
+#define USBMSC_TRACEERR_NOTREMOVABLE 0x003e
+#define USBMSC_TRACEERR_PCSAVED 0x003f
+#define USBMSC_TRACEERR_PHASEERROR1 0x0040
+#define USBMSC_TRACEERR_PHASEERROR2 0x0041
+#define USBMSC_TRACEERR_PHASEERROR3 0x0042
+#define USBMSC_TRACEERR_PREVENTMEDIUMREMOVALPREVENT 0x0043
+#define USBMSC_TRACEERR_RDALLOCREQ 0x0044
+#define USBMSC_TRACEERR_RDCOMPLETEINVALIDARGS 0x0045
+#define USBMSC_TRACEERR_RDCOMPLETERDSUBMIT 0x0046
+#define USBMSC_TRACEERR_RDSHUTDOWN 0x0047
+#define USBMSC_TRACEERR_RDSUBMIT 0x0048
+#define USBMSC_TRACEERR_RDUNEXPECTED 0x0049
+#define USBMSC_TRACEERR_READ10FLAGS 0x004a
+#define USBMSC_TRACEERR_READ10LBARANGE 0x004b
+#define USBMSC_TRACEERR_READ10MEDIANOTPRESENT 0x004c
+#define USBMSC_TRACEERR_READ12FLAGS 0x004d
+#define USBMSC_TRACEERR_READ12LBARANGE 0x004e
+#define USBMSC_TRACEERR_READ12MEDIANOTPRESENT 0x004f
+#define USBMSC_TRACEERR_READ6LBARANGE 0x0050
+#define USBMSC_TRACEERR_READ6MEDIANOTPRESENT 0x0051
+#define USBMSC_TRACEERR_READCAPACITYFLAGS 0x0052
+#define USBMSC_TRACEERR_REALLOCIOBUFFER 0x0053
+#define USBMSC_TRACEERR_REQRESULT 0x0054
+#define USBMSC_TRACEERR_SCSICMDCONTROL 0x0055
+#define USBMSC_TRACEERR_SETCONFIGINVALIDARGS 0x0056
+#define USBMSC_TRACEERR_SETUPINVALIDARGS 0x0057
+#define USBMSC_TRACEERR_SNDCSWFAIL 0x0058
+#define USBMSC_TRACEERR_SNDPHERROR 0x0059
+#define USBMSC_TRACEERR_SNDSTATUSSUBMIT 0x005a
+#define USBMSC_TRACEERR_SYNCCACHEMEDIANOTPRESENT 0x005b
+#define USBMSC_TRACEERR_THREADCREATE 0x005c
+#define USBMSC_TRACEERR_TOOMANYLUNS 0x005d
+#define USBMSC_TRACEERR_UNBINDINVALIDARGS 0x005e
+#define USBMSC_TRACEERR_UNBINDLUNINVALIDARGS1 0x005f
+#define USBMSC_TRACEERR_UNBINDLUNINVALIDARGS2 0x0060
+#define USBMSC_TRACEERR_UNINITIALIZEINVALIDARGS 0x0061
+#define USBMSC_TRACEERR_UNSUPPORTEDSTDREQ 0x0062
+#define USBMSC_TRACEERR_VERIFY10FLAGS 0x0063
+#define USBMSC_TRACEERR_VERIFY10LBARANGE 0x0064
+#define USBMSC_TRACEERR_VERIFY10MEDIANOTPRESENT 0x0065
+#define USBMSC_TRACEERR_VERIFY10NOBLOCKS 0x0066
+#define USBMSC_TRACEERR_VERIFY10READFAIL 0x0067
+#define USBMSC_TRACEERR_WRALLOCREQ 0x0068
+#define USBMSC_TRACEERR_SNDPHERROR 0x0069
+#define USBMSC_TRACEERR_WRCOMPLETEINVALIDARGS 0x006a
+#define USBMSC_TRACEERR_WRITE10FLAGS 0x006b
+#define USBMSC_TRACEERR_WRITE10LBARANGE 0x006c
+#define USBMSC_TRACEERR_WRITE10MEDIANOTPRESENT 0x006d
+#define USBMSC_TRACEERR_WRITE10READONLY 0x006e
+#define USBMSC_TRACEERR_WRITE12FLAGS 0x006f
+#define USBMSC_TRACEERR_WRITE12LBARANGE 0x0070
+#define USBMSC_TRACEERR_WRITE12MEDIANOTPRESENT 0x0071
+#define USBMSC_TRACEERR_WRITE12READONLY 0x0072
+#define USBMSC_TRACEERR_WRITE6LBARANGE 0x0073
+#define USBMSC_TRACEERR_WRITE6MEDIANOTPRESENT 0x0074
+#define USBMSC_TRACEERR_WRITE6READONLY 0x0075
+#define USBMSC_TRACEERR_WRSHUTDOWN 0x0076
+#define USBMSC_TRACEERR_WRUNEXPECTED 0x0077
/****************************************************************************
* Public Types
diff --git a/nuttx/include/nuttx/usb/usbhost.h b/nuttx/include/nuttx/usb/usbhost.h
index 7f1bd880e..923e26307 100644
--- a/nuttx/include/nuttx/usb/usbhost.h
+++ b/nuttx/include/nuttx/usb/usbhost.h
@@ -492,8 +492,8 @@
struct usbhost_id_s
{
uint8_t base; /* Base device class code (see USB_CLASS_* defines in usb.h) */
- uint8_t subclass; /* Sub-class, depends on base class. Eg., See USBSTRG_SUBCLASS_* */
- uint8_t proto; /* Protocol, depends on base class. Eg., See USBSTRG_PROTO_* */
+ uint8_t subclass; /* Sub-class, depends on base class. Eg., See USBMSC_SUBCLASS_* */
+ uint8_t proto; /* Protocol, depends on base class. Eg., See USBMSC_PROTO_* */
uint16_t vid; /* Vendor ID (for vendor/product specific devices) */
uint16_t pid; /* Product ID (for vendor/product specific devices) */
};
diff --git a/nuttx/tools/mkconfig.c b/nuttx/tools/mkconfig.c
index fcda8df84..22594c0ae 100644
--- a/nuttx/tools/mkconfig.c
+++ b/nuttx/tools/mkconfig.c
@@ -204,11 +204,11 @@ int main(int argc, char **argv, char **envp)
printf("/* Check if any readable and writable filesystem (OR USB storage) is supported */\n\n");
printf("#undef CONFIG_FS_READABLE\n");
printf("#undef CONFIG_FS_WRITABLE\n");
- printf("#if defined(CONFIG_FS_FAT) || defined(CONFIG_FS_ROMFS) || defined(CONFIG_USBSTRG) || \\\n");
+ printf("#if defined(CONFIG_FS_FAT) || defined(CONFIG_FS_ROMFS) || defined(CONFIG_USBMSC) || \\\n");
printf(" defined(CONFIG_FS_NXFFS) || defined(CONFIG_APPS_BINDIR)\n");
printf("# define CONFIG_FS_READABLE 1\n");
printf("#endif\n\n");
- printf("#if defined(CONFIG_FS_FAT) || defined(CONFIG_USBSTRG) || defined(CONFIG_FS_NXFFS)\n");
+ printf("#if defined(CONFIG_FS_FAT) || defined(CONFIG_USBMSC) || defined(CONFIG_FS_NXFFS)\n");
printf("# define CONFIG_FS_WRITABLE 1\n");
printf("#endif\n\n");
printf("/* There can be no network support with no socket descriptors */\n\n");