-       /* Determine the type of the current descriptor */
-       if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)
-       {
-               /* Check if the current Endpoint descriptor is of type IN */
-               if (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Endpoint_t).EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)
-               {
-                       /* Indicate that the descriptor being searched for has been found */
-                       return DESCRIPTOR_SEARCH_Found;
-               }
-       }
-       else if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
-       {
-               /* Indicate that the search has failed prematurely and should be aborted */
-               return DESCRIPTOR_SEARCH_Fail;
-       }