Fixed CDC and RNDIS host demos and class drivers - bidirectional endpoints should use two seperate pipes, not one half-duplex pipe.

This commit is contained in:
Dean Camera 2010-01-25 11:50:41 +00:00
parent 74b6993d66
commit 431db89b00
10 changed files with 25 additions and 140 deletions

View file

@ -145,10 +145,6 @@ uint8_t ProcessConfigurationDescriptor(void)
/* Check if the endpoint is a bulk IN or bulk OUT endpoint */
if (EndpointData->EndpointAddress & ENDPOINT_DESCRIPTOR_DIR_IN)
{
/* Kill the configured OUT pipe if the data endpoints are bidirectional */
if (Pipe_IsEndpointBound(EndpointData->EndpointAddress))
Pipe_DisablePipe();
/* Configure the data IN pipe */
Pipe_ConfigurePipe(CDC_DATAPIPE_IN, EP_TYPE_BULK, PIPE_TOKEN_IN,
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);
@ -158,13 +154,9 @@ uint8_t ProcessConfigurationDescriptor(void)
}
else
{
/* Only configure the OUT data pipe if the data endpoints have not shown to be bidirectional */
if (!(Pipe_IsEndpointBound(EndpointData->EndpointAddress)))
{
/* Configure the data OUT pipe */
Pipe_ConfigurePipe(CDC_DATAPIPE_OUT, EP_TYPE_BULK, PIPE_TOKEN_OUT,
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);
}
/* Configure the data OUT pipe */
Pipe_ConfigurePipe(CDC_DATAPIPE_OUT, EP_TYPE_BULK, PIPE_TOKEN_OUT,
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);
/* Set the flag indicating that the data OUT pipe has been found */
FoundEndpoints |= (1 << CDC_DATAPIPE_OUT);