Fix logic bug in the incomplete Android Accessory Host demo preventing correct detection of an attached Android Accessory Mode device.
This commit is contained in:
parent
84ddf237db
commit
dee4bc0973
5 changed files with 10 additions and 2 deletions
|
@ -59,7 +59,8 @@ uint8_t ProcessDeviceDescriptor(void)
|
|||
if (DeviceDescriptor.VendorID != ANDROID_VENDOR_ID)
|
||||
return IncorrectAndroidDevice;
|
||||
|
||||
if ((DeviceDescriptor.ProductID != ANDROID_ACCESSORY_PRODUCT_ID) ||
|
||||
/* Check the product ID to determine if the Android device is in accessory mode */
|
||||
if ((DeviceDescriptor.ProductID != ANDROID_ACCESSORY_PRODUCT_ID) &&
|
||||
(DeviceDescriptor.ProductID != ANDROID_ACCESSORY_ADB_PRODUCT_ID))
|
||||
{
|
||||
return NonAccessoryModeAndroidDevice;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue