Lines Matching refs:desc

66  * descriptors. If the "desc" argument passed to this function is
71 * Else: Next descriptor after "desc"
80 uint8_t *desc;
89 desc = (uint8_t *)_desc;
92 if (desc == NULL)
93 desc = start;
95 desc = desc + desc[0];
98 if ((desc < start) || (desc >= end))
102 desc_next = desc + desc[0];
107 if (desc[0] < 3)
111 return ((struct usb_descriptor *)desc);
133 id = (struct usb_interface_descriptor *)ps->desc;
163 if (ps->desc == NULL) {
183 ps->desc = (struct usb_descriptor *)id;
202 struct usb_descriptor *desc;
204 desc = ((struct usb_descriptor *)ped);
206 while ((desc = usb_desc_foreach(cd, desc))) {
207 if (desc->bDescriptorType == UDESC_INTERFACE) {
210 if (desc->bDescriptorType == UDESC_ENDPOINT) {
211 if (desc->bLength < sizeof(*ped)) {
215 return ((struct usb_endpoint_descriptor *)desc);
237 struct usb_descriptor *desc;
239 desc = ((struct usb_descriptor *)ped);
241 while ((desc = usb_desc_foreach(cd, desc))) {
242 if (desc->bDescriptorType == UDESC_INTERFACE)
244 if (desc->bDescriptorType == UDESC_ENDPOINT)
246 if (desc->bDescriptorType == UDESC_ENDPOINT_SS_COMP) {
247 if (desc->bLength < sizeof(*ped)) {
251 return ((struct usb_endpoint_ss_comp_descriptor *)desc);
266 struct usb_descriptor *desc = NULL;
269 while ((desc = usb_desc_foreach(cd, desc))) {
270 if (desc->bDescriptorType == type) {
291 struct usb_descriptor *desc;
305 desc = NULL;
306 while ((desc = usb_desc_foreach(cd, desc))) {
307 if ((desc->bDescriptorType == UDESC_INTERFACE) &&
308 (desc->bLength >= sizeof(*id))) {
309 id = (struct usb_interface_descriptor *)desc;