Lines Matching full:head
218 struct usb_desc_header *head = __usb_descriptor_start; in usb_get_str_descriptor_idx() local
222 while (head->bLength != 0U) { in usb_get_str_descriptor_idx()
223 switch (head->bDescriptorType) { in usb_get_str_descriptor_idx()
225 if (head == (struct usb_desc_header *)str) { in usb_get_str_descriptor_idx()
236 head = (struct usb_desc_header *)((uint8_t *)head + head->bLength); in usb_get_str_descriptor_idx()
416 static int usb_fix_descriptor(struct usb_desc_header *head) in usb_fix_descriptor() argument
426 while (head->bLength != 0U) { in usb_fix_descriptor()
427 switch (head->bDescriptorType) { in usb_fix_descriptor()
429 LOG_DBG("Device descriptor %p", head); in usb_fix_descriptor()
430 usb_desc_update_mps0((void *)head); in usb_fix_descriptor()
433 cfg_descr = (struct usb_cfg_descriptor *)head; in usb_fix_descriptor()
434 LOG_DBG("Configuration descriptor %p", head); in usb_fix_descriptor()
437 LOG_DBG("Association descriptor %p", head); in usb_fix_descriptor()
440 if_descr = (struct usb_if_descriptor *)head; in usb_fix_descriptor()
441 LOG_DBG("Interface descriptor %p", head); in usb_fix_descriptor()
451 "for %p", head); in usb_fix_descriptor()
456 cfg_data->interface_config(head, in usb_fix_descriptor()
470 LOG_DBG("Endpoint descriptor %p", head); in usb_fix_descriptor()
471 ep_descr = (struct usb_ep_descriptor *)head; in usb_fix_descriptor()
487 (struct usb_sn_descriptor *)head; in usb_fix_descriptor()
495 ascii7_to_utf16le(head); in usb_fix_descriptor()
503 (uint8_t *)head - (uint8_t *)cfg_descr); in usb_fix_descriptor()
504 sys_put_le16((uint8_t *)head - (uint8_t *)cfg_descr, in usb_fix_descriptor()
517 head = (struct usb_desc_header *)((uint8_t *)head + head->bLength); in usb_fix_descriptor()
520 if ((head + 1) != __usb_descriptor_end) { in usb_fix_descriptor()
521 LOG_DBG("try to fix next descriptor at %p", head + 1); in usb_fix_descriptor()
522 return usb_fix_descriptor(head + 1); in usb_fix_descriptor()