add class only match
This commit is contained in:
@@ -109,7 +109,11 @@ static const struct usbh_class_driver *usbh_find_class_driver(uint8_t class, uin
|
||||
if (index->vid == vid && index->pid == pid && index->class == class) {
|
||||
return index->class_driver;
|
||||
}
|
||||
} else if (index->match_flags & (USB_CLASS_MATCH_INTF_CLASS)) {
|
||||
} else if ((index->match_flags & (USB_CLASS_MATCH_INTF_CLASS | USB_CLASS_MATCH_INTF_SUBCLASS)) == (USB_CLASS_MATCH_INTF_CLASS | USB_CLASS_MATCH_INTF_SUBCLASS)) {
|
||||
if (index->class == class && index->subclass == subclass) {
|
||||
return index->class_driver;
|
||||
}
|
||||
} else if ((index->match_flags & (USB_CLASS_MATCH_INTF_CLASS)) == USB_CLASS_MATCH_INTF_CLASS) {
|
||||
if (index->class == class) {
|
||||
return index->class_driver;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user