From 75a4a5dcbed1cc8621f518b934f187f4f1dcacf0 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 19 Mar 2016 12:45:33 -0600 Subject: [PATCH] Back part of a previous CDC/ACM change. Improve some Kconfig comments. --- drivers/usbdev/Kconfig | 14 +++++++++++--- drivers/usbdev/cdcacm.h | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/usbdev/Kconfig b/drivers/usbdev/Kconfig index a32ce0ba42..efcf0def0b 100644 --- a/drivers/usbdev/Kconfig +++ b/drivers/usbdev/Kconfig @@ -334,15 +334,19 @@ config CDCACM_IFNOBASE config CDCACM_STRBASE int "Offset the CDC/ACM string numbers" - default 0 + default 4 ---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 zero (this value actuallly only needs + correct value for this offset is four (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). + The default of four accounts for strings IDs 0-3 used by the composite + descriptors. Any additional CDC/ACM string descripts must then begin + with string index four. + endif config CDCACM_EP0MAXPACKET @@ -538,7 +542,7 @@ config USBMSC_IFNOBASE config USBMSC_STRBASE int "Offset the mass storage string numbers" - default 2 + default 4 depends on USBMSC_COMPOSITE ---help--- If the CDC driver is part of a composite device, then this may need to @@ -547,6 +551,10 @@ config USBMSC_STRBASE correct value for this offset is four (or perhaps 5 or 6, depending on if CDCACM_NOTIFSTR or CDCACM_DATAIFSTR are defined). + String IDS 0-3 are used by the composite descriptors. This amount + may need to be incremented to account for string IDs used by other + members of the composite. + config USBMSC_EP0MAXPACKET int "Max packet size for endpoint 0" default 64 diff --git a/drivers/usbdev/cdcacm.h b/drivers/usbdev/cdcacm.h index 9cbb6fe259..4b0803748a 100644 --- a/drivers/usbdev/cdcacm.h +++ b/drivers/usbdev/cdcacm.h @@ -61,7 +61,7 @@ #endif #if defined(CONFIG_CDCACM_COMPOSITE) && !defined(CONFIG_CDCACM_STRBASE) -# define CONFIG_CDCACM_STRBASE (0) +# define CONFIG_CDCACM_STRBASE (4) #endif #if defined(CONFIG_CDCACM_COMPOSITE) && !defined(CONFIG_COMPOSITE_IAD)