/* This function gets the header of next descriptor.  */
USB_HOST_DescHeader_TypeDef* usb_host_getnextdesc(uint8_t *pbuf, uint16_t *ptr)
/* This function gets the header of next descriptor.  */
USB_HOST_DescHeader_TypeDef* usb_host_getnextdesc(uint8_t *pbuf, uint16_t *ptr)
{
    USB_HOST_DescHeader_TypeDef  *pnext;
    *ptr += ((USB_HOST_DescHeader_TypeDef *)pbuf)->bLength;
    pnext = (USB_HOST_DescHeader_TypeDef *)((uint8_t *)pbuf + ((USB_HOST_DescHeader_TypeDef *)pbuf)->bLength);
    return (pnext);
}