From 69fa08d141931f9d91737a86551b0d1b47e8e182 Mon Sep 17 00:00:00 2001 From: Kristian Lauszus Date: Wed, 10 Sep 2014 00:21:01 -0700 Subject: [PATCH] Check DEVSUBCLASSOK as well when blindly attempt to configure --- Usb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Usb.cpp b/Usb.cpp index 15047946..37914046 100644 --- a/Usb.cpp +++ b/Usb.cpp @@ -727,7 +727,7 @@ uint8_t USB::Configuring(uint8_t parent, uint8_t port, bool lowspeed) { for(devConfigIndex = 0; devConfigIndex < USB_NUMDEVICES; devConfigIndex++) { if(!devConfig[devConfigIndex]) continue; if(devConfig[devConfigIndex]->GetAddress()) continue; // consumed - if(devConfig[devConfigIndex]->VIDPIDOK(vid, pid) || devConfig[devConfigIndex]->DEVCLASSOK(klass)) continue; // If this is true it means it must have returned USB_DEV_CONFIG_ERROR_DEVICE_NOT_SUPPORTED above + if(devConfig[devConfigIndex]->DEVSUBCLASSOK(subklass) && (devConfig[devConfigIndex]->VIDPIDOK(vid, pid) || devConfig[devConfigIndex]->DEVCLASSOK(klass))) continue; // If this is true it means it must have returned USB_DEV_CONFIG_ERROR_DEVICE_NOT_SUPPORTED above rcode = AttemptConfig(devConfigIndex, parent, port, lowspeed); //printf("ERROR ENUMERATING %2.2x\r\n", rcode);