/* find the interface index for a specific class interface and alternate setting number  */
uint8_t usbh_interfaceindex_find(usb_dev_prop *udev, uint8_t interface_number, uint8_t alt_settings)
/* find the interface index for a specific class interface and alternate setting number  */
uint8_t usbh_interfaceindex_find(usb_dev_prop *udev, uint8_t interface_number, uint8_t alt_settings)
{
    usb_desc_itf *pif;
    uint8_t if_ix = 0U;
    pif = (usb_desc_itf *)0;
    while (if_ix < USBH_MAX_INTERFACES_NUM) {
        pif = &udev->cfg_desc_set.itf_desc_set[if_ix][alt_settings].itf_desc;
        if ((pif->bInterfaceNumber == interface_number) && (pif->bAlternateSetting == alt_settings)) {
            return if_ix;
        }
        if_ix++;
    }
    return 0xFFU;
}