diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-01-25 11:50:41 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-01-25 11:50:41 +0000 |
commit | 431db89b00408197976d653d89d15eeef8172e1b (patch) | |
tree | 8900ab7368cdd124b725a65da47407f96fd46053 /Demos | |
parent | 74b6993d66d70c323beb4d7eccf5b8f45bf6d31f (diff) | |
download | lufa-431db89b00408197976d653d89d15eeef8172e1b.tar.gz lufa-431db89b00408197976d653d89d15eeef8172e1b.tar.bz2 lufa-431db89b00408197976d653d89d15eeef8172e1b.zip |
Fixed CDC and RNDIS host demos and class drivers - bidirectional endpoints should use two seperate pipes, not one half-duplex pipe.
Diffstat (limited to 'Demos')
3 files changed, 6 insertions, 23 deletions
diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/ConfigDescriptor.c b/Demos/Host/LowLevel/RNDISEthernetHost/ConfigDescriptor.c index 7078f5e51..5a173d6f4 100644 --- a/Demos/Host/LowLevel/RNDISEthernetHost/ConfigDescriptor.c +++ b/Demos/Host/LowLevel/RNDISEthernetHost/ConfigDescriptor.c @@ -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(RNDIS_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(RNDIS_DATAPIPE_OUT, EP_TYPE_BULK, PIPE_TOKEN_OUT,
- EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);
- }
+ /* Configure the data OUT pipe */
+ Pipe_ConfigurePipe(RNDIS_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 << RNDIS_DATAPIPE_OUT);
diff --git a/Demos/Host/LowLevel/VirtualSerialHost/ConfigDescriptor.c b/Demos/Host/LowLevel/VirtualSerialHost/ConfigDescriptor.c index c42cc0f76..853ad37e0 100644 --- a/Demos/Host/LowLevel/VirtualSerialHost/ConfigDescriptor.c +++ b/Demos/Host/LowLevel/VirtualSerialHost/ConfigDescriptor.c @@ -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);
diff --git a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c index 98980e8f0..4c521a480 100644 --- a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c +++ b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c @@ -218,7 +218,6 @@ void CDC_Host_Task(void) case HOST_STATE_Configured:
/* Select the data IN pipe */
Pipe_SelectPipe(CDC_DATAPIPE_IN);
- Pipe_SetPipeToken(PIPE_TOKEN_IN);
Pipe_Unfreeze();
/* Check to see if a packet has been received */
|