USB host composite: Add an option to permit support only a subset of the composite intefaces.
This commit is contained in:
parent
ebdd72dc53
commit
cb7c1c1f14
@ -87,6 +87,16 @@ config USBHOST_COMPOSITE
|
|||||||
NOTE: This feature is marked EXPERIMENTAL because it has not been
|
NOTE: This feature is marked EXPERIMENTAL because it has not been
|
||||||
untested
|
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
|
config USBHOST_MSC
|
||||||
bool "Mass Storage Class Support"
|
bool "Mass Storage Class Support"
|
||||||
default n
|
default n
|
||||||
|
@ -771,8 +771,12 @@ int usbhost_composite(FAR struct usbhost_hubport_s *hport,
|
|||||||
if (reg == NULL)
|
if (reg == NULL)
|
||||||
{
|
{
|
||||||
uerr("ERROR: usbhost_findclass failed\n");
|
uerr("ERROR: usbhost_findclass failed\n");
|
||||||
|
#ifdef CONFIG_USBHOST_COMPOSITE_STRICT
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto errout_with_cfgbuffer;
|
goto errout_with_cfgbuffer;
|
||||||
|
#else
|
||||||
|
continue;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Yes.. there is a class for this device. Get an instance of its
|
/* Yes.. there is a class for this device. Get an instance of its
|
||||||
|
Loading…
Reference in New Issue
Block a user