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;
/* 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
@ -466,15 +473,18 @@ int usbhost_composite(FAR struct usbhost_hubport_s *hport,
* lookup information from the interface descriptor.
*/
member->base = ifdesc->classid;
member->subclass = ifdesc->subclass;
member->proto = ifdesc->protocol;
member->vid = id->vid;
member->pid = id->pid;
member->base = ifdesc->classid;
member->subclass = ifdesc->subclass;
member->proto = ifdesc->protocol;
member->vid = id->vid;
member->pid = id->pid;
/* Increment the member index */
member->iff = ifdesc->iff;
member->nifs = 1;
i++;
/* Increment the member index */
i++;
}
}
@ -497,6 +507,9 @@ int usbhost_composite(FAR struct usbhost_hubport_s *hport,
member->vid = id->vid;
member->pid = id->pid;
member->iff = iad->firstif;
member->nifs = iad->nifs;
/* Increment the member index */
i++;