From 657f0d2092b325bbaec6d61cce725295e38df61e Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 25 Jan 2012 20:17:59 +0000 Subject: Massive name change USB STRG -> USB MSC git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4334 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/README.txt | 18 +-- nuttx/configs/amber/hello/defconfig | 84 +++++------ nuttx/configs/avr32dev1/nsh/defconfig | 44 +++--- nuttx/configs/avr32dev1/ostest/defconfig | 44 +++--- nuttx/configs/demo9s12ne64/ostest/defconfig | 44 +++--- nuttx/configs/ea3131/nsh/defconfig | 44 +++--- nuttx/configs/ea3131/ostest/defconfig | 44 +++--- nuttx/configs/ea3131/pgnsh/defconfig | 44 +++--- nuttx/configs/ea3131/src/Makefile | 4 +- nuttx/configs/ea3131/src/up_usbmsc.c | 126 ++++++++++++++++ nuttx/configs/ea3131/src/up_usbstrg.c | 126 ---------------- nuttx/configs/ea3131/usbserial/defconfig | 84 +++++------ nuttx/configs/ea3131/usbstorage/defconfig | 84 +++++------ nuttx/configs/ea3152/ostest/defconfig | 44 +++--- nuttx/configs/ea3152/src/Makefile | 4 +- nuttx/configs/ea3152/src/up_usbmsc.c | 126 ++++++++++++++++ nuttx/configs/ea3152/src/up_usbstrg.c | 126 ---------------- nuttx/configs/ez80f910200kitg/ostest/defconfig | 44 +++--- nuttx/configs/ez80f910200zco/dhcpd/defconfig | 44 +++--- nuttx/configs/ez80f910200zco/httpd/defconfig | 44 +++--- nuttx/configs/ez80f910200zco/nettest/defconfig | 44 +++--- nuttx/configs/ez80f910200zco/nsh/defconfig | 44 +++--- nuttx/configs/ez80f910200zco/ostest/defconfig | 44 +++--- nuttx/configs/ez80f910200zco/poll/defconfig | 44 +++--- nuttx/configs/hymini-stm32v/README.txt | 2 +- nuttx/configs/hymini-stm32v/buttons/defconfig | 44 +++--- nuttx/configs/hymini-stm32v/nsh/defconfig | 44 +++--- nuttx/configs/hymini-stm32v/nsh2/defconfig | 92 ++++++------ nuttx/configs/hymini-stm32v/nx/defconfig | 44 +++--- nuttx/configs/hymini-stm32v/nxlines/defconfig | 44 +++--- nuttx/configs/hymini-stm32v/src/Makefile | 4 +- nuttx/configs/hymini-stm32v/src/up_usbmsc.c | 164 +++++++++++++++++++++ nuttx/configs/hymini-stm32v/src/up_usbstrg.c | 164 --------------------- nuttx/configs/hymini-stm32v/usbserial/defconfig | 44 +++--- nuttx/configs/hymini-stm32v/usbstorage/defconfig | 92 ++++++------ nuttx/configs/kwikstik-k40/ostest/defconfig | 44 +++--- nuttx/configs/kwikstik-k40/src/Makefile | 4 +- nuttx/configs/kwikstik-k40/src/up_usbmsc.c | 118 +++++++++++++++ nuttx/configs/kwikstik-k40/src/up_usbstrg.c | 118 --------------- nuttx/configs/lpcxpresso-lpc1768/dhcpd/defconfig | 84 +++++------ nuttx/configs/lpcxpresso-lpc1768/nsh/defconfig | 84 +++++------ nuttx/configs/lpcxpresso-lpc1768/nx/defconfig | 84 +++++------ nuttx/configs/lpcxpresso-lpc1768/ostest/defconfig | 84 +++++------ nuttx/configs/lpcxpresso-lpc1768/src/Makefile | 4 +- nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c | 143 ++++++++++++++++++ nuttx/configs/lpcxpresso-lpc1768/src/up_usbstrg.c | 143 ------------------ nuttx/configs/lpcxpresso-lpc1768/thttpd/defconfig | 84 +++++------ .../lpcxpresso-lpc1768/usbstorage/defconfig | 84 +++++------ nuttx/configs/mbed/hidkbd/defconfig | 44 +++--- nuttx/configs/mbed/nsh/defconfig | 44 +++--- nuttx/configs/mbed/src/Makefile | 4 +- nuttx/configs/mcu123-lpc214x/nsh/defconfig | 44 +++--- nuttx/configs/mcu123-lpc214x/ostest/defconfig | 44 +++--- nuttx/configs/mcu123-lpc214x/src/Makefile | 4 +- nuttx/configs/mcu123-lpc214x/src/up_usbmsc.c | 143 ++++++++++++++++++ nuttx/configs/mcu123-lpc214x/src/up_usbstrg.c | 143 ------------------ nuttx/configs/mcu123-lpc214x/usbserial/defconfig | 44 +++--- nuttx/configs/mcu123-lpc214x/usbstorage/defconfig | 76 +++++----- nuttx/configs/micropendous3/hello/defconfig | 84 +++++------ nuttx/configs/mx1ads/ostest/defconfig | 40 ++--- nuttx/configs/ne64badge/ostest/defconfig | 44 +++--- nuttx/configs/ntosd-dm320/nettest/defconfig | 44 +++--- nuttx/configs/ntosd-dm320/nsh/defconfig | 44 +++--- nuttx/configs/ntosd-dm320/ostest/defconfig | 40 ++--- nuttx/configs/ntosd-dm320/poll/defconfig | 44 +++--- nuttx/configs/ntosd-dm320/thttpd/defconfig | 44 +++--- nuttx/configs/ntosd-dm320/udp/defconfig | 44 +++--- nuttx/configs/ntosd-dm320/uip/defconfig | 44 +++--- nuttx/configs/nucleus2g/nsh/defconfig | 44 +++--- nuttx/configs/nucleus2g/ostest/defconfig | 44 +++--- nuttx/configs/nucleus2g/src/Makefile | 4 +- nuttx/configs/nucleus2g/src/up_usbmsc.c | 143 ++++++++++++++++++ nuttx/configs/nucleus2g/src/up_usbstrg.c | 143 ------------------ nuttx/configs/nucleus2g/usbserial/defconfig | 84 +++++------ nuttx/configs/nucleus2g/usbstorage/defconfig | 84 +++++------ nuttx/configs/olimex-lpc1766stk/ftpc/defconfig | 44 +++--- nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig | 44 +++--- nuttx/configs/olimex-lpc1766stk/nettest/defconfig | 44 +++--- nuttx/configs/olimex-lpc1766stk/nsh/defconfig | 44 +++--- nuttx/configs/olimex-lpc1766stk/nx/defconfig | 84 +++++------ nuttx/configs/olimex-lpc1766stk/ostest/defconfig | 84 +++++------ .../configs/olimex-lpc1766stk/slip-httpd/defconfig | 44 +++--- nuttx/configs/olimex-lpc1766stk/src/Makefile | 4 +- nuttx/configs/olimex-lpc1766stk/src/up_usbmsc.c | 156 ++++++++++++++++++++ nuttx/configs/olimex-lpc1766stk/src/up_usbstrg.c | 156 -------------------- nuttx/configs/olimex-lpc1766stk/thttpd/defconfig | 44 +++--- .../configs/olimex-lpc1766stk/usbserial/defconfig | 84 +++++------ .../configs/olimex-lpc1766stk/usbstorage/defconfig | 84 +++++------ nuttx/configs/olimex-lpc1766stk/wlan/defconfig | 44 +++--- nuttx/configs/olimex-strp711/nettest/defconfig | 44 +++--- nuttx/configs/olimex-strp711/nsh/defconfig | 44 +++--- nuttx/configs/olimex-strp711/ostest/defconfig | 44 +++--- nuttx/configs/pcblogic-pic32mx/nsh/defconfig | 84 +++++------ nuttx/configs/pcblogic-pic32mx/ostest/defconfig | 84 +++++------ nuttx/configs/pic32-starterkit/ostest/defconfig | 84 +++++------ nuttx/configs/sam3u-ek/knsh/defconfig | 44 +++--- nuttx/configs/sam3u-ek/nsh/defconfig | 44 +++--- nuttx/configs/sam3u-ek/nx/defconfig | 44 +++--- nuttx/configs/sam3u-ek/ostest/defconfig | 44 +++--- nuttx/configs/sam3u-ek/src/Makefile | 4 +- nuttx/configs/sam3u-ek/src/up_usbmsc.c | 152 +++++++++++++++++++ nuttx/configs/sam3u-ek/src/up_usbstrg.c | 152 ------------------- nuttx/configs/sam3u-ek/touchscreen/defconfig | 44 +++--- nuttx/configs/skp16c26/ostest/defconfig | 40 ++--- nuttx/configs/stm3210e-eval/README.txt | 2 +- nuttx/configs/stm3210e-eval/RIDE/defconfig | 44 +++--- nuttx/configs/stm3210e-eval/buttons/defconfig | 44 +++--- nuttx/configs/stm3210e-eval/nsh/defconfig | 44 +++--- nuttx/configs/stm3210e-eval/nsh2/defconfig | 96 ++++++------ nuttx/configs/stm3210e-eval/nx/defconfig | 44 +++--- nuttx/configs/stm3210e-eval/nxlines/defconfig | 44 +++--- nuttx/configs/stm3210e-eval/nxtext/defconfig | 44 +++--- nuttx/configs/stm3210e-eval/ostest/defconfig | 44 +++--- nuttx/configs/stm3210e-eval/src/Makefile | 4 +- nuttx/configs/stm3210e-eval/src/up_usbmsc.c | 164 +++++++++++++++++++++ nuttx/configs/stm3210e-eval/src/up_usbstrg.c | 164 --------------------- nuttx/configs/stm3210e-eval/usbserial/defconfig | 48 +++--- nuttx/configs/stm3210e-eval/usbstorage/defconfig | 92 ++++++------ nuttx/configs/stm3240g-eval/dhcpd/defconfig | 44 +++--- nuttx/configs/stm3240g-eval/nettest/defconfig | 44 +++--- nuttx/configs/stm3240g-eval/nsh/defconfig | 44 +++--- nuttx/configs/stm3240g-eval/ostest/defconfig | 92 ++++++------ nuttx/configs/stm32f4discovery/nsh/defconfig | 44 +++--- nuttx/configs/stm32f4discovery/ostest/defconfig | 92 ++++++------ nuttx/configs/sure-pic32mx/nsh/defconfig | 84 +++++------ nuttx/configs/sure-pic32mx/ostest/defconfig | 84 +++++------ nuttx/configs/teensy/hello/defconfig | 84 +++++------ nuttx/configs/teensy/nsh/defconfig | 44 +++--- nuttx/configs/teensy/src/Makefile | 4 +- nuttx/configs/teensy/src/up_usbmsc.c | 137 +++++++++++++++++ nuttx/configs/teensy/src/up_usbstrg.c | 137 ----------------- nuttx/configs/teensy/usbstorage/defconfig | 84 +++++------ nuttx/configs/twr-k60n512/nsh/defconfig | 44 +++--- nuttx/configs/twr-k60n512/ostest/defconfig | 44 +++--- nuttx/configs/twr-k60n512/src/Makefile | 4 +- nuttx/configs/twr-k60n512/src/up_usbmsc.c | 118 +++++++++++++++ nuttx/configs/twr-k60n512/src/up_usbstrg.c | 118 --------------- nuttx/configs/us7032evb1/nsh/defconfig | 44 +++--- nuttx/configs/us7032evb1/ostest/defconfig | 44 +++--- nuttx/configs/vsn/nsh/defconfig | 44 +++--- nuttx/configs/vsn/src/Makefile | 4 +- nuttx/configs/vsn/src/usbmsc.c | 156 ++++++++++++++++++++ nuttx/configs/vsn/src/usbstrg.c | 156 -------------------- 143 files changed, 4703 insertions(+), 4703 deletions(-) create mode 100644 nuttx/configs/ea3131/src/up_usbmsc.c delete mode 100644 nuttx/configs/ea3131/src/up_usbstrg.c create mode 100644 nuttx/configs/ea3152/src/up_usbmsc.c delete mode 100644 nuttx/configs/ea3152/src/up_usbstrg.c create mode 100644 nuttx/configs/hymini-stm32v/src/up_usbmsc.c delete mode 100644 nuttx/configs/hymini-stm32v/src/up_usbstrg.c create mode 100755 nuttx/configs/kwikstik-k40/src/up_usbmsc.c delete mode 100755 nuttx/configs/kwikstik-k40/src/up_usbstrg.c create mode 100755 nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c delete mode 100755 nuttx/configs/lpcxpresso-lpc1768/src/up_usbstrg.c create mode 100755 nuttx/configs/mcu123-lpc214x/src/up_usbmsc.c delete mode 100755 nuttx/configs/mcu123-lpc214x/src/up_usbstrg.c create mode 100755 nuttx/configs/nucleus2g/src/up_usbmsc.c delete mode 100755 nuttx/configs/nucleus2g/src/up_usbstrg.c create mode 100755 nuttx/configs/olimex-lpc1766stk/src/up_usbmsc.c delete mode 100755 nuttx/configs/olimex-lpc1766stk/src/up_usbstrg.c create mode 100644 nuttx/configs/sam3u-ek/src/up_usbmsc.c delete mode 100644 nuttx/configs/sam3u-ek/src/up_usbstrg.c create mode 100644 nuttx/configs/stm3210e-eval/src/up_usbmsc.c delete mode 100644 nuttx/configs/stm3210e-eval/src/up_usbstrg.c create mode 100755 nuttx/configs/teensy/src/up_usbmsc.c delete mode 100755 nuttx/configs/teensy/src/up_usbstrg.c create mode 100644 nuttx/configs/twr-k60n512/src/up_usbmsc.c delete mode 100644 nuttx/configs/twr-k60n512/src/up_usbstrg.c create mode 100644 nuttx/configs/vsn/src/usbmsc.c delete mode 100644 nuttx/configs/vsn/src/usbstrg.c (limited to 'nuttx/configs') 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_usbmsc.c b/nuttx/configs/ea3131/src/up_usbmsc.c new file mode 100644 index 000000000..422ff3603 --- /dev/null +++ b/nuttx/configs/ea3131/src/up_usbmsc.c @@ -0,0 +1,126 @@ +/**************************************************************************** + * configs/ea3131/src/up_usbmsc.c + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Configure and register the SAM3U MMC/SD SDIO block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include + +#include +#include +#include + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 +# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#endif + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVPATH1 +# define CONFIG_EXAMPLES_USBMSC_DEVPATH1 "/dev/ram" +#endif + +static const char g_source[] = CONFIG_EXAMPLES_USBMSC_DEVPATH1; +static struct fat_format_s g_fmt = FAT_FORMAT_INITIALIZER; + +#define USBMSC_NSECTORS 64 +#define USBMSC_SECTORSIZE 512 +#define BUFFER_SIZE (USBMSC_NSECTORS*USBMSC_SECTORSIZE) + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbmsc_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int usbmsc_archinitialize(void) +{ + uint8_t *pbuffer; + int ret; + + pbuffer = (uint8_t *) malloc (BUFFER_SIZE); + if (!pbuffer) + { + 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_USBMSC_DEVMINOR1, + pbuffer, + USBMSC_NSECTORS, + USBMSC_SECTORSIZE, + true); + if (ret < 0) + { + printf("create_ramdisk: Failed to register ramdisk at %s: %d\n", + g_source, -ret); + free(pbuffer); + return ret; + } + + /* Create a FAT filesystem on the ramdisk */ + + ret = mkfatfs(g_source, &g_fmt); + if (ret < 0) + { + printf("create_ramdisk: Failed to create FAT filesystem on ramdisk at %s\n", + g_source); + /* free(pbuffer); -- RAM disk is registered */ + return ret; + } + + return 0; +} diff --git a/nuttx/configs/ea3131/src/up_usbstrg.c b/nuttx/configs/ea3131/src/up_usbstrg.c deleted file mode 100644 index 5aef28733..000000000 --- a/nuttx/configs/ea3131/src/up_usbstrg.c +++ /dev/null @@ -1,126 +0,0 @@ -/**************************************************************************** - * configs/ea3131/src/up_usbstrg.c - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Configure and register the SAM3U MMC/SD SDIO block driver. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include - -#include -#include -#include - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 -# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0 -#endif - -#ifndef CONFIG_EXAMPLES_USBSTRG_DEVPATH1 -# define CONFIG_EXAMPLES_USBSTRG_DEVPATH1 "/dev/ram" -#endif - -static const char g_source[] = CONFIG_EXAMPLES_USBSTRG_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) - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: usbstrg_archinitialize - * - * Description: - * Perform architecture specific initialization - * - ****************************************************************************/ - -int usbstrg_archinitialize(void) -{ - uint8_t *pbuffer; - int ret; - - pbuffer = (uint8_t *) malloc (BUFFER_SIZE); - if (!pbuffer) - { - lib_lowprintf ("usbstrg_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, - pbuffer, - USBSTRG_NSECTORS, - USBSTRG_SECTORSIZE, - true); - if (ret < 0) - { - printf("create_ramdisk: Failed to register ramdisk at %s: %d\n", - g_source, -ret); - free(pbuffer); - return ret; - } - - /* Create a FAT filesystem on the ramdisk */ - - ret = mkfatfs(g_source, &g_fmt); - if (ret < 0) - { - printf("create_ramdisk: Failed to create FAT filesystem on ramdisk at %s\n", - g_source); - /* free(pbuffer); -- RAM disk is registered */ - return ret; - } - - return 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_usbmsc.c b/nuttx/configs/ea3152/src/up_usbmsc.c new file mode 100644 index 000000000..db92e5b9e --- /dev/null +++ b/nuttx/configs/ea3152/src/up_usbmsc.c @@ -0,0 +1,126 @@ +/**************************************************************************** + * configs/ea3152/src/up_usbmsc.c + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Configure and register the SAM3U MMC/SD SDIO block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include + +#include +#include +#include + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 +# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#endif + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVPATH1 +# define CONFIG_EXAMPLES_USBMSC_DEVPATH1 "/dev/ram" +#endif + +static const char g_source[] = CONFIG_EXAMPLES_USBMSC_DEVPATH1; +static struct fat_format_s g_fmt = FAT_FORMAT_INITIALIZER; + +#define USBMSC_NSECTORS 64 +#define USBMSC_SECTORSIZE 512 +#define BUFFER_SIZE (USBMSC_NSECTORS*USBMSC_SECTORSIZE) + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbmsc_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int usbmsc_archinitialize(void) +{ + uint8_t *pbuffer; + int ret; + + pbuffer = (uint8_t *) malloc (BUFFER_SIZE); + if (!pbuffer) + { + 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_USBMSC_DEVMINOR1, + pbuffer, + USBMSC_NSECTORS, + USBMSC_SECTORSIZE, + true); + if (ret < 0) + { + printf("create_ramdisk: Failed to register ramdisk at %s: %d\n", + g_source, -ret); + free(pbuffer); + return ret; + } + + /* Create a FAT filesystem on the ramdisk */ + + ret = mkfatfs(g_source, &g_fmt); + if (ret < 0) + { + printf("create_ramdisk: Failed to create FAT filesystem on ramdisk at %s\n", + g_source); + /* free(pbuffer); -- RAM disk is registered */ + return ret; + } + + return 0; +} diff --git a/nuttx/configs/ea3152/src/up_usbstrg.c b/nuttx/configs/ea3152/src/up_usbstrg.c deleted file mode 100644 index 9f3a9bf3f..000000000 --- a/nuttx/configs/ea3152/src/up_usbstrg.c +++ /dev/null @@ -1,126 +0,0 @@ -/**************************************************************************** - * configs/ea3152/src/up_usbstrg.c - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Configure and register the SAM3U MMC/SD SDIO block driver. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include - -#include -#include -#include - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 -# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0 -#endif - -#ifndef CONFIG_EXAMPLES_USBSTRG_DEVPATH1 -# define CONFIG_EXAMPLES_USBSTRG_DEVPATH1 "/dev/ram" -#endif - -static const char g_source[] = CONFIG_EXAMPLES_USBSTRG_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) - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: usbstrg_archinitialize - * - * Description: - * Perform architecture specific initialization - * - ****************************************************************************/ - -int usbstrg_archinitialize(void) -{ - uint8_t *pbuffer; - int ret; - - pbuffer = (uint8_t *) malloc (BUFFER_SIZE); - if (!pbuffer) - { - lib_lowprintf ("usbstrg_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, - pbuffer, - USBSTRG_NSECTORS, - USBSTRG_SECTORSIZE, - true); - if (ret < 0) - { - printf("create_ramdisk: Failed to register ramdisk at %s: %d\n", - g_source, -ret); - free(pbuffer); - return ret; - } - - /* Create a FAT filesystem on the ramdisk */ - - ret = mkfatfs(g_source, &g_fmt); - if (ret < 0) - { - printf("create_ramdisk: Failed to create FAT filesystem on ramdisk at %s\n", - g_source); - /* free(pbuffer); -- RAM disk is registered */ - return ret; - } - - return 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 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_usbmsc.c b/nuttx/configs/hymini-stm32v/src/up_usbmsc.c new file mode 100644 index 000000000..1ce55adcc --- /dev/null +++ b/nuttx/configs/hymini-stm32v/src/up_usbmsc.c @@ -0,0 +1,164 @@ +/**************************************************************************** + * configs/hymini-stm32v/src/up_usbmsc.c + * + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Configure and register the STM32 MMC/SD SDIO block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "stm32_internal.h" + +/* There is nothing to do here if SDIO support is not selected. */ + +#ifdef CONFIG_STM32_SDIO + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 +# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#endif + +/* SLOT number(s) could depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_HYMINI_STM32V +# undef STM32_MMCSDSLOTNO +# define STM32_MMCSDSLOTNO 0 +#else + /* Add configuration for new STM32 boards here */ +# error "Unrecognized STM32 board" +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# define msgflush() +# else +# define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# define msgflush() +# else +# define message printf +# define msgflush() fflush(stdout) +# endif +#endif + + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbmsc_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int usbmsc_archinitialize(void) +{ + /* 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_USBMSC_BUILTIN + FAR struct sdio_dev_s *sdio; + int ret; + + /* First, get an instance of the SDIO interface */ + + message("usbmsc_archinitialize: " + "Initializing SDIO slot %d\n", + STM32_MMCSDSLOTNO); + + sdio = sdio_initialize(STM32_MMCSDSLOTNO); + if (!sdio) + { + 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("usbmsc_archinitialize: " + "Bind SDIO to the MMC/SD driver, minor=%d\n", + CONFIG_EXAMPLES_USBMSC_DEVMINOR1); + + ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, sdio); + if (ret != OK) + { + message("usbmsc_archinitialize: " + "Failed to bind SDIO to the MMC/SD driver: %d\n", + ret); + return ret; + } + 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 + * see if the Hy-Mini STM32v board supports a GPIO to detect if there is a card in + * the slot. + */ + + sdio_mediachange(sdio, true); + +#endif /* CONFIG_EXAMPLES_USBMSC_BUILTIN */ + + return OK; +} + +#endif /* CONFIG_STM32_SDIO */ diff --git a/nuttx/configs/hymini-stm32v/src/up_usbstrg.c b/nuttx/configs/hymini-stm32v/src/up_usbstrg.c deleted file mode 100644 index 8a309c270..000000000 --- a/nuttx/configs/hymini-stm32v/src/up_usbstrg.c +++ /dev/null @@ -1,164 +0,0 @@ -/**************************************************************************** - * configs/hymini-stm32v/src/up_usbstrg.c - * - * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Configure and register the STM32 MMC/SD SDIO block driver. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "stm32_internal.h" - -/* There is nothing to do here if SDIO support is not selected. */ - -#ifdef CONFIG_STM32_SDIO - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 -# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0 -#endif - -/* SLOT number(s) could depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_HYMINI_STM32V -# undef STM32_MMCSDSLOTNO -# define STM32_MMCSDSLOTNO 0 -#else - /* Add configuration for new STM32 boards here */ -# error "Unrecognized STM32 board" -#endif - -/* Debug ********************************************************************/ - -#ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG -# define message(...) lib_lowprintf(__VA_ARGS__) -# define msgflush() -# else -# define message(...) printf(__VA_ARGS__) -# define msgflush() fflush(stdout) -# endif -#else -# ifdef CONFIG_DEBUG -# define message lib_lowprintf -# define msgflush() -# else -# define message printf -# define msgflush() fflush(stdout) -# endif -#endif - - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: usbstrg_archinitialize - * - * Description: - * Perform architecture specific initialization - * - ****************************************************************************/ - -int usbstrg_archinitialize(void) -{ - /* If examples/usbstrg 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 - FAR struct sdio_dev_s *sdio; - int ret; - - /* First, get an instance of the SDIO interface */ - - message("usbstrg_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", - STM32_MMCSDSLOTNO); - return -ENODEV; - } - - /* Now bind the SDIO interface to the MMC/SD driver */ - - message("usbstrg_archinitialize: " - "Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_EXAMPLES_USBSTRG_DEVMINOR1); - - ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, sdio); - if (ret != OK) - { - message("usbstrg_archinitialize: " - "Failed to bind SDIO to the MMC/SD driver: %d\n", - ret); - return ret; - } - message("usbstrg_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 - * see if the Hy-Mini STM32v board supports a GPIO to detect if there is a card in - * the slot. - */ - - sdio_mediachange(sdio, true); - -#endif /* CONFIG_EXAMPLES_USBSTRG_BUILTIN */ - - return OK; -} - -#endif /* CONFIG_STM32_SDIO */ 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_usbmsc.c b/nuttx/configs/kwikstik-k40/src/up_usbmsc.c new file mode 100755 index 000000000..378295cfa --- /dev/null +++ b/nuttx/configs/kwikstik-k40/src/up_usbmsc.c @@ -0,0 +1,118 @@ +/**************************************************************************** + * configs/kwikstik-k40/src/up_usbmsc.c + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Configure and register the Kinetis MMC/SD block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "kinetis_internal.h" + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 +# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#endif + +/* SLOT number(s) could depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_KWIKSTIK_K40 +# undef KINETIS_MMCSDSLOTNO +# define KINETIS_MMCSDSLOTNO 0 +#else + /* Add configuration for new Kinetis boards here */ +# error "Unrecognized Kinetis board" +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# define msgflush() +# else +# define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# define msgflush() +# else +# define message printf +# define msgflush() fflush(stdout) +# endif +#endif + + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbmsc_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int usbmsc_archinitialize(void) +{ + /* 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_USBMSC_BUILTIN +# warning "Missing logic" +#endif /* CONFIG_EXAMPLES_USBMSC_BUILTIN */ + + return OK; +} diff --git a/nuttx/configs/kwikstik-k40/src/up_usbstrg.c b/nuttx/configs/kwikstik-k40/src/up_usbstrg.c deleted file mode 100755 index d5dcebf7a..000000000 --- a/nuttx/configs/kwikstik-k40/src/up_usbstrg.c +++ /dev/null @@ -1,118 +0,0 @@ -/**************************************************************************** - * configs/kwikstik-k40/src/up_usbstrg.c - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Configure and register the Kinetis MMC/SD block driver. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "kinetis_internal.h" - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 -# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0 -#endif - -/* SLOT number(s) could depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_KWIKSTIK_K40 -# undef KINETIS_MMCSDSLOTNO -# define KINETIS_MMCSDSLOTNO 0 -#else - /* Add configuration for new Kinetis boards here */ -# error "Unrecognized Kinetis board" -#endif - -/* Debug ********************************************************************/ - -#ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG -# define message(...) lib_lowprintf(__VA_ARGS__) -# define msgflush() -# else -# define message(...) printf(__VA_ARGS__) -# define msgflush() fflush(stdout) -# endif -#else -# ifdef CONFIG_DEBUG -# define message lib_lowprintf -# define msgflush() -# else -# define message printf -# define msgflush() fflush(stdout) -# endif -#endif - - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: usbstrg_archinitialize - * - * Description: - * Perform architecture specific initialization - * - ****************************************************************************/ - -int usbstrg_archinitialize(void) -{ - /* If examples/usbstrg 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 -# warning "Missing logic" -#endif /* CONFIG_EXAMPLES_USBSTRG_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_usbmsc.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c new file mode 100755 index 000000000..d36880122 --- /dev/null +++ b/nuttx/configs/lpcxpresso-lpc1768/src/up_usbmsc.c @@ -0,0 +1,143 @@ +/**************************************************************************** + * configs/lpcxpresso-lpc1768/src/up_usbmsc.c + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Configure and register the LPC17xx MMC/SD SPI block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 +# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#endif + +/* PORT and SLOT number probably depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_LPCXPRESSO +# undef LPC17XX_MMCSDSPIPORTNO +# define LPC17XX_MMCSDSPIPORTNO 1 +# undef LPC17XX_MMCSDSLOTNO +# define LPC17XX_MMCSDSLOTNO 0 +#else + /* Add configuration for new LPC17xx boards here */ +# error "Unrecognized LPC17xx board" +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# define msgflush() +# else +# define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# define msgflush() +# else +# define message printf +# define msgflush() fflush(stdout) +# endif +#endif + + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbmsc_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int usbmsc_archinitialize(void) +{ + FAR struct spi_dev_s *spi; + int ret; + + /* Get the SPI port */ + + message("usbmsc_archinitialize: Initializing SPI port %d\n", + LPC17XX_MMCSDSPIPORTNO); + + spi = up_spiinitialize(LPC17XX_MMCSDSPIPORTNO); + if (!spi) + { + message("usbmsc_archinitialize: Failed to initialize SPI port %d\n", + LPC17XX_MMCSDSPIPORTNO); + return -ENODEV; + } + + message("usbmsc_archinitialize: Successfully initialized SPI port %d\n", + LPC17XX_MMCSDSPIPORTNO); + + /* Bind the SPI port to the slot */ + + message("usbmsc_archinitialize: Binding SPI port %d to MMC/SD slot %d\n", + LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO); + + ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi); + if (ret < 0) + { + message("usbmsc_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", + LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO, ret); + return ret; + } + + 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/src/up_usbstrg.c b/nuttx/configs/lpcxpresso-lpc1768/src/up_usbstrg.c deleted file mode 100755 index 04911d657..000000000 --- a/nuttx/configs/lpcxpresso-lpc1768/src/up_usbstrg.c +++ /dev/null @@ -1,143 +0,0 @@ -/**************************************************************************** - * configs/lpcxpresso-lpc1768/src/up_usbstrg.c - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Configure and register the LPC17xx MMC/SD SPI block driver. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 -# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0 -#endif - -/* PORT and SLOT number probably depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_LPCXPRESSO -# undef LPC17XX_MMCSDSPIPORTNO -# define LPC17XX_MMCSDSPIPORTNO 1 -# undef LPC17XX_MMCSDSLOTNO -# define LPC17XX_MMCSDSLOTNO 0 -#else - /* Add configuration for new LPC17xx boards here */ -# error "Unrecognized LPC17xx board" -#endif - -/* Debug ********************************************************************/ - -#ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG -# define message(...) lib_lowprintf(__VA_ARGS__) -# define msgflush() -# else -# define message(...) printf(__VA_ARGS__) -# define msgflush() fflush(stdout) -# endif -#else -# ifdef CONFIG_DEBUG -# define message lib_lowprintf -# define msgflush() -# else -# define message printf -# define msgflush() fflush(stdout) -# endif -#endif - - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: usbstrg_archinitialize - * - * Description: - * Perform architecture specific initialization - * - ****************************************************************************/ - -int usbstrg_archinitialize(void) -{ - FAR struct spi_dev_s *spi; - int ret; - - /* Get the SPI port */ - - message("usbstrg_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", - LPC17XX_MMCSDSPIPORTNO); - return -ENODEV; - } - - message("usbstrg_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", - LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO); - - ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi); - if (ret < 0) - { - message("usbstrg_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", - 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_usbmsc.c b/nuttx/configs/mcu123-lpc214x/src/up_usbmsc.c new file mode 100755 index 000000000..f25486d89 --- /dev/null +++ b/nuttx/configs/mcu123-lpc214x/src/up_usbmsc.c @@ -0,0 +1,143 @@ +/**************************************************************************** + * configs/mcu123-lpc214x/src/up_usbmsc.c + * + * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Configure and register the LPC214x MMC/SD SPI block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 +# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#endif + +/* PORT and SLOT number probably depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_MCU123 +# undef LPC214X_MMCSDSPIPORTNO +# define LPC214X_MMCSDSPIPORTNO 1 +# undef LPC214X_MMCSDSLOTNO +# define LPC214X_MMCSDSLOTNO 0 +#else + /* Add configuration for new LPC214x boards here */ +# error "Unrecognized LPC214x board" +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# define msgflush() +# else +# define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# define msgflush() +# else +# define message printf +# define msgflush() fflush(stdout) +# endif +#endif + + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbmsc_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int usbmsc_archinitialize(void) +{ + FAR struct spi_dev_s *spi; + int ret; + + /* Get the SPI port */ + + message("usbmsc_archinitialize: Initializing SPI port %d\n", + LPC214X_MMCSDSPIPORTNO); + + spi = up_spiinitialize(LPC214X_MMCSDSPIPORTNO); + if (!spi) + { + message("usbmsc_archinitialize: Failed to initialize SPI port %d\n", + LPC214X_MMCSDSPIPORTNO); + return -ENODEV; + } + + message("usbmsc_archinitialize: Successfully initialized SPI port %d\n", + LPC214X_MMCSDSPIPORTNO); + + /* Bind the SPI port to the slot */ + + message("usbmsc_archinitialize: Binding SPI port %d to MMC/SD slot %d\n", + LPC214X_MMCSDSPIPORTNO, LPC214X_MMCSDSLOTNO); + + ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, LPC214X_MMCSDSLOTNO, spi); + if (ret < 0) + { + message("usbmsc_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", + LPC214X_MMCSDSPIPORTNO, LPC214X_MMCSDSLOTNO, ret); + return ret; + } + + 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/src/up_usbstrg.c b/nuttx/configs/mcu123-lpc214x/src/up_usbstrg.c deleted file mode 100755 index c34a76cc0..000000000 --- a/nuttx/configs/mcu123-lpc214x/src/up_usbstrg.c +++ /dev/null @@ -1,143 +0,0 @@ -/**************************************************************************** - * configs/mcu123-lpc214x/src/up_usbstrg.c - * - * Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Configure and register the LPC214x MMC/SD SPI block driver. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 -# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0 -#endif - -/* PORT and SLOT number probably depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_MCU123 -# undef LPC214X_MMCSDSPIPORTNO -# define LPC214X_MMCSDSPIPORTNO 1 -# undef LPC214X_MMCSDSLOTNO -# define LPC214X_MMCSDSLOTNO 0 -#else - /* Add configuration for new LPC214x boards here */ -# error "Unrecognized LPC214x board" -#endif - -/* Debug ********************************************************************/ - -#ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG -# define message(...) lib_lowprintf(__VA_ARGS__) -# define msgflush() -# else -# define message(...) printf(__VA_ARGS__) -# define msgflush() fflush(stdout) -# endif -#else -# ifdef CONFIG_DEBUG -# define message lib_lowprintf -# define msgflush() -# else -# define message printf -# define msgflush() fflush(stdout) -# endif -#endif - - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: usbstrg_archinitialize - * - * Description: - * Perform architecture specific initialization - * - ****************************************************************************/ - -int usbstrg_archinitialize(void) -{ - FAR struct spi_dev_s *spi; - int ret; - - /* Get the SPI port */ - - message("usbstrg_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", - LPC214X_MMCSDSPIPORTNO); - return -ENODEV; - } - - message("usbstrg_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", - LPC214X_MMCSDSPIPORTNO, LPC214X_MMCSDSLOTNO); - - ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, LPC214X_MMCSDSLOTNO, spi); - if (ret < 0) - { - message("usbstrg_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", - 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_usbmsc.c b/nuttx/configs/nucleus2g/src/up_usbmsc.c new file mode 100755 index 000000000..c3d074b54 --- /dev/null +++ b/nuttx/configs/nucleus2g/src/up_usbmsc.c @@ -0,0 +1,143 @@ +/**************************************************************************** + * configs/nucleus2g/src/up_usbmsc.c + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Configure and register the LPC17xx MMC/SD SPI block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 +# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#endif + +/* PORT and SLOT number probably depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_NUCLEUS2G +# undef LPC17XX_MMCSDSPIPORTNO +# define LPC17XX_MMCSDSPIPORTNO 1 +# undef LPC17XX_MMCSDSLOTNO +# define LPC17XX_MMCSDSLOTNO 0 +#else + /* Add configuration for new LPC17xx boards here */ +# error "Unrecognized LPC17xx board" +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# define msgflush() +# else +# define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# define msgflush() +# else +# define message printf +# define msgflush() fflush(stdout) +# endif +#endif + + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbmsc_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int usbmsc_archinitialize(void) +{ + FAR struct spi_dev_s *spi; + int ret; + + /* Get the SPI port */ + + message("usbmsc_archinitialize: Initializing SPI port %d\n", + LPC17XX_MMCSDSPIPORTNO); + + spi = up_spiinitialize(LPC17XX_MMCSDSPIPORTNO); + if (!spi) + { + message("usbmsc_archinitialize: Failed to initialize SPI port %d\n", + LPC17XX_MMCSDSPIPORTNO); + return -ENODEV; + } + + message("usbmsc_archinitialize: Successfully initialized SPI port %d\n", + LPC17XX_MMCSDSPIPORTNO); + + /* Bind the SPI port to the slot */ + + message("usbmsc_archinitialize: Binding SPI port %d to MMC/SD slot %d\n", + LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO); + + ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi); + if (ret < 0) + { + message("usbmsc_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", + LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO, ret); + return ret; + } + + 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/src/up_usbstrg.c b/nuttx/configs/nucleus2g/src/up_usbstrg.c deleted file mode 100755 index 849611440..000000000 --- a/nuttx/configs/nucleus2g/src/up_usbstrg.c +++ /dev/null @@ -1,143 +0,0 @@ -/**************************************************************************** - * configs/nucleus2g/src/up_usbstrg.c - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Configure and register the LPC17xx MMC/SD SPI block driver. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 -# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0 -#endif - -/* PORT and SLOT number probably depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_NUCLEUS2G -# undef LPC17XX_MMCSDSPIPORTNO -# define LPC17XX_MMCSDSPIPORTNO 1 -# undef LPC17XX_MMCSDSLOTNO -# define LPC17XX_MMCSDSLOTNO 0 -#else - /* Add configuration for new LPC17xx boards here */ -# error "Unrecognized LPC17xx board" -#endif - -/* Debug ********************************************************************/ - -#ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG -# define message(...) lib_lowprintf(__VA_ARGS__) -# define msgflush() -# else -# define message(...) printf(__VA_ARGS__) -# define msgflush() fflush(stdout) -# endif -#else -# ifdef CONFIG_DEBUG -# define message lib_lowprintf -# define msgflush() -# else -# define message printf -# define msgflush() fflush(stdout) -# endif -#endif - - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: usbstrg_archinitialize - * - * Description: - * Perform architecture specific initialization - * - ****************************************************************************/ - -int usbstrg_archinitialize(void) -{ - FAR struct spi_dev_s *spi; - int ret; - - /* Get the SPI port */ - - message("usbstrg_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", - LPC17XX_MMCSDSPIPORTNO); - return -ENODEV; - } - - message("usbstrg_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", - LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO); - - ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi); - if (ret < 0) - { - message("usbstrg_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", - 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_usbmsc.c b/nuttx/configs/olimex-lpc1766stk/src/up_usbmsc.c new file mode 100755 index 000000000..b92a9dc9e --- /dev/null +++ b/nuttx/configs/olimex-lpc1766stk/src/up_usbmsc.c @@ -0,0 +1,156 @@ +/**************************************************************************** + * configs/olimex-lpc1766stk/src/up_usbmsc.c + * + * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Configure and register the LPC17xx MMC/SD SPI block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "lpc17_internal.h" +#include "lpc1766stk_internal.h" + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 +# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#endif + +/* PORT and SLOT number probably depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_LPC1766STK +# undef LPC17XX_MMCSDSPIPORTNO +# define LPC17XX_MMCSDSPIPORTNO 1 +# undef LPC17XX_MMCSDSLOTNO +# define LPC17XX_MMCSDSLOTNO 0 +#else + /* Add configuration for new LPC17xx boards here */ +# error "Unrecognized LPC17xx board" +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# define msgflush() +# else +# define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# define msgflush() +# else +# define message printf +# define msgflush() fflush(stdout) +# endif +#endif + + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbmsc_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int usbmsc_archinitialize(void) +{ + FAR struct spi_dev_s *spi; + int ret; + + /* Enable power to the SD/MMC via a GPIO. LOW enables SD/MMC. */ + + lpc17_gpiowrite(LPC1766STK_MMC_PWR, false); + + /* Get the SPI port */ + + message("usbmsc_archinitialize: Initializing SPI port %d\n", + LPC17XX_MMCSDSPIPORTNO); + + spi = up_spiinitialize(LPC17XX_MMCSDSPIPORTNO); + if (!spi) + { + message("usbmsc_archinitialize: Failed to initialize SPI port %d\n", + LPC17XX_MMCSDSPIPORTNO); + ret = -ENODEV; + goto errout; + } + + message("usbmsc_archinitialize: Successfully initialized SPI port %d\n", + LPC17XX_MMCSDSPIPORTNO); + + /* Bind the SPI port to the slot */ + + message("usbmsc_archinitialize: Binding SPI port %d to MMC/SD slot %d\n", + LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO); + + ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi); + if (ret < 0) + { + message("usbmsc_archinitialize: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", + LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO, ret); + goto errout; + } + + message("usbmsc_archinitialize: Successfuly bound SPI port %d to MMC/SD slot %d\n", + LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO); + return OK; + + /* Disable power to the SD/MMC via a GPIO. HIGH disables SD/MMC. */ + +errout: + lpc17_gpiowrite(LPC1766STK_MMC_PWR, true); + return ret;} diff --git a/nuttx/configs/olimex-lpc1766stk/src/up_usbstrg.c b/nuttx/configs/olimex-lpc1766stk/src/up_usbstrg.c deleted file mode 100755 index c524831fb..000000000 --- a/nuttx/configs/olimex-lpc1766stk/src/up_usbstrg.c +++ /dev/null @@ -1,156 +0,0 @@ -/**************************************************************************** - * configs/olimex-lpc1766stk/src/up_usbstrg.c - * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Configure and register the LPC17xx MMC/SD SPI block driver. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "lpc17_internal.h" -#include "lpc1766stk_internal.h" - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 -# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0 -#endif - -/* PORT and SLOT number probably depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_LPC1766STK -# undef LPC17XX_MMCSDSPIPORTNO -# define LPC17XX_MMCSDSPIPORTNO 1 -# undef LPC17XX_MMCSDSLOTNO -# define LPC17XX_MMCSDSLOTNO 0 -#else - /* Add configuration for new LPC17xx boards here */ -# error "Unrecognized LPC17xx board" -#endif - -/* Debug ********************************************************************/ - -#ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG -# define message(...) lib_lowprintf(__VA_ARGS__) -# define msgflush() -# else -# define message(...) printf(__VA_ARGS__) -# define msgflush() fflush(stdout) -# endif -#else -# ifdef CONFIG_DEBUG -# define message lib_lowprintf -# define msgflush() -# else -# define message printf -# define msgflush() fflush(stdout) -# endif -#endif - - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: usbstrg_archinitialize - * - * Description: - * Perform architecture specific initialization - * - ****************************************************************************/ - -int usbstrg_archinitialize(void) -{ - FAR struct spi_dev_s *spi; - int ret; - - /* Enable power to the SD/MMC via a GPIO. LOW enables SD/MMC. */ - - lpc17_gpiowrite(LPC1766STK_MMC_PWR, false); - - /* Get the SPI port */ - - message("usbstrg_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", - LPC17XX_MMCSDSPIPORTNO); - ret = -ENODEV; - goto errout; - } - - message("usbstrg_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", - LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO); - - ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, LPC17XX_MMCSDSLOTNO, spi); - if (ret < 0) - { - message("usbstrg_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", - LPC17XX_MMCSDSPIPORTNO, LPC17XX_MMCSDSLOTNO); - return OK; - - /* Disable power to the SD/MMC via a GPIO. HIGH disables SD/MMC. */ - -errout: - lpc17_gpiowrite(LPC1766STK_MMC_PWR, true); - return ret;} 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_usbmsc.c b/nuttx/configs/sam3u-ek/src/up_usbmsc.c new file mode 100644 index 000000000..8f2e4b254 --- /dev/null +++ b/nuttx/configs/sam3u-ek/src/up_usbmsc.c @@ -0,0 +1,152 @@ +/**************************************************************************** + * configs/sam3u-ek/src/up_usbmsc.c + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Configure and register the SAM3U MMC/SD SDIO block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "sam3u_internal.h" + +#ifdef CONFIG_SAM3U_SDIO + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 +# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#endif + +/* SLOT number(s) could depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_SAM3U10E_EVAL +# undef SAM3U_MMCSDSLOTNO +# define SAM3U_MMCSDSLOTNO 0 +#else + /* Add configuration for new SAM3U boards here */ +# error "Unrecognized SAM3U board" +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# define msgflush() +# else +# define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# define msgflush() +# else +# define message printf +# define msgflush() fflush(stdout) +# endif +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbmsc_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int usbmsc_archinitialize(void) +{ + FAR struct sdio_dev_s *sdio; + int ret; + + /* First, get an instance of the SDIO interface */ + + message("usbmsc_archinitialize: " + "Initializing SDIO slot %d\n", + SAM3U_MMCSDSLOTNO); + + sdio = sdio_initialize(SAM3U_MMCSDSLOTNO); + if (!sdio) + { + 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("usbmsc_archinitialize: " + "Bind SDIO to the MMC/SD driver, minor=%d\n", + CONFIG_EXAMPLES_USBMSC_DEVMINOR1); + + ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, sdio); + if (ret != OK) + { + message("usbmsc_archinitialize: " + "Failed to bind SDIO to the MMC/SD driver: %d\n", + ret); + return ret; + } + 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 + * see if the SAM3U10E-EVAL board supports a GPIO to detect if there is a card in + * the slot. + */ + + sdio_mediachange(sdio, true); + return OK; +} + +#endif /* CONFIG_SAM3U_SDIO */ diff --git a/nuttx/configs/sam3u-ek/src/up_usbstrg.c b/nuttx/configs/sam3u-ek/src/up_usbstrg.c deleted file mode 100644 index e758e3b91..000000000 --- a/nuttx/configs/sam3u-ek/src/up_usbstrg.c +++ /dev/null @@ -1,152 +0,0 @@ -/**************************************************************************** - * configs/sam3u-ek/src/up_usbstrg.c - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Configure and register the SAM3U MMC/SD SDIO block driver. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "sam3u_internal.h" - -#ifdef CONFIG_SAM3U_SDIO - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 -# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0 -#endif - -/* SLOT number(s) could depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_SAM3U10E_EVAL -# undef SAM3U_MMCSDSLOTNO -# define SAM3U_MMCSDSLOTNO 0 -#else - /* Add configuration for new SAM3U boards here */ -# error "Unrecognized SAM3U board" -#endif - -/* Debug ********************************************************************/ - -#ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG -# define message(...) lib_lowprintf(__VA_ARGS__) -# define msgflush() -# else -# define message(...) printf(__VA_ARGS__) -# define msgflush() fflush(stdout) -# endif -#else -# ifdef CONFIG_DEBUG -# define message lib_lowprintf -# define msgflush() -# else -# define message printf -# define msgflush() fflush(stdout) -# endif -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: usbstrg_archinitialize - * - * Description: - * Perform architecture specific initialization - * - ****************************************************************************/ - -int usbstrg_archinitialize(void) -{ - FAR struct sdio_dev_s *sdio; - int ret; - - /* First, get an instance of the SDIO interface */ - - message("usbstrg_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", - SAM3U_MMCSDSLOTNO); - return -ENODEV; - } - - /* Now bind the SPI interface to the MMC/SD driver */ - - message("usbstrg_archinitialize: " - "Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_EXAMPLES_USBSTRG_DEVMINOR1); - - ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, sdio); - if (ret != OK) - { - message("usbstrg_archinitialize: " - "Failed to bind SDIO to the MMC/SD driver: %d\n", - ret); - return ret; - } - message("usbstrg_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 - * see if the SAM3U10E-EVAL board supports a GPIO to detect if there is a card in - * the slot. - */ - - sdio_mediachange(sdio, true); - return OK; -} - -#endif /* CONFIG_SAM3U_SDIO */ 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 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_usbmsc.c b/nuttx/configs/stm3210e-eval/src/up_usbmsc.c new file mode 100644 index 000000000..4f788579c --- /dev/null +++ b/nuttx/configs/stm3210e-eval/src/up_usbmsc.c @@ -0,0 +1,164 @@ +/**************************************************************************** + * configs/stm3210e-eval/src/up_usbmsc.c + * + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Configure and register the STM32 MMC/SD SDIO block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "stm32_internal.h" + +/* There is nothing to do here if SDIO support is not selected. */ + +#ifdef CONFIG_STM32_SDIO + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 +# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#endif + +/* SLOT number(s) could depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_STM3210E_EVAL +# undef STM32_MMCSDSLOTNO +# define STM32_MMCSDSLOTNO 0 +#else + /* Add configuration for new STM32 boards here */ +# error "Unrecognized STM32 board" +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# define msgflush() +# else +# define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# define msgflush() +# else +# define message printf +# define msgflush() fflush(stdout) +# endif +#endif + + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbmsc_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int usbmsc_archinitialize(void) +{ + /* 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_USBMSC_BUILTIN + FAR struct sdio_dev_s *sdio; + int ret; + + /* First, get an instance of the SDIO interface */ + + message("usbmsc_archinitialize: " + "Initializing SDIO slot %d\n", + STM32_MMCSDSLOTNO); + + sdio = sdio_initialize(STM32_MMCSDSLOTNO); + if (!sdio) + { + 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("usbmsc_archinitialize: " + "Bind SDIO to the MMC/SD driver, minor=%d\n", + CONFIG_EXAMPLES_USBMSC_DEVMINOR1); + + ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, sdio); + if (ret != OK) + { + message("usbmsc_archinitialize: " + "Failed to bind SDIO to the MMC/SD driver: %d\n", + ret); + return ret; + } + 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 + * see if the STM3210E-EVAL board supports a GPIO to detect if there is a card in + * the slot. + */ + + sdio_mediachange(sdio, true); + +#endif /* CONFIG_EXAMPLES_USBMSC_BUILTIN */ + + return OK; +} + +#endif /* CONFIG_STM32_SDIO */ diff --git a/nuttx/configs/stm3210e-eval/src/up_usbstrg.c b/nuttx/configs/stm3210e-eval/src/up_usbstrg.c deleted file mode 100644 index f7ba205cc..000000000 --- a/nuttx/configs/stm3210e-eval/src/up_usbstrg.c +++ /dev/null @@ -1,164 +0,0 @@ -/**************************************************************************** - * configs/stm3210e-eval/src/up_usbstrg.c - * - * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Configure and register the STM32 MMC/SD SDIO block driver. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "stm32_internal.h" - -/* There is nothing to do here if SDIO support is not selected. */ - -#ifdef CONFIG_STM32_SDIO - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 -# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0 -#endif - -/* SLOT number(s) could depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_STM3210E_EVAL -# undef STM32_MMCSDSLOTNO -# define STM32_MMCSDSLOTNO 0 -#else - /* Add configuration for new STM32 boards here */ -# error "Unrecognized STM32 board" -#endif - -/* Debug ********************************************************************/ - -#ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG -# define message(...) lib_lowprintf(__VA_ARGS__) -# define msgflush() -# else -# define message(...) printf(__VA_ARGS__) -# define msgflush() fflush(stdout) -# endif -#else -# ifdef CONFIG_DEBUG -# define message lib_lowprintf -# define msgflush() -# else -# define message printf -# define msgflush() fflush(stdout) -# endif -#endif - - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: usbstrg_archinitialize - * - * Description: - * Perform architecture specific initialization - * - ****************************************************************************/ - -int usbstrg_archinitialize(void) -{ - /* If examples/usbstrg 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 - FAR struct sdio_dev_s *sdio; - int ret; - - /* First, get an instance of the SDIO interface */ - - message("usbstrg_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", - STM32_MMCSDSLOTNO); - return -ENODEV; - } - - /* Now bind the SDIO interface to the MMC/SD driver */ - - message("usbstrg_archinitialize: " - "Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_EXAMPLES_USBSTRG_DEVMINOR1); - - ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, sdio); - if (ret != OK) - { - message("usbstrg_archinitialize: " - "Failed to bind SDIO to the MMC/SD driver: %d\n", - ret); - return ret; - } - message("usbstrg_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 - * see if the STM3210E-EVAL board supports a GPIO to detect if there is a card in - * the slot. - */ - - sdio_mediachange(sdio, true); - -#endif /* CONFIG_EXAMPLES_USBSTRG_BUILTIN */ - - return OK; -} - -#endif /* CONFIG_STM32_SDIO */ 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_usbmsc.c b/nuttx/configs/teensy/src/up_usbmsc.c new file mode 100755 index 000000000..7eb3307c6 --- /dev/null +++ b/nuttx/configs/teensy/src/up_usbmsc.c @@ -0,0 +1,137 @@ +/**************************************************************************** + * configs/teensy/src/up_usbmsc.c + * arch/arm/src/board/up_usbmsc.c + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Configure and register the AVR MMC/SD SPI block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "at90usb_internal.h" +#include "teensy_internal.h" + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 +# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#endif + +/* PORT and SLOT number probably depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_TEENSY +# undef AVR_MMCSDSPIPORTNO +# define AVR_MMCSDSPIPORTNO 0 +# undef AVR_MMCSDSLOTNO +# define AVR_MMCSDSLOTNO 0 +#else + /* Add configuration for new AVR boards here */ +# error "Unrecognized AVR board" +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# define msgflush() +# else +# define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# define msgflush() +# else +# define message printf +# define msgflush() fflush(stdout) +# endif +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbmsc_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int usbmsc_archinitialize(void) +{ + FAR struct spi_dev_s *spi; + int ret; + + /* Get the SPI port */ + + message("Initializing SPI port\n"); + + spi = up_spiinitialize(AVR_MMCSDSPIPORTNO); + if (!spi) + { + message("up_spiinitialize failed\n"); + return -ENODEV; + } + + /* Bind the SPI port to the slot */ + + message("Binding SPI port to MMC/SD slot\n"); + + ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, AVR_MMCSDSLOTNO, spi); + if (ret < 0) + { + message("mmcsd_spislotinitialize failed: %d\n", ret); + return ret; + } + + return OK; +} diff --git a/nuttx/configs/teensy/src/up_usbstrg.c b/nuttx/configs/teensy/src/up_usbstrg.c deleted file mode 100755 index acc8cb071..000000000 --- a/nuttx/configs/teensy/src/up_usbstrg.c +++ /dev/null @@ -1,137 +0,0 @@ -/**************************************************************************** - * configs/teensy/src/up_usbstrg.c - * arch/arm/src/board/up_usbstrg.c - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Configure and register the AVR MMC/SD SPI block driver. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "at90usb_internal.h" -#include "teensy_internal.h" - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 -# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0 -#endif - -/* PORT and SLOT number probably depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_TEENSY -# undef AVR_MMCSDSPIPORTNO -# define AVR_MMCSDSPIPORTNO 0 -# undef AVR_MMCSDSLOTNO -# define AVR_MMCSDSLOTNO 0 -#else - /* Add configuration for new AVR boards here */ -# error "Unrecognized AVR board" -#endif - -/* Debug ********************************************************************/ - -#ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG -# define message(...) lib_lowprintf(__VA_ARGS__) -# define msgflush() -# else -# define message(...) printf(__VA_ARGS__) -# define msgflush() fflush(stdout) -# endif -#else -# ifdef CONFIG_DEBUG -# define message lib_lowprintf -# define msgflush() -# else -# define message printf -# define msgflush() fflush(stdout) -# endif -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: usbstrg_archinitialize - * - * Description: - * Perform architecture specific initialization - * - ****************************************************************************/ - -int usbstrg_archinitialize(void) -{ - FAR struct spi_dev_s *spi; - int ret; - - /* Get the SPI port */ - - message("Initializing SPI port\n"); - - spi = up_spiinitialize(AVR_MMCSDSPIPORTNO); - if (!spi) - { - message("up_spiinitialize failed\n"); - return -ENODEV; - } - - /* Bind the SPI port to the slot */ - - message("Binding SPI port to MMC/SD slot\n"); - - ret = mmcsd_spislotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, AVR_MMCSDSLOTNO, spi); - if (ret < 0) - { - message("mmcsd_spislotinitialize failed: %d\n", ret); - return ret; - } - - return OK; -} 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_usbmsc.c b/nuttx/configs/twr-k60n512/src/up_usbmsc.c new file mode 100644 index 000000000..bebedd02f --- /dev/null +++ b/nuttx/configs/twr-k60n512/src/up_usbmsc.c @@ -0,0 +1,118 @@ +/**************************************************************************** + * configs/twr-k60n512/src/up_usbmsc.c + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Configure and register the Kinetis MMC/SD block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "kinetis_internal.h" + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 +# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#endif + +/* SLOT number(s) could depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_TWR_K60N512 +# undef KINETIS_MMCSDSLOTNO +# define KINETIS_MMCSDSLOTNO 0 +#else + /* Add configuration for new Kinetis boards here */ +# error "Unrecognized Kinetis board" +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# define msgflush() +# else +# define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# define msgflush() +# else +# define message printf +# define msgflush() fflush(stdout) +# endif +#endif + + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbmsc_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int usbmsc_archinitialize(void) +{ + /* 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_USBMSC_BUILTIN +# warning "Missing logic" +#endif /* CONFIG_EXAMPLES_USBMSC_BUILTIN */ + + return OK; +} diff --git a/nuttx/configs/twr-k60n512/src/up_usbstrg.c b/nuttx/configs/twr-k60n512/src/up_usbstrg.c deleted file mode 100644 index cdc373205..000000000 --- a/nuttx/configs/twr-k60n512/src/up_usbstrg.c +++ /dev/null @@ -1,118 +0,0 @@ -/**************************************************************************** - * configs/twr-k60n512/src/up_usbstrg.c - * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * Configure and register the Kinetis MMC/SD block driver. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "kinetis_internal.h" - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 -# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0 -#endif - -/* SLOT number(s) could depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_TWR_K60N512 -# undef KINETIS_MMCSDSLOTNO -# define KINETIS_MMCSDSLOTNO 0 -#else - /* Add configuration for new Kinetis boards here */ -# error "Unrecognized Kinetis board" -#endif - -/* Debug ********************************************************************/ - -#ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG -# define message(...) lib_lowprintf(__VA_ARGS__) -# define msgflush() -# else -# define message(...) printf(__VA_ARGS__) -# define msgflush() fflush(stdout) -# endif -#else -# ifdef CONFIG_DEBUG -# define message lib_lowprintf -# define msgflush() -# else -# define message printf -# define msgflush() fflush(stdout) -# endif -#endif - - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: usbstrg_archinitialize - * - * Description: - * Perform architecture specific initialization - * - ****************************************************************************/ - -int usbstrg_archinitialize(void) -{ - /* If examples/usbstrg 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 -# warning "Missing logic" -#endif /* CONFIG_EXAMPLES_USBSTRG_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/usbmsc.c b/nuttx/configs/vsn/src/usbmsc.c new file mode 100644 index 000000000..264ae77a6 --- /dev/null +++ b/nuttx/configs/vsn/src/usbmsc.c @@ -0,0 +1,156 @@ +/**************************************************************************** + * configs/vsn/src/usbmsc.c + * + * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (c) 2011 Uros Platise. All rights reserved. + * + * Authors: Gregory Nutt + * Uros Platise + * + * Configure and register the STM32 MMC/SD SDIO block driver. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "vsn.h" + +#ifdef CONFIG_STM32_SDIO + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_EXAMPLES_USBMSC_DEVMINOR1 +# define CONFIG_EXAMPLES_USBMSC_DEVMINOR1 0 +#endif + +/* SLOT number(s) could depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_VSN +# undef STM32_MMCSDSLOTNO +# define STM32_MMCSDSLOTNO 0 +#else + /* Add configuration for new STM32 boards here */ +# error "Unrecognized STM32 board" +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_CPP_HAVE_VARARGS +# ifdef CONFIG_DEBUG +# define message(...) lib_lowprintf(__VA_ARGS__) +# define msgflush() +# else +# define message(...) printf(__VA_ARGS__) +# define msgflush() fflush(stdout) +# endif +#else +# ifdef CONFIG_DEBUG +# define message lib_lowprintf +# define msgflush() +# else +# define message printf +# define msgflush() fflush(stdout) +# endif +#endif + + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: usbmsc_archinitialize + * + * Description: + * Perform architecture specific initialization + * + ****************************************************************************/ + +int usbmsc_archinitialize(void) +{ + FAR struct sdio_dev_s *sdio; + int ret; + + /* First, get an instance of the SDIO interface */ + + message("usbmsc_archinitialize: " + "Initializing SDIO slot %d\n", + STM32_MMCSDSLOTNO); + + sdio = sdio_initialize(STM32_MMCSDSLOTNO); + if (!sdio) + { + 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("usbmsc_archinitialize: " + "Bind SDIO to the MMC/SD driver, minor=%d\n", + CONFIG_EXAMPLES_USBMSC_DEVMINOR1); + + ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1, sdio); + if (ret != OK) + { + message("usbmsc_archinitialize: " + "Failed to bind SDIO to the MMC/SD driver: %d\n", + ret); + return ret; + } + 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 + * see if the VSN board supports a GPIO to detect if there is a card in + * the slot. + */ + + sdio_mediachange(sdio, true); + return OK; +} + +#endif /* CONFIG_STM32_SDIO */ diff --git a/nuttx/configs/vsn/src/usbstrg.c b/nuttx/configs/vsn/src/usbstrg.c deleted file mode 100644 index 0942ae8e5..000000000 --- a/nuttx/configs/vsn/src/usbstrg.c +++ /dev/null @@ -1,156 +0,0 @@ -/**************************************************************************** - * configs/vsn/src/usbstrg.c - * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. - * Copyright (c) 2011 Uros Platise. All rights reserved. - * - * Authors: Gregory Nutt - * Uros Platise - * - * Configure and register the STM32 MMC/SD SDIO block driver. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include - -#include -#include - -#include "vsn.h" - -#ifdef CONFIG_STM32_SDIO - -/**************************************************************************** - * Pre-Processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 -# define CONFIG_EXAMPLES_USBSTRG_DEVMINOR1 0 -#endif - -/* SLOT number(s) could depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_VSN -# undef STM32_MMCSDSLOTNO -# define STM32_MMCSDSLOTNO 0 -#else - /* Add configuration for new STM32 boards here */ -# error "Unrecognized STM32 board" -#endif - -/* Debug ********************************************************************/ - -#ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG -# define message(...) lib_lowprintf(__VA_ARGS__) -# define msgflush() -# else -# define message(...) printf(__VA_ARGS__) -# define msgflush() fflush(stdout) -# endif -#else -# ifdef CONFIG_DEBUG -# define message lib_lowprintf -# define msgflush() -# else -# define message printf -# define msgflush() fflush(stdout) -# endif -#endif - - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: usbstrg_archinitialize - * - * Description: - * Perform architecture specific initialization - * - ****************************************************************************/ - -int usbstrg_archinitialize(void) -{ - FAR struct sdio_dev_s *sdio; - int ret; - - /* First, get an instance of the SDIO interface */ - - message("usbstrg_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", - STM32_MMCSDSLOTNO); - return -ENODEV; - } - - /* Now bind the SPI interface to the MMC/SD driver */ - - message("usbstrg_archinitialize: " - "Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_EXAMPLES_USBSTRG_DEVMINOR1); - - ret = mmcsd_slotinitialize(CONFIG_EXAMPLES_USBSTRG_DEVMINOR1, sdio); - if (ret != OK) - { - message("usbstrg_archinitialize: " - "Failed to bind SDIO to the MMC/SD driver: %d\n", - ret); - return ret; - } - message("usbstrg_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 - * see if the VSN board supports a GPIO to detect if there is a card in - * the slot. - */ - - sdio_mediachange(sdio, true); - return OK; -} - -#endif /* CONFIG_STM32_SDIO */ -- cgit v1.2.3