diff options
| author | electretmike <[email protected]> | 2024-10-30 08:06:19 +0100 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2024-10-30 15:11:46 +0800 |
| commit | 149fb046bcadcec1caecc5f23ad18a9cc49458f6 (patch) | |
| tree | bd9e0f2e89b0389785899bbd5b5c1d58f087008f /core | |
| parent | f437b3e51c65bd6c7022dcf6e9eac9fded005d5c (diff) | |
fix: rename class to class_code, for c++ compatibility (#269)
Co-authored-by: Michiel van Leeuwen <[email protected]>
Diffstat (limited to 'core')
| -rw-r--r-- | core/usbh_core.c | 6 | ||||
| -rw-r--r-- | core/usbh_core.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/core/usbh_core.c b/core/usbh_core.c index d4de88e5..c5f7729d 100644 --- a/core/usbh_core.c +++ b/core/usbh_core.c @@ -93,13 +93,13 @@ static const struct usbh_class_driver *usbh_find_class_driver(uint8_t class, uin struct usbh_class_info *index = NULL; for (index = usbh_class_info_table_begin; index < usbh_class_info_table_end; index++) { - if ((index->match_flags & USB_CLASS_MATCH_INTF_CLASS) && !(index->class == class)) { + if ((index->match_flags & USB_CLASS_MATCH_INTF_CLASS) && !(index->bInterfaceClass == class)) { continue; } - if ((index->match_flags & USB_CLASS_MATCH_INTF_SUBCLASS) && !(index->subclass == subclass)) { + if ((index->match_flags & USB_CLASS_MATCH_INTF_SUBCLASS) && !(index->bInterfaceSubClass == subclass)) { continue; } - if ((index->match_flags & USB_CLASS_MATCH_INTF_PROTOCOL) && !(index->protocol == protocol)) { + if ((index->match_flags & USB_CLASS_MATCH_INTF_PROTOCOL) && !(index->bInterfaceProtocol == protocol)) { continue; } if (index->match_flags & USB_CLASS_MATCH_VID_PID && index->id_table) { diff --git a/core/usbh_core.h b/core/usbh_core.h index 6674fcb4..ede1e574 100644 --- a/core/usbh_core.h +++ b/core/usbh_core.h @@ -61,9 +61,9 @@ extern "C" { struct usbh_class_info { uint8_t match_flags; /* Used for product specific matches; range is inclusive */ - uint8_t class; /* Base device class code */ - uint8_t subclass; /* Sub-class, depends on base class. Eg. */ - uint8_t protocol; /* Protocol, depends on base class. Eg. */ + uint8_t bInterfaceClass; /* Base device class code */ + uint8_t bInterfaceSubClass; /* Sub-class, depends on base class. Eg. */ + uint8_t bInterfaceProtocol; /* Protocol, depends on base class. Eg. */ const uint16_t (*id_table)[2]; /* List of Vendor/Product ID pairs */ const struct usbh_class_driver *class_driver; }; |
