/* This function parses the interface descriptor from the received buffer.  */
void usb_host_parseitfdesc(usb_host_itfdesc_typedef *if_descriptor, uint8_t *buf)
/* This function parses the interface descriptor from the received buffer.  */
void usb_host_parseitfdesc(usb_host_itfdesc_typedef *if_descriptor, uint8_t *buf)
{
    if_descriptor->bLength            = buf[0];
    if_descriptor->bDescriptorType    = buf[1];
    if_descriptor->bInterfaceNumber   = buf[2];
    if_descriptor->bAlternateSetting  = buf[3];
    if_descriptor->bNumEndpoints      = buf[4];
    if_descriptor->bInterfaceClass    = buf[5];
    if_descriptor->bInterfaceSubClass = buf[6];
    if_descriptor->bInterfaceProtocol = buf[7];
    if_descriptor->iInterface         = buf[8];
}