USB host composite: Save some information that will be needed to create a class-specific configuration.

This commit is contained in:
Gregory Nutt 2016-08-29 15:02:15 -06:00
parent f4f807100b
commit 1ce4db8008

View File

@ -67,6 +67,13 @@ struct usbhost_component_s
*/ */
struct usbhost_id_s id; struct usbhost_id_s id;
/* This information will be needed to construct a meaningful configuration
* for CLASS_CONNSET()
*/
uint8_t iff; /* First interface */
uint8_t nifs; /* Number of interfaces */
}; };
/* This structure contains the internal, private state of the USB host /* This structure contains the internal, private state of the USB host
@ -472,6 +479,9 @@ int usbhost_composite(FAR struct usbhost_hubport_s *hport,
member->vid = id->vid; member->vid = id->vid;
member->pid = id->pid; member->pid = id->pid;
member->iff = ifdesc->iff;
member->nifs = 1;
/* Increment the member index */ /* Increment the member index */
i++; i++;
@ -497,6 +507,9 @@ int usbhost_composite(FAR struct usbhost_hubport_s *hport,
member->vid = id->vid; member->vid = id->vid;
member->pid = id->pid; member->pid = id->pid;
member->iff = iad->firstif;
member->nifs = iad->nifs;
/* Increment the member index */ /* Increment the member index */
i++; i++;