Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
9644d42e
Commit
9644d42e
authored
9 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
USB CDC/ACM device: Trivial configuration clean-up
parent
a589eb29
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
drivers/usbdev/Kconfig
+18
-14
18 additions, 14 deletions
drivers/usbdev/Kconfig
drivers/usbdev/cdcacm.h
+8
-8
8 additions, 8 deletions
drivers/usbdev/cdcacm.h
with
26 additions
and
22 deletions
drivers/usbdev/Kconfig
+
18
−
14
View file @
9644d42e
...
...
@@ -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
menu
config 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
menu
config 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"
menu
config 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
menu
config 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
menu
config USBMSC
bool "USB Mass storage class device"
default n
select FS_READABLE
...
...
This diff is collapsed.
Click to expand it.
drivers/usbdev/cdcacm.h
+
8
−
8
View file @
9644d42e
...
...
@@ -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 ************************************************/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment