eacb4f0e84
commit69fcf3e849
Author: Alan Carvalho de Assis <acassis@gmail.com> Date: Sun Jul 16 08:39:33 2017 -0600 Fix spark/stm32_composite.c: board_composite_connect cannot be static commit28eb253401
Author: Gregory Nutt <gnutt@nuttx.org> Date: Sun Jul 16 08:36:01 2017 -0600 Composite: Final review for coding style before merge commite6af1b9994
Author: Gregory Nutt <gnutt@nuttx.org> Date: Sun Jul 16 07:41:38 2017 -0600 Composite: Simplify some intiialization of data structures. commit771c367411
Author: Gregory Nutt <gnutt@nuttx.org> Date: Sun Jul 16 07:15:08 2017 -0600 Cosmetic changes to alignment. commit5d67ddda4e
Author: Gregory Nutt <gnutt@nuttx.org> Date: Sun Jul 16 07:00:48 2017 -0600 USBMSC: Add missing logic to saved device description. commit0729151d29
Author: Gregory Nutt <gnutt@nuttx.org> Date: Sat Jul 15 17:11:41 2017 -0600 Trivial, costmetic commit74b916ff84
Author: Gregory Nutt <gnutt@nuttx.org> Date: Sat Jul 15 14:50:29 2017 -0600 Composite: Private functions need to be marked static. Move static functions out of 'Public Functions' to 'Private Functions' where they belong. Disable composite configuration 1 in all STM32 F1 configurations. commitcfaa4ece13
Author: Gregory Nutt <gnutt@nuttx.org> Date: Sat Jul 15 13:20:34 2017 -0600 Add some comments. commit8143563be6
Author: Gregory Nutt <gnutt@nuttx.org> Date: Sat Jul 15 12:33:10 2017 -0600 Spark: Need to condition out MSC logic in composite setup if there is no MSC in the composite. commit69d3a91ef1
Author: Gregory Nutt <gnutt@nuttx.org> Date: Sat Jul 15 11:03:33 2017 -0600 Composite: Remove all dependencies on CONFIG_SYSTEM_COMPOSITE_* configuration settings. Nothing in the OS can depend on external application settings. commit55a4388bbd
Author: Gregory Nutt <gnutt@nuttx.org> Date: Sat Jul 15 09:59:31 2017 -0600 All composite configurations now also support a dual CDC/ACM configuration. commit428f2147af
Author: Gregory Nutt <gnutt@nuttx.org> Date: Sat Jul 15 09:24:32 2017 -0600 Composite: Move board_msc* interfaces from apps/system/composite to the board specific OS logic where they belong. commitf1cc168a5c
Author: Gregory Nutt <gnutt@nuttx.org> Date: Sat Jul 15 08:56:33 2017 -0600 Refresh all composite configurations. commit246afcaa10
Merge:919877191d
02c6672868
Author: Gregory Nutt <gnutt@nuttx.org> Date: Sat Jul 15 08:22:26 2017 -0600 Merge remote-tracking branch 'origin/master' into composite commit919877191d
Author: Gregory Nutt <gnutt@nuttx.org> Date: Sat Jul 15 08:20:02 2017 -0600 Composite setup: Remove useless board_cdc* wrapper. commit82129cf8c6
Merge:f2cb8b252a
6537e4ea20
Author: Gregory Nutt <gnutt@nuttx.org> Date: Fri Jul 14 16:23:57 2017 -0600 Merge remote-tracking branch 'origin/master' into composite commitf2cb8b252a
Author: Alan Carvalho de Assis <acassis@gmail.com> Date: Fri Jul 14 10:19:35 2017 -0600 Composite: Fix for another cloned typo. commit676cfd526a
Author: Alan Carvalho de Assis <acassis@gmail.com> Date: Fri Jul 14 09:11:37 2017 -0600 Composite: Fix some typos commit1ea0368c18
Author: Alan Carvalho de Assis <acassis@gmail.com> Date: Fri Jul 14 09:10:18 2017 -0600 Composite: ./stm3210e-eval/src/stm32_composite.c commite485caced9
Author: Gregory Nutt <gnutt@nuttx.org> Date: Fri Jul 14 09:08:17 2017 -0600 Composite: I don't think the original code should have forced minor=0. commit6443c29621
Author: Gregory Nutt <gnutt@nuttx.org> Date: Fri Jul 14 07:15:38 2017 -0600 Composite: Flesh out support for all of other configurations that support composite. commit23cbc28b05
Author: Gregory Nutt <gnutt@nuttx.org> Date: Fri Jul 14 06:59:45 2017 -0600 Detangle use of board_xyzclassobject() and board_xyzuninitialize() commit1674cb8c8e
Merge:6bc881a192
5033a6def7
Author: Gregory Nutt <gnutt@nuttx.org> Date: Thu Jul 13 13:57:40 2017 -0600 Merge remote-tracking branch 'origin/master' into composite commit6bc881a192
Merge:fe3af4941d
85b8d16d8c
Author: Gregory Nutt <gnutt@nuttx.org> Date: Tue Jul 11 12:24:07 2017 -0600 Merge remote-tracking branch 'origin/master' into composite commitfe3af4941d
Merge:0f9ad16e18
1bc0eea143
Author: Gregory Nutt <gnutt@nuttx.org> Date: Mon Jul 10 11:07:36 2017 -0600 Merge remote-tracking branch 'origin/master' into composite commit0f9ad16e18
Merge:a4cd90d4ef
aa2e9c15a5
Author: Gregory Nutt <gnutt@nuttx.org> Date: Fri Jul 7 20:26:53 2017 -0600 Merge remote-tracking branch 'origin/master' into composite commita4cd90d4ef
Merge:8a4be7175e
31f832d8c5
Author: Gregory Nutt <gnutt@nuttx.org> Date: Wed Jul 5 11:12:52 2017 -0600 Merge remote-tracking branch 'origin/master' into composite commit8a4be7175e
Merge:18a32ed2ca
ae1771454a
Author: Gregory Nutt <gnutt@nuttx.org> Date: Fri Jun 30 16:14:04 2017 -0600 Merge remote-tracking branch 'origin/master' into composite commit18a32ed2ca
Merge:aaa81ce497
6d8df90b79
Author: Gregory Nutt <gnutt@nuttx.org> Date: Thu Jun 29 10:18:16 2017 -0600 Merge remote-tracking branch 'origin/master' into composite commitaaa81ce497
Merge:4eb548226b
8cb4636bb1
Author: Gregory Nutt <gnutt@nuttx.org> Date: Mon Jun 26 11:56:11 2017 -0600 Merge remote-tracking branch 'origin/master' into composite commit4eb548226b
Merge:2327f5a1b4
dc8eec0b61
Author: Gregory Nutt <gnutt@nuttx.org> Date: Mon Jun 19 17:27:00 2017 -0600 Merge remote-tracking branch 'origin/master' into composite commit2327f5a1b4
Merge:49cd279fc6
99bf0b522b
Author: Gregory Nutt <gnutt@nuttx.org> Date: Fri Jun 16 17:30:03 2017 -0600 Merge remote-tracking branch 'origin/master' into composite commit49cd279fc6
Merge:bb6a13f30a
46f86982ee
Author: Gregory Nutt <gnutt@nuttx.org> Date: Wed Jun 14 09:17:49 2017 -0600 Merge remote-tracking branch 'origin/master' into composite commitbb6a13f30a
Merge:918480047a
ac93d4bda9
Author: Gregory Nutt <gnutt@nuttx.org> Date: Mon Jun 5 17:40:06 2017 -0600 Merge remote-tracking branch 'origin/master' into composite commit918480047a
Merge:e4d262436c
4526cd665e
Author: Gregory Nutt <gnutt@nuttx.org> Date: Sat Jun 3 08:52:31 2017 -0600 Merge remote-tracking branch 'origin/master' into composite commite4d262436c
Author: Gregory Nutt <gnutt@nuttx.org> Date: Fri Jun 2 07:19:27 2017 -0600 SAMV71-Xult Composite: Now can switch between two different composite configurations dynamically. commit815257743d
Author: Gregory Nutt <gnutt@nuttx.org> Date: Fri Jun 2 07:11:57 2017 -0600 usbdev composite and SAMV7-Xult: Move board-specific USB composite configuration out of boardctl.c and into board-specific logic where it belongs. Add a configuration option to the boardctl() calls to support multiple composite device configurations dynamically. commitac13619dc5
Author: Gregory Nutt <gnutt@nuttx.org> Date: Thu Jun 1 17:03:58 2017 -0600 Cosmetic commit9dd41bdd2f
Author: Gregory Nutt <gnutt@nuttx.org> Date: Thu Jun 1 17:02:43 2017 -0600 Composite: More compile-related fixes commitfc1438c95d
Merge:049ccbfcbe
ff2b54a5e0
Author: Gregory Nutt <gnutt@nuttx.org> Date: Thu Jun 1 16:35:41 2017 -0600 Merge remote-tracking branch 'origin/master' into composite commit049ccbfcbe
Author: Gregory Nutt <gnutt@nuttx.org> Date: Thu Jun 1 16:35:16 2017 -0600 Composite: Add some structure definitions missed in first application of the patch. commitef33329e3a
Author: Gregory Nutt <gnutt@nuttx.org> Date: Thu Jun 1 16:14:46 2017 -0600 Add a warning commit89f77cd91a
Author: Gregory Nutt <gnutt@nuttx.org> Date: Thu Jun 1 16:11:27 2017 -0600 Fix some incomplete name changes commit0bb7af549a
Author: Gregory Nutt <gnutt@nuttx.org> Date: Thu Jun 1 15:09:50 2017 -0600 It is unnecessary to pack a structure that consists only of uint8_t data fields. commitbd9b548914
Author: Gregory Nutt <gnutt@nuttx.org> Date: Thu Jun 1 15:05:41 2017 -0600 Remove COMPILE_TIME_ASSERTION commit7e6f481581
Author: Frank Benkert <Frank.Benkert@avat.de> Date: Thu Jun 1 14:58:04 2017 -0600 Part II of the same big commit commitdcc9b07715
Author: Frank Benkert <Frank.Benkert@avat.de> Date: Thu Jun 1 14:08:22 2017 -0600 [[This is part 1 or several commits]] We developed a huge Changeset over a year ago to make USB Composite configuration dynamical and be able to instanciate the CDCACM multiple times inside this device. We use this feature to switch between one in normal and up to three CDCACMs in maintenance boot. The control path starts in “boardctl.c” where the configuration for the device is constructed. There are still a few issues which I’ll ask you to have a look at before this beast can be merged. 1. To be able to construct the data dynamically I have changed some USB-Structs to be packed. Maybe there are additional structs to change (just for completeness – not for current functionality). 2. I’ve added the Macro “COMPILE_TIME_ASSERTION” two times (in usbmsc_desc.c and in cdcacm_desc.c) to stay private. Maybe you’ll find a better place. It’s used to check the size of the structs against the assumptions. 3. I’ve changed the interface for some USB-Functions to receive also the dynamic configuration. Maybe this can be done more elegant. 4. The original NuttX (without the patch) seems to have problems with a Composite device holding a CDCACM and an MSC. The “USB SET CONFIGURATION” request does not to work at all. This makes the test fail under Windows and under Linux. Applying this patch doesn’t change anything – because it only changes the configuration – not the behavior. Maybe you’ll have a look at this problem before applying the patch.
655 lines
18 KiB
Plaintext
655 lines
18 KiB
Plaintext
#
|
|
# For a description of the syntax of this configuration file,
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
#
|
|
|
|
comment "USB Device Controller Driver Options"
|
|
|
|
config USBDEV_ISOCHRONOUS
|
|
bool "Enable isochronous"
|
|
default n
|
|
---help---
|
|
Build in extra support for isochronous endpoints
|
|
|
|
config USBDEV_DUALSPEED
|
|
bool "Enable high and full speed"
|
|
default n
|
|
---help---
|
|
Hardware handles high and full speed operation (USB 2.0)
|
|
|
|
choice USBDEV_POWERED
|
|
prompt "Select USB device powered"
|
|
default USBDEV_SELFPOWERED
|
|
|
|
config USBDEV_SELFPOWERED
|
|
bool "Self powered"
|
|
---help---
|
|
Will cause USB features to indicate that the device is self-powered
|
|
|
|
config USBDEV_BUSPOWERED
|
|
bool "Bus powered"
|
|
---help---
|
|
Will cause USB features to indicate that the device is self-powered
|
|
|
|
endchoice
|
|
|
|
config USBDEV_MAXPOWER
|
|
int "Maximum power consumption in mA"
|
|
default 100
|
|
# depends on USBDEV_BUSPOWERED
|
|
---help---
|
|
Maximum power consumption in mA. This selection should only apply if
|
|
the device is bus powered (USBDEV_BUSPOWERED). It is, however, used
|
|
unconditionally in several USB device drivers.
|
|
|
|
config USBDEV_DMA
|
|
bool "Enable DMA methods"
|
|
default n
|
|
---help---
|
|
Select this enable DMA-related methods in USB device controller driver
|
|
interface. These methods include the DMA buffer allocation methods:
|
|
allobuffer() and freebuffer().
|
|
|
|
The USB class driver allocates packet I/O buffers for data transfer by
|
|
calling the driver allocbuffer() and freebuffer() methods. Those methods
|
|
are only available if USBDEV_DMA is defined in the system configuration.
|
|
|
|
config USBDEV_DMAMEMORY
|
|
bool "Board DMA Allocation Hooks"
|
|
default n
|
|
depends on USBDEV_DMA
|
|
---help---
|
|
The USB class driver allocates packet I/O buffers for data transfer by
|
|
calling the driver allocbuffer() and freebuffer() methods. Those methods
|
|
are only available if USBDEV_DMA is defined in the system configuration.
|
|
|
|
If USBDEV_DMAMEMORY is also defined in the NuttX configuration, then
|
|
the driver implementations of the allocbuffer() and freebuffer()
|
|
methods may use board-specific usbdev_dma_alloc() and usbdev_dma_free().
|
|
If USBDEV_DMA and USBDEV_DMAMEMORY are both defined, then the board-
|
|
specific logic must provide the functions usbdev_dma_alloc() and
|
|
usbdev_dma_free(): usbdev_dma_alloc() will allocate DMA-capable
|
|
memory of the specified size; usbdev_dma_free() is the corresponding
|
|
function that will be called to free the DMA-capable memory.
|
|
|
|
config ARCH_USBDEV_STALLQUEUE
|
|
bool
|
|
default n
|
|
---help---
|
|
This option is set by the USB device controller driver (DCD)
|
|
selection. These selection means that the DCD can support
|
|
queuing of stall requests. By this, it is meant that, (1) the
|
|
stall is not sent until all write requests preceding the stall
|
|
request are sent, (2) the stall is sent, and then after the
|
|
stall is cleared, (3) all write requests queued after the stall
|
|
are sent.
|
|
|
|
If the driver does not support this feature, that the class drivers
|
|
will enable some hokey and inefficient delay logic to workaround
|
|
the lack of queuing.
|
|
|
|
menuconfig USBDEV_TRACE
|
|
bool "Enable USB tracing for debug"
|
|
default n
|
|
select HAVE_USBTRACE
|
|
---help---
|
|
Enables USB tracing for debug
|
|
|
|
if USBDEV_TRACE
|
|
|
|
config USBDEV_TRACE_NRECORDS
|
|
int "Number of trace entries to remember"
|
|
default 128
|
|
---help---
|
|
Number of trace entries to remember
|
|
|
|
config USBDEV_TRACE_STRINGS
|
|
bool "Decode device controller events"
|
|
default n
|
|
depends on DEBUG_USB
|
|
---help---
|
|
If USBDEV_TRACE_STRINGS is defined, then the USB device controller
|
|
driver must provide arrays of strings to support decoding of device-
|
|
specific trace events. These arrays of strings (and the type struct
|
|
trace_msg_t) are defined in include/nuttx/usb/usbdev_trace.h:
|
|
|
|
#ifdef CONFIG_USBDEV_TRACE_STRINGS
|
|
extern const struct trace_msg_t g_usb_trace_strings_deverror[];
|
|
extern const struct trace_msg_t g_usb_trace_strings_intdecode[];
|
|
#endif
|
|
|
|
config USBDEV_TRACE_INITIALIDSET
|
|
bool "Initial enable bits"
|
|
default 0
|
|
---help---
|
|
This is the set of initial USB features that are enabled at boot
|
|
time. See the event ID class bit definitions in
|
|
include/nuttx/usbdev_trace.h.
|
|
|
|
endif # USBDEV_TRACE
|
|
|
|
comment "USB Device Class Driver Options"
|
|
|
|
menuconfig USBDEV_COMPOSITE
|
|
bool "USB composite device support"
|
|
default n
|
|
---help---
|
|
Enables USB composite device support
|
|
|
|
if USBDEV_COMPOSITE
|
|
|
|
config COMPOSITE_IAD
|
|
bool "Use Interface Associate Descriptor (IAD)"
|
|
default n
|
|
---help---
|
|
If one of the members of the composite has multiple interfaces
|
|
(such as CDC/ACM), then an Interface Association Descriptor (IAD)
|
|
will be necessary. Default: IAD will be used automatically if
|
|
needed. It should not be necessary to set this.
|
|
|
|
config COMPOSITE_EP0MAXPACKET
|
|
int "Max packet size for endpoint 0"
|
|
default 64
|
|
---help---
|
|
Max packet size for endpoint 0
|
|
|
|
config COMPOSITE_VENDORID
|
|
hex "Composite vendor ID"
|
|
default 0x0000
|
|
|
|
config COMPOSITE_VENDORSTR
|
|
string "Composite vendor ID"
|
|
default "NuttX"
|
|
---help---
|
|
The vendor ID code/string
|
|
|
|
config COMPOSITE_PRODUCTID
|
|
hex "Composite product id"
|
|
default 0x0000
|
|
|
|
config COMPOSITE_PRODUCTSTR
|
|
string "Composite product string"
|
|
default "Composite device"
|
|
---help---
|
|
The product ID code/string
|
|
|
|
config COMPOSITE_SERIALSTR
|
|
string "Composite serial string"
|
|
default "001"
|
|
---help---
|
|
Device serial number string
|
|
|
|
config COMPOSITE_CONFIGSTR
|
|
string "Configuration string"
|
|
default "NuttX COMPOSITE config"
|
|
---help---
|
|
Configuration string
|
|
|
|
config COMPOSITE_VERSIONNO
|
|
hex "Composite version number"
|
|
default 0x1010
|
|
---help---
|
|
Interface version number.
|
|
endif
|
|
|
|
config PL2303
|
|
bool "Prolific PL2303 serial/USB converter emulation"
|
|
default n
|
|
select SERIAL_REMOVABLE
|
|
---help---
|
|
This logic emulates the Prolific PL2303 serial/USB converter
|
|
|
|
if PL2303
|
|
|
|
config PL2303_CONSOLE
|
|
bool "PL2303 console device"
|
|
default n
|
|
---help---
|
|
Register the USB device as /dev/console so that is will be used
|
|
as the console device.
|
|
|
|
config PL2303_EPINTIN
|
|
int "Interrupt IN endpoint number"
|
|
default 1
|
|
|
|
config PL2303_EPBULKOUT
|
|
int "Bulk OUT endpoint number"
|
|
default 2
|
|
|
|
config PL2303_EPBULKIN
|
|
int "Bulk IN endpoint number"
|
|
default 3
|
|
|
|
config PL2303_EP0MAXPACKET
|
|
int "Packet and request buffer sizes"
|
|
default 64
|
|
|
|
config PL2303_NWRREQS
|
|
int "Number of read requests that can be in flight"
|
|
default 4
|
|
---help---
|
|
The number of read requests that can be in flight
|
|
|
|
config PL2303_NRDREQS
|
|
int "Number of write requests that can be in flight"
|
|
default 4
|
|
---help---
|
|
The number of write/read requests that can be in flight
|
|
|
|
config PL2303_BULKIN_REQLEN
|
|
int "Size of one write request buffer"
|
|
default 768 if USBDEV_DUALSPEED
|
|
default 96 if !USBDEV_DUALSPEED
|
|
---help---
|
|
Ideally, the BULKOUT request size should *not* be the same size as
|
|
the maxpacket size. That is because IN transfers of exactly the
|
|
maxpacket size will be followed by a NULL packet. The BULKOUT,
|
|
on the other hand, request buffer size is always the same as the
|
|
maxpacket size.
|
|
|
|
There is also no reason from PL2303_BULKIN_REQLEN to be greater
|
|
than PL2303_TXBUFSIZE-1, since a request larger than the TX
|
|
buffer can never be sent.
|
|
|
|
config PL2303_RXBUFSIZE
|
|
int "Receive buffer size"
|
|
default 513 if USBDEV_DUALSPEED
|
|
default 257 if !USBDEV_DUALSPEED
|
|
---help---
|
|
Size of the serial receive buffers. The actual amount of data that
|
|
can be held in the buffer is this number minus one due to the way
|
|
that the circular buffer is managed. So an RX buffer size of 257
|
|
will hold four full-speed, 64 byte packets; a buffer size of 513
|
|
will hold one high-speed, 512 byte packet.
|
|
|
|
config PL2303_TXBUFSIZE
|
|
int "Transmit buffer size"
|
|
default 769 if USBDEV_DUALSPEED
|
|
default 193 if !USBDEV_DUALSPEED
|
|
---help---
|
|
Size of the serial transmit buffers. The actual amount of data that
|
|
can be held in the buffer is this number minus one due to the way
|
|
that the circular buffer is managed. So a TX buffer size of 769
|
|
will hold one request of size 768; a buffer size of 193 will hold
|
|
two requests of size 96 bytes.
|
|
|
|
config PL2303_VENDORID
|
|
hex "Vendor ID"
|
|
default 0x067b
|
|
|
|
config PL2303_PRODUCTID
|
|
hex "Product ID"
|
|
default 0x2303
|
|
|
|
config PL2303_VENDORSTR
|
|
string "Vendor string"
|
|
default "NuttX"
|
|
|
|
config PL2303_PRODUCTSTR
|
|
string "Product string"
|
|
default "PL2303 Emulation"
|
|
endif
|
|
|
|
menuconfig CDCACM
|
|
bool "USB Modem (CDC/ACM) support"
|
|
default n
|
|
select SERIAL_REMOVABLE
|
|
---help---
|
|
Enables USB Modem (CDC/ACM) support
|
|
|
|
if CDCACM
|
|
|
|
config CDCACM_CONSOLE
|
|
bool "CDC/ACM console device"
|
|
default n
|
|
---help---
|
|
Register the USB device as /dev/console so that is will be used
|
|
as the console device.
|
|
|
|
config CDCACM_IFLOWCONTROL
|
|
bool "CDC/ACM RTS flow control"
|
|
default n
|
|
depends on EXPERIMENTAL
|
|
select SERIAL_IFLOWCONTROL
|
|
---help---
|
|
Enable CDC/ACM RTS flow control
|
|
|
|
menuconfig CDCACM_COMPOSITE
|
|
bool "CDC/ACM composite support"
|
|
default n
|
|
depends on USBDEV_COMPOSITE
|
|
---help---
|
|
Configure the CDC serial driver as part of a composite driver
|
|
(only if USBDEV_COMPOSITE is also defined)
|
|
|
|
if !CDCACM_COMPOSITE
|
|
|
|
# In a composite device the EP0 config comes from the composite device
|
|
# and the EP-Number is configured dynamically via composite_initialize
|
|
|
|
config CDCACM_EP0MAXPACKET
|
|
int "Endpoint 0 max packet size"
|
|
default 64
|
|
---help---
|
|
Endpoint 0 max packet size. Default 64.
|
|
|
|
config CDCACM_EPINTIN
|
|
int "Interrupt IN endpoint number"
|
|
default 1
|
|
---help---
|
|
The logical 7-bit address of a hardware endpoint that supports
|
|
interrupt IN operation. Default 1.
|
|
|
|
endif
|
|
|
|
config CDCACM_EPINTIN_FSSIZE
|
|
int "Interupt IN full speed MAXPACKET size"
|
|
default 64
|
|
---help---
|
|
Max package size for the interrupt IN endpoint if full speed mode.
|
|
Default 64.
|
|
|
|
config CDCACM_EPINTIN_HSSIZE
|
|
int "Interupt IN high speed MAXPACKET size"
|
|
default 64
|
|
---help---
|
|
Max package size for the interrupt IN endpoint if high speed mode.
|
|
Default 64.
|
|
|
|
if !CDCACM_COMPOSITE
|
|
|
|
# In a composite device the EP-Number is configured dynamically via
|
|
# composite_initialize
|
|
|
|
config CDCACM_EPBULKOUT
|
|
int "Bulk OUT endpoint number"
|
|
default 3
|
|
---help---
|
|
The logical 7-bit address of a hardware endpoint that supports
|
|
bulk OUT operation. Default: 3
|
|
|
|
endif
|
|
|
|
config CDCACM_EPBULKOUT_FSSIZE
|
|
int "Bulk OUT full speed MAXPACKET size"
|
|
default 64
|
|
---help---
|
|
Max package size for the bulk OUT endpoint if full speed mode.
|
|
Default 64.
|
|
|
|
config CDCACM_EPBULKOUT_HSSIZE
|
|
int "Bulk OUT out high speed MAXPACKET size"
|
|
default 512
|
|
---help---
|
|
Max package size for the bulk OUT endpoint if high speed mode.
|
|
Default 512.
|
|
|
|
if !CDCACM_COMPOSITE
|
|
|
|
# In a composite device the EP-Number is configured dynamically via
|
|
# composite_initialize
|
|
|
|
config CDCACM_EPBULKIN
|
|
int "Bulk IN endpoint number"
|
|
default 2
|
|
---help---
|
|
The logical 7-bit address of a hardware endpoint that supports
|
|
bulk IN operation. Default: 2
|
|
|
|
endif
|
|
|
|
config CDCACM_EPBULKIN_FSSIZE
|
|
int "Bulk IN full speed MAXPACKET size"
|
|
default 64
|
|
---help---
|
|
Max package size for the bulk IN endpoint if full speed mode.
|
|
Default 64.
|
|
|
|
config CDCACM_EPBULKIN_HSSIZE
|
|
int "Bulk IN high speed MAXPACKET size"
|
|
default 512
|
|
---help---
|
|
Max package size for the bulk IN endpoint if high speed mode.
|
|
Default 512.
|
|
|
|
config CDCACM_NRDREQS
|
|
int "Number of read requests that can be in flight"
|
|
default 4
|
|
---help---
|
|
The number of read requests that can be in flight
|
|
|
|
config CDCACM_NWRREQS
|
|
int "Number of write requests that can be in flight"
|
|
default 4
|
|
---help---
|
|
The number of write/read requests that can be in flight
|
|
|
|
config CDCACM_BULKIN_REQLEN
|
|
int "Size of one write request buffer"
|
|
default 768 if USBDEV_DUALSPEED
|
|
default 96 if !USBDEV_DUALSPEED
|
|
---help---
|
|
Ideally, the BULKOUT request size should *not* be the same size as
|
|
the maxpacket size. That is because IN transfers of exactly the
|
|
maxpacket size will be followed by a NULL packet. The BULKOUT,
|
|
on the other hand, request buffer size is always the same as the
|
|
maxpacket size.
|
|
|
|
There is also no reason from CDCACM_BULKIN_REQLEN to be greater
|
|
than CDCACM_TXBUFSIZE-1, since a request larger than the TX
|
|
buffer can never be sent.
|
|
|
|
config CDCACM_RXBUFSIZE
|
|
int "Receive buffer size"
|
|
default 513 if USBDEV_DUALSPEED
|
|
default 257 if !USBDEV_DUALSPEED
|
|
---help---
|
|
Size of the serial receive buffers. The actual amount of data that
|
|
can be held in the buffer is this number minus one due to the way
|
|
that the circular buffer is managed. So an RX buffer size of 257
|
|
will hold four full-speed, 64 byte packets; a buffer size of 513
|
|
will hold one high-speed, 512 byte packet.
|
|
|
|
config CDCACM_TXBUFSIZE
|
|
int "Transmit buffer size"
|
|
default 769 if USBDEV_DUALSPEED
|
|
default 193 if !USBDEV_DUALSPEED
|
|
---help---
|
|
Size of the serial transmit buffers. The actual amount of data that
|
|
can be held in the buffer is this number minus one due to the way
|
|
that the circular buffer is managed. So a TX buffer size of 769
|
|
will hold one request of size 768; a buffer size of 193 will hold
|
|
two requests of size 96 bytes.
|
|
|
|
if !CDCACM_COMPOSITE
|
|
|
|
# In a composite device the Vendor- and Product-ID is given by the composite
|
|
# device
|
|
|
|
config CDCACM_VENDORID
|
|
hex "Vendor ID"
|
|
default 0x0525
|
|
---help---
|
|
The vendor ID code/string. Default 0x0525 and "NuttX"
|
|
0x0525 is the Netchip vendor and should not be used in any
|
|
products. This default VID was selected for compatibility with
|
|
the Linux CDC ACM default VID.
|
|
|
|
config CDCACM_PRODUCTID
|
|
hex "Product ID"
|
|
default 0xa4a7
|
|
---help---
|
|
The product ID code/string. Default 0xa4a7 and "CDC/ACM Serial"
|
|
0xa4a7 was selected for compatibility with the Linux CDC ACM
|
|
default PID.
|
|
|
|
config CDCACM_VENDORSTR
|
|
string "Vendor string"
|
|
default "NuttX"
|
|
|
|
config CDCACM_PRODUCTSTR
|
|
string "Product string"
|
|
default "CDC/ACM Serial"
|
|
|
|
endif # !CDCACM_COMPOSITE
|
|
endif # CDCACM
|
|
|
|
menuconfig USBMSC
|
|
bool "USB Mass storage class device"
|
|
default n
|
|
select FS_READABLE
|
|
select FS_WRITABLE
|
|
---help---
|
|
References:
|
|
"Universal Serial Bus Mass Storage Class, Specification Overview,"
|
|
Revision 1.2, USB Implementer's Forum, June 23, 2003.
|
|
|
|
"Universal Serial Bus Mass Storage Class, Bulk-Only Transport,"
|
|
Revision 1.0, USB Implementer's Forum, September 31, 1999.
|
|
|
|
"SCSI Primary Commands - 3 (SPC-3)," American National Standard
|
|
for Information Technology, May 4, 2005
|
|
|
|
"SCSI Primary Commands - 4 (SPC-4)," American National Standard
|
|
for Information Technology, July 19, 2008
|
|
|
|
"SCSI Block Commands -2 (SBC-2)," American National Standard
|
|
for Information Technology, November 13, 2004
|
|
|
|
"SCSI Multimedia Commands - 3 (MMC-3)," American National Standard
|
|
for Information Technology, November 12, 2001
|
|
|
|
if USBMSC
|
|
|
|
config USBMSC_COMPOSITE
|
|
bool "Mass storage composite support"
|
|
default n
|
|
depends on USBDEV_COMPOSITE
|
|
---help---
|
|
Configure the mass storage driver as part of a composite driver
|
|
(only if USBDEV_COMPOSITE is also defined)
|
|
|
|
config USBMSC_EP0MAXPACKET
|
|
int "Max packet size for endpoint 0"
|
|
default 64
|
|
---help---
|
|
Max packet size for endpoint 0
|
|
|
|
if !USBMSC_COMPOSITE
|
|
|
|
# In a composite device the EP-Number and STR-Number is configured
|
|
# dynamically via composite_initialize
|
|
|
|
config USBMSC_EPBULKOUT
|
|
int "Bulk OUT endpoint number"
|
|
default 2
|
|
---help---
|
|
The logical 7-bit address of a hardware endpoints that support
|
|
bulk OUT and IN operations
|
|
|
|
config USBMSC_EPBULKIN
|
|
int "Bulk IN endpoint number"
|
|
default 3
|
|
---help---
|
|
The logical 7-bit address of a hardware endpoints that support
|
|
bulk OUT and IN operations
|
|
|
|
endif
|
|
|
|
config USBMSC_NWRREQS
|
|
int "The number of write requests that can be in flight"
|
|
default 4
|
|
---help---
|
|
The number of write/read requests that can be in flight
|
|
|
|
config USBMSC_NRDREQS
|
|
int "The number of read requests that can be in flight"
|
|
default 4
|
|
---help---
|
|
The number of write/read requests that can be in flight
|
|
|
|
config USBMSC_BULKINREQLEN
|
|
int "Bulk IN request size"
|
|
default 512 if USBDEV_DUALSPEED
|
|
default 64 if !USBDEV_DUALSPEED
|
|
---help---
|
|
The size of the buffer in each WRITE request. This value should to be
|
|
at least as large as the endpoint maxpacket size . Most DCDs can divide
|
|
a large request buffer down and enqueue the smaller, outgoing packets
|
|
for better performance. So, ideally, the size of write request buffer
|
|
should be the size of one block device sector which is, often, 512
|
|
bytes. The default, however, is the minimum size of 512 or 64 bytes
|
|
(depending upon if dual speed operation is supported or not).
|
|
|
|
config USBMSC_BULKOUTREQLEN
|
|
int "Bulk OUT request size"
|
|
default 512 if USBDEV_DUALSPEED
|
|
default 64 if !USBDEV_DUALSPEED
|
|
---help---
|
|
The size of the buffer in each READ request. This value should to be
|
|
at least as large as the endpoint maxpacket size. Most DCDs will return
|
|
the completed READ request to the caller as each packet is received.
|
|
Therefore, there is no benefit in increasing the size of this buffer
|
|
beyond the maximum size of one packet. Default: 512 or 64 bytes
|
|
(depending upon if dual speed operation is supported or not).
|
|
|
|
if !USBMSC_COMPOSITE
|
|
|
|
# In a composite device the Vendor- and Product-IDs are handled by the
|
|
# composite device
|
|
|
|
config USBMSC_VENDORID
|
|
hex "Mass storage Vendor ID"
|
|
default 0x584e
|
|
---help---
|
|
The vendor ID (VID). The value here is bogus. You should not use
|
|
it in any commercial products! You must go through the proper
|
|
channels to request a vendor ID for your company if you do not
|
|
already have one!
|
|
|
|
config USBMSC_VENDORSTR
|
|
string "Mass storage vendor string"
|
|
default "NuttX"
|
|
---help---
|
|
The vendor ID code/string
|
|
|
|
config USBMSC_PRODUCTID
|
|
hex "Mass storage Product ID"
|
|
default 0x5342
|
|
---help---
|
|
The product ID (PID).
|
|
|
|
config USBMSC_PRODUCTSTR
|
|
string "Mass storage product string"
|
|
default "Mass Storage"
|
|
|
|
endif # !USBMSC_COMPOSITE
|
|
|
|
config USBMSC_VERSIONNO
|
|
hex "USB MSC Version Number"
|
|
default "0x399"
|
|
|
|
config USBMSC_REMOVABLE
|
|
bool "Mass storage removable"
|
|
default n
|
|
---help---
|
|
Select if the media is removable
|
|
USB Composite Device Configuration
|
|
|
|
config USBMSC_SCSI_PRIO
|
|
int "USBMSC SCSI daemon priority"
|
|
default 128
|
|
---help---
|
|
Priority of the SCSI kernel thread. This must be a relatively high
|
|
priority so that the SCSI daemon can be response to USB block driver
|
|
accesses.
|
|
|
|
config USBMSC_SCSI_STACKSIZE
|
|
int "USBMSC SCSI daemon stack size"
|
|
default 2048
|
|
---help---
|
|
Stack size used with the SCSI kernel thread. The default value
|
|
is not tuned.
|
|
|
|
endif
|