/* This routine checks to ensure that the attached device's VID and PID matches Google's for Android devices. */
uint8_t ProcessDeviceDescriptor(void)
/* This routine checks to ensure that the attached device's VID and PID matches Google's for Android devices. */
uint8_t ProcessDeviceDescriptor(void)
{
	USB_Descriptor_Device_t DeviceDescriptor;
	if (USB_Host_GetDeviceDescriptor(&DeviceDescriptor) != HOST_SENDCONTROL_Successful)
	  return DevControlError;
	if (DeviceDescriptor.Header.Type != DTYPE_Device)
	  return InvalidDeviceDataReturned;
	if ((DeviceDescriptor.ProductID != ANDROID_ACCESSORY_PRODUCT_ID) &&
	    (DeviceDescriptor.ProductID != ANDROID_ACCESSORY_ADB_PRODUCT_ID))
	{
		return NonAccessoryModeAndroidDevice;
	}
	return AccessoryModeAndroidDevice;
}