/* Standard_GetDescriptorData is used for descriptors transfer. : This routine is used for the descriptors resident in Flash or RAM pDesc can be in either Flash or RAM The purpose of this routine is to have a versatile way to response descriptors request. It allows user to generate certain descriptors with software or read descriptors from external storage part by part. Input : - Length - Length of the data in this transfer.  */
uint8_t* Standard_GetDescriptorData(uint16_t Length, USB_OneDescriptor *pDesc)
/* Standard_GetDescriptorData is used for descriptors transfer. : This routine is used for the descriptors resident in Flash or RAM pDesc can be in either Flash or RAM The purpose of this routine is to have a versatile way to response descriptors request. It allows user to generate certain descriptors with software or read descriptors from external storage part by part. Input : - Length - Length of the data in this transfer.  */
uint8_t* Standard_GetDescriptorData(uint16_t Length, USB_OneDescriptor *pDesc)
{
    uint32_t wOffset;
    wOffset = pInformation->Ctrl_Info.Usb_wOffset;
    if (Length == 0)
    {
        pInformation->Ctrl_Info.Usb_wLength = pDesc->Descriptor_Size - wOffset;
        return 0;
    }
    return pDesc->Descriptor + wOffset;
}