{\r
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)\r
{\r
- if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == MASS_STORE_CLASS) &&\r
- (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == MASS_STORE_SUBCLASS) &&\r
- (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == MASS_STORE_PROTOCOL))\r
+ USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor,\r
+ USB_Descriptor_Interface_t);\r
+\r
+ if ((CurrentInterface->Class == MASS_STORE_CLASS) &&\r
+ (CurrentInterface->SubClass == MASS_STORE_SUBCLASS) &&\r
+ (CurrentInterface->Protocol == MASS_STORE_PROTOCOL))\r
{\r
return DESCRIPTOR_SEARCH_Found;\r
}\r