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 15 years ago
parent f52b265090
commit 023838fe4a

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

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

Loading…
Cancel
Save