- /* Check the CDC descriptor class, subclass and protocol, break out if correct control interface found */\r
- if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == CDC_CONTROL_CLASS) &&\r
- (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == CDC_CONTROL_SUBCLASS) &&\r
- (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == CDC_CONTROL_PROTOCOL))\r
+ USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor,\r
+ USB_Descriptor_Interface_t);\r
+ \r
+ if ((CurrentInterface->Class == CDC_CONTROL_CLASS) &&\r
+ (CurrentInterface->SubClass == CDC_CONTROL_SUBCLASS) &&\r
+ (CurrentInterface->Protocol == CDC_CONTROL_PROTOCOL))\r