Add check to Pipe_IsEndpointBound() in the Mass Storage Host mode Class driver to ensure that multiple instances of the driver can be used on a single device with multiple Mass Storage interfaces.

pull/1469/head
Dean Camera 16 years ago
parent f52b265090
commit 023838fe4a

@ -113,9 +113,12 @@ static uint8_t DComp_NextInterfaceBulkDataEndpoint(void* CurrentDescriptor)
uint8_t EndpointType = (DESCRIPTOR_CAST(CurrentDescriptor, uint8_t EndpointType = (DESCRIPTOR_CAST(CurrentDescriptor,
USB_Descriptor_Endpoint_t).Attributes & EP_TYPE_MASK); USB_Descriptor_Endpoint_t).Attributes & EP_TYPE_MASK);
if (EndpointType == EP_TYPE_BULK) if ((EndpointType == EP_TYPE_BULK) &&
(!(Pipe_IsEndpointBound(CurrentEndpoint->EndpointAddress))))
{
return DESCRIPTOR_SEARCH_Found; return DESCRIPTOR_SEARCH_Found;
} }
}
else if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface) else if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{ {
return DESCRIPTOR_SEARCH_Fail; return DESCRIPTOR_SEARCH_Fail;

@ -12,6 +12,7 @@
* or post your suggestion as an enhancement request to the project bug tracker. * or post your suggestion as an enhancement request to the project bug tracker.
* *
* <b>Targeted for This Release:</b> * <b>Targeted for This Release:</b>
* - Simplify Mass Storage Host LowLevel SCSI demo
* - Finish Host Mode Class Drivers * - Finish Host Mode Class Drivers
* ( ) Audio * ( ) Audio
* (C) CDC * (C) CDC

Loading…
Cancel
Save