USB host composite: Add an option to permit support only a subset of the composite intefaces.

This commit is contained in:
Gregory Nutt 2016-08-31 07:56:27 -06:00
parent ebdd72dc53
commit cb7c1c1f14
2 changed files with 14 additions and 0 deletions

View File

@ -87,6 +87,16 @@ config USBHOST_COMPOSITE
NOTE: This feature is marked EXPERIMENTAL because it has not been
untested
config USBHOST_COMPOSITE_STRICT
bool "Strict composite membership"
default n
depends on USBHOST_COMPOSITE
---help---
If selected, then the composite device will not be enumerated unless
every member class in the composite is supported. If not selected
then, for example, you could use the CDC/ACM interface of the device
with not support for the other interfaces.
config USBHOST_MSC
bool "Mass Storage Class Support"
default n

View File

@ -771,8 +771,12 @@ int usbhost_composite(FAR struct usbhost_hubport_s *hport,
if (reg == NULL)
{
uerr("ERROR: usbhost_findclass failed\n");
#ifdef CONFIG_USBHOST_COMPOSITE_STRICT
ret = -EINVAL;
goto errout_with_cfgbuffer;
#else
continue;
#endif
}
/* Yes.. there is a class for this device. Get an instance of its