diff options
author | Diego Ismirlian <dismirlian (at) google's mail.com> | 2017-07-13 16:45:31 -0300 |
---|---|---|
committer | Diego Ismirlian <dismirlian (at) google's mail.com> | 2017-07-13 16:45:31 -0300 |
commit | c044306ad058689783b1a6941a2a44d5baf738a2 (patch) | |
tree | 5ccc2a53c2e4c61450b5cad5208ca704e79fd741 /testhal/STM32/STM32F4xx | |
parent | c9cc2abf3e6854f68a87f72e73cd4eec92262317 (diff) | |
download | ChibiOS-Contrib-c044306ad058689783b1a6941a2a44d5baf738a2.tar.gz ChibiOS-Contrib-c044306ad058689783b1a6941a2a44d5baf738a2.tar.bz2 ChibiOS-Contrib-c044306ad058689783b1a6941a2a44d5baf738a2.zip |
USBH: Add flexibility to the enumeration process
Diffstat (limited to 'testhal/STM32/STM32F4xx')
-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; |