diff options
Diffstat (limited to 'testhal/STM32')
-rw-r--r-- | testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c b/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c index 9c56866..4585a5c 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c +++ b/testhal/STM32/STM32F4xx/USB_HOST/usbh_custom_class_example.c @@ -72,7 +72,7 @@ static const usbh_classdriver_vmt_t class_driver_vmt = { }; const usbh_classdriverinfo_t usbhCustomClassDriverInfo = { - 0x54, -1, -1, "CUSTOM", &class_driver_vmt + "CUSTOM", &class_driver_vmt }; static usbh_baseclassdriver_t *_load(usbh_device_t *dev, const uint8_t *descriptor, uint16_t rem) { @@ -80,7 +80,7 @@ static usbh_baseclassdriver_t *_load(usbh_device_t *dev, const uint8_t *descript USBHCustomDriver *custp; (void)dev; - if ((rem < descriptor[0]) || (descriptor[1] != USBH_DT_INTERFACE)) + if (_usbh_match_vid_pid(dev, 0xABCD, 0x0123) != HAL_SUCCESS) return NULL; const usbh_interface_descriptor_t * const ifdesc = (const usbh_interface_descriptor_t *)descriptor; |