Lines Matching refs:desc
35 * descriptors. If the "desc" argument passed to this function is
40 * Else: Next descriptor after "desc"
49 uint8_t *desc;
58 desc = (uint8_t *)_desc;
61 if (desc == NULL)
62 desc = start;
64 desc = desc + desc[0];
67 if ((desc < start) || (desc >= end))
71 desc_next = desc + desc[0];
76 if (desc[0] < 3)
80 return ((struct usb_descriptor *)desc);
102 id = (struct usb_interface_descriptor *)ps->desc;
132 if (ps->desc == NULL) {
152 ps->desc = (struct usb_descriptor *)id;
171 struct usb_descriptor *desc;
173 desc = ((struct usb_descriptor *)ped);
175 while ((desc = usb_desc_foreach(cd, desc))) {
176 if (desc->bDescriptorType == UDESC_INTERFACE) {
179 if (desc->bDescriptorType == UDESC_ENDPOINT) {
180 if (desc->bLength < sizeof(*ped)) {
184 return ((struct usb_endpoint_descriptor *)desc);
206 struct usb_descriptor *desc;
208 desc = ((struct usb_descriptor *)ped);
210 while ((desc = usb_desc_foreach(cd, desc))) {
211 if (desc->bDescriptorType == UDESC_INTERFACE)
213 if (desc->bDescriptorType == UDESC_ENDPOINT)
215 if (desc->bDescriptorType == UDESC_ENDPOINT_SS_COMP) {
216 if (desc->bLength < sizeof(*ped)) {
220 return ((struct usb_endpoint_ss_comp_descriptor *)desc);
235 struct usb_descriptor *desc = NULL;
238 while ((desc = usb_desc_foreach(cd, desc))) {
239 if (desc->bDescriptorType == type) {
260 struct usb_descriptor *desc;
274 desc = NULL;
275 while ((desc = usb_desc_foreach(cd, desc))) {
276 if ((desc->bDescriptorType == UDESC_INTERFACE) &&
277 (desc->bLength >= sizeof(*id))) {
278 id = (struct usb_interface_descriptor *)desc;