/* This comparator searches for the next Bulk Endpoint descriptor of the correct MSD interface, aborting the search if another interface descriptor is found before the next endpoint. */
uint8_t DComp_NextMSInterfaceBulkDataEndpoint(void *CurrentDescriptor)
/* This comparator searches for the next Bulk Endpoint descriptor of the correct MSD interface, aborting the search if another interface descriptor is found before the next endpoint. */
uint8_t DComp_NextMSInterfaceBulkDataEndpoint(void *CurrentDescriptor)
{
	USB_Descriptor_Header_t* Header = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Header_t);
	if (Header->Type == DTYPE_Endpoint)
	{
		USB_Descriptor_Endpoint_t* Endpoint = DESCRIPTOR_PCAST(CurrentDescriptor, USB_Descriptor_Endpoint_t);
		if ((Endpoint->Attributes & EP_TYPE_MASK) == EP_TYPE_BULK)
		  return DESCRIPTOR_SEARCH_Found;
	}
	else if (Header->Type == DTYPE_Interface)
	{
		return DESCRIPTOR_SEARCH_Fail;
	}
	return DESCRIPTOR_SEARCH_NotFound;
}