USB CDC/ACM device: Trivial configuration clean-up
This commit is contained in:
parent
a589eb296c
commit
9644d42e91
|
@ -88,23 +88,24 @@ config ARCH_USBDEV_STALLQUEUE
|
|||
will enable some hokey and inefficient delay logic to workaround
|
||||
the lack of queuing.
|
||||
|
||||
config USBDEV_TRACE
|
||||
menuconfig USBDEV_TRACE
|
||||
bool "Enable USB tracing for debug"
|
||||
default n
|
||||
---help---
|
||||
Enables USB tracing for debug
|
||||
|
||||
if USBDEV_TRACE
|
||||
|
||||
config USBDEV_TRACE_NRECORDS
|
||||
int "Number of trace entries to remember"
|
||||
default 128
|
||||
depends on USBDEV_TRACE
|
||||
---help---
|
||||
Number of trace entries to remember
|
||||
|
||||
config USBDEV_TRACE_STRINGS
|
||||
bool "Decode device controller events"
|
||||
default n
|
||||
depends on USBDEV_TRACE || DEBUG_USB
|
||||
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-
|
||||
|
@ -119,15 +120,16 @@ config USBDEV_TRACE_STRINGS
|
|||
config USBDEV_TRACE_INITIALIDSET
|
||||
bool "Initial enable bits"
|
||||
default 0
|
||||
depends on USBDEV_TRACE
|
||||
---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"
|
||||
|
||||
config USBDEV_COMPOSITE
|
||||
menuconfig USBDEV_COMPOSITE
|
||||
bool "USB composite device support"
|
||||
default n
|
||||
---help---
|
||||
|
@ -287,12 +289,12 @@ config PL2303_PRODUCTSTR
|
|||
default "PL2303 Emulation"
|
||||
endif
|
||||
|
||||
config CDCACM
|
||||
bool "USB Modem (CDC ACM) support"
|
||||
menuconfig CDCACM
|
||||
bool "USB Modem (CDC/ACM) support"
|
||||
default n
|
||||
select SERIAL_REMOVABLE
|
||||
---help---
|
||||
Enables USB Modem (CDC ACM) support
|
||||
Enables USB Modem (CDC/ACM) support
|
||||
|
||||
if CDCACM
|
||||
|
||||
|
@ -311,7 +313,7 @@ config CDCACM_IFLOWCONTROL
|
|||
---help---
|
||||
Enable CDC/ACM RTS flow control
|
||||
|
||||
config CDCACM_COMPOSITE
|
||||
menuconfig CDCACM_COMPOSITE
|
||||
bool "CDC/ACM composite support"
|
||||
default n
|
||||
depends on USBDEV_COMPOSITE
|
||||
|
@ -319,10 +321,11 @@ config CDCACM_COMPOSITE
|
|||
Configure the CDC serial driver as part of a composite driver
|
||||
(only if USBDEV_COMPOSITE is also defined)
|
||||
|
||||
if CDCACM_COMPOSITE
|
||||
|
||||
config CDCACM_IFNOBASE
|
||||
int "Offset the CDC/ACM interface numbers"
|
||||
default 0
|
||||
depends on CDCACM_COMPOSITE
|
||||
---help---
|
||||
If the CDC driver is part of a composite device, then this may need to
|
||||
be defined to offset the CDC/ACM interface numbers so that they are
|
||||
|
@ -332,15 +335,16 @@ config CDCACM_IFNOBASE
|
|||
config CDCACM_STRBASE
|
||||
int "Offset the CDC/ACM string numbers"
|
||||
default 0
|
||||
depends on CDCACM_COMPOSITE
|
||||
---help---
|
||||
If the CDC driver is part of a composite device, then this may need to
|
||||
be defined to offset the CDC/ACM string numbers so that they are
|
||||
unique and contiguous. When used with the Mass Storage driver, the
|
||||
correct value for this offset is four (this value actuallly only needs
|
||||
correct value for this offset is zero (this value actuallly only needs
|
||||
to be defined if names are provided for the Notification interface,
|
||||
config CDCACM_NOTIFSTR, or the data interface, CDCACM_DATAIFSTR).
|
||||
|
||||
endif
|
||||
|
||||
config CDCACM_EP0MAXPACKET
|
||||
int "Endpoint 0 max packet size"
|
||||
default 64
|
||||
|
@ -484,9 +488,9 @@ config CDCACM_PRODUCTSTR
|
|||
string "Product string"
|
||||
default "CDC/ACM Serial"
|
||||
|
||||
endif
|
||||
endif # CDCACM
|
||||
|
||||
config USBMSC
|
||||
menuconfig USBMSC
|
||||
bool "USB Mass storage class device"
|
||||
default n
|
||||
select FS_READABLE
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_CDCACM_COMPOSITE) && !defined(CONFIG_CDCACM_STRBASE)
|
||||
# define CONFIG_CDCACM_STRBASE (4)
|
||||
# define CONFIG_CDCACM_STRBASE (0)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_CDCACM_COMPOSITE) && !defined(CONFIG_COMPOSITE_IAD)
|
||||
|
@ -82,11 +82,11 @@
|
|||
|
||||
#ifndef CONFIG_CDCACM_COMPOSITE
|
||||
# undef CONFIG_CDCACM_IFNOBASE
|
||||
# define CONFIG_CDCACM_IFNOBASE 0
|
||||
# define CONFIG_CDCACM_IFNOBASE (0)
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_CDCACM_IFNOBASE
|
||||
# define CONFIG_CDCACM_IFNOBASE 0
|
||||
# define CONFIG_CDCACM_IFNOBASE (0)
|
||||
#endif
|
||||
|
||||
/* Descriptors **************************************************************/
|
||||
|
@ -142,9 +142,9 @@
|
|||
# define CDCACM_CONFIGSTRID (4)
|
||||
|
||||
# define CDCACM_LASTBASESTRID (4)
|
||||
# undef CONFIG_CDCACM_STRBASE
|
||||
# define CONFIG_CDCACM_STRBASE (0)
|
||||
# define CDCACM_STRBASE (0)
|
||||
#else
|
||||
# define CDCACM_STRBASE CONFIG_CDCACM_STRBASE
|
||||
# define CDCACM_LASTBASESTRID CONFIG_CDCACM_STRBASE
|
||||
#endif
|
||||
|
||||
|
@ -163,7 +163,7 @@
|
|||
#endif
|
||||
|
||||
#define CDCACM_LASTSTRID CDCACM_DATAIFSTRID
|
||||
#define CDCACM_NSTRIDS (CDCACM_LASTSTRID - CONFIG_CDCACM_STRBASE)
|
||||
#define CDCACM_NSTRIDS (CDCACM_LASTSTRID - CDCACM_STRBASE)
|
||||
|
||||
/* Configuration descriptor size */
|
||||
|
||||
|
@ -214,13 +214,13 @@
|
|||
|
||||
/* Endpoint configuration ****************************************************/
|
||||
|
||||
#define CDCACM_EPINTIN_ADDR (USB_DIR_IN|CONFIG_CDCACM_EPINTIN)
|
||||
#define CDCACM_EPINTIN_ADDR (USB_DIR_IN | CONFIG_CDCACM_EPINTIN)
|
||||
#define CDCACM_EPINTIN_ATTR (USB_EP_ATTR_XFER_INT)
|
||||
|
||||
#define CDCACM_EPOUTBULK_ADDR (CONFIG_CDCACM_EPBULKOUT)
|
||||
#define CDCACM_EPOUTBULK_ATTR (USB_EP_ATTR_XFER_BULK)
|
||||
|
||||
#define CDCACM_EPINBULK_ADDR (USB_DIR_IN|CONFIG_CDCACM_EPBULKIN)
|
||||
#define CDCACM_EPINBULK_ADDR (USB_DIR_IN | CONFIG_CDCACM_EPBULKIN)
|
||||
#define CDCACM_EPINBULK_ATTR (USB_EP_ATTR_XFER_BULK)
|
||||
|
||||
/* Device driver definitions ************************************************/
|
||||
|
|
Loading…
Reference in New Issue