Hello,
I am working on USB Video Class in LPC4357 with Keil Middleware 7.1.0(should be latest). I came across a problem about Video Interface Association Descriptor(IAD).
The bFunctionSubClass of IAD Descriptor is the same as bFunctionSubClass of interface 0 in Middleware 7.1.0 from the source code in usbd_config_desc_macros.h
/* USB Device Custom Class n Interface Association Descriptor */ #define USBD_CUSTOM_CLASSn_IAD(n) /* Interface Association Descriptor */\ USB_INTERFACE_ASSOC_DESC_SIZE, /* bLength */ \ USB_INTERFACE_ASSOCIATION_DESCRIPTOR_TYPE, /* bDescriptorType */ \ USBD_CUSTOM_CLASS##n##_IF0_NUM, /* bFirstInterface */ \ USBD_CUSTOM_CLASS##n##_IF_CNT, /* bInterfaceCount */ \ USBD_CUSTOM_CLASS##n##_IF0_CLASS, /* bFunctionClass */ \ USBD_CUSTOM_CLASS##n##_IF0_SUBCLASS, /* bFunctionSubclass */ \ USBD_CUSTOM_CLASS##n##_IF0_PROTOCOL, /* bFunctionProtocol */ \ USBD_CUSTOM_CLASS##n##_IF0_STR_IDX, /* iFunction */
But the bFunctionSubClass of Video IAD Descriptor should be different from the bFunctionSubClass of Video Control Interface Descriptor(interface 0). This results in an error reported by Microsoft USB Device Viewer.
===>IAD Descriptor<=== bLength: 0x08 bDescriptorType: 0x0B bFirstInterface: 0x00 bInterfaceCount: 0x02 bFunctionClass: 0x0E -> Video Interface Class bFunctionSubClass: 0x01 *!*ERROR: This should be USB_VIDEO_SC_VIDEO_INTERFACE_COLLECTION 3 bFunctionProtocol: 0x00 -> PC_PROTOCOL_UNDEFINED protocol iFunction: 0x04 English (United States) "USB_CUSTOM_CLASS0_IF0"