aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-06-23 08:03:09 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-06-23 08:03:09 +0000
commita3a04aa6719a891a1350179d5ac451c3e18c3bf2 (patch)
treed3d73e56fe2f3aef176106780e875940c0c8b35d /LUFA
parent7f81803aaa312d589f79a77d1426150dcceb29f7 (diff)
downloadlufa-a3a04aa6719a891a1350179d5ac451c3e18c3bf2.tar.gz
lufa-a3a04aa6719a891a1350179d5ac451c3e18c3bf2.tar.bz2
lufa-a3a04aa6719a891a1350179d5ac451c3e18c3bf2.zip
Pipe_ConfigurePipe() now automatically defaults IN pipes to accepting infinite IN requests, this can still be changed by calling the existing \ref Pipe_SetFiniteINRequests() function.
Diffstat (limited to 'LUFA')
-rw-r--r--LUFA/Drivers/USB/Class/Host/CDC.c6
-rw-r--r--LUFA/Drivers/USB/LowLevel/Host.c2
-rw-r--r--LUFA/Drivers/USB/LowLevel/Pipe.c3
-rw-r--r--LUFA/Drivers/USB/LowLevel/Pipe.h4
-rw-r--r--LUFA/ManPages/ChangeLog.txt2
5 files changed, 8 insertions, 9 deletions
diff --git a/LUFA/Drivers/USB/Class/Host/CDC.c b/LUFA/Drivers/USB/Class/Host/CDC.c
index 2d5ec0fb2..943cb7363 100644
--- a/LUFA/Drivers/USB/Class/Host/CDC.c
+++ b/LUFA/Drivers/USB/Class/Host/CDC.c
@@ -109,7 +109,6 @@ static uint8_t CDC_Host_ProcessConfigDescriptor(USB_ClassInfo_CDC_Host_t* CDCInt
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);
CDCInterfaceInfo->State.NotificationPipeSize = EndpointData->EndpointSize;
- Pipe_SetInfiniteINRequests();
Pipe_SetInterruptPeriod(EndpointData->PollingIntervalMS);
FoundEndpoints |= CDC_FOUND_DATAPIPE_NOTIFICATION;
@@ -123,9 +122,6 @@ static uint8_t CDC_Host_ProcessConfigDescriptor(USB_ClassInfo_CDC_Host_t* CDCInt
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);
CDCInterfaceInfo->State.DataINPipeSize = EndpointData->EndpointSize;
- Pipe_SetInfiniteINRequests();
- Pipe_Unfreeze();
-
FoundEndpoints |= CDC_FOUND_DATAPIPE_IN;
}
else
@@ -134,8 +130,6 @@ static uint8_t CDC_Host_ProcessConfigDescriptor(USB_ClassInfo_CDC_Host_t* CDCInt
EndpointData->EndpointAddress, EndpointData->EndpointSize, PIPE_BANK_SINGLE);
CDCInterfaceInfo->State.DataOUTPipeSize = EndpointData->EndpointSize;
- Pipe_Unfreeze();
-
FoundEndpoints |= CDC_FOUND_DATAPIPE_OUT;
}
}
diff --git a/LUFA/Drivers/USB/LowLevel/Host.c b/LUFA/Drivers/USB/LowLevel/Host.c
index 1932b645c..037e6d80a 100644
--- a/LUFA/Drivers/USB/LowLevel/Host.c
+++ b/LUFA/Drivers/USB/LowLevel/Host.c
@@ -162,8 +162,6 @@ void USB_Host_ProcessNextHostState(void)
break;
}
- Pipe_SetInfiniteINRequests();
-
USB_ControlRequest = (USB_Request_Header_t)
{
.bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_DEVICE),
diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.c b/LUFA/Drivers/USB/LowLevel/Pipe.c
index 35ba480cd..aead39dc5 100644
--- a/LUFA/Drivers/USB/LowLevel/Pipe.c
+++ b/LUFA/Drivers/USB/LowLevel/Pipe.c
@@ -48,6 +48,9 @@ bool Pipe_ConfigurePipe(const uint8_t Number, const uint8_t Type, const uint8_t
UPCFG0X = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0));
UPCFG1X = ((1 << ALLOC) | Banks | Pipe_BytesToEPSizeMask(Size));
+ if (Token == PIPE_TOKEN_IN)
+ Pipe_SetInfiniteINRequests();
+
return Pipe_IsConfigured();
}
diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.h b/LUFA/Drivers/USB/LowLevel/Pipe.h
index 30f2d387c..30e0fde90 100644
--- a/LUFA/Drivers/USB/LowLevel/Pipe.h
+++ b/LUFA/Drivers/USB/LowLevel/Pipe.h
@@ -732,7 +732,9 @@
*
* A newly configured pipe is frozen by default, and must be unfrozen before use via the \ref Pipe_Unfreeze()
* before being used. Pipes should be kept frozen unless waiting for data from a device while in IN mode, or
- * sending data to the device in OUT mode.
+ * sending data to the device in OUT mode. IN type pipes are also automatically configured to accept infinite
+ * numbers of IN requests without automatic freezing - this can be overridden by a call to
+ * \ref Pipe_SetFiniteINRequests().
*
* \note The default control pipe does not have to be manually configured, as it is automatically
* configured by the library internally.
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt
index b80fa4d6f..3843941e7 100644
--- a/LUFA/ManPages/ChangeLog.txt
+++ b/LUFA/ManPages/ChangeLog.txt
@@ -32,6 +32,8 @@
* added NO_INTERNAL_SERIAL compile time option to turn off new serial number reading code
* - Fixed ADC driver for the ATMEGA32U4 and ATMEGA16U4 (thanks to Opendous Inc.)
* - Pipe stream functions now automatically set the correct pipe token, so that bidirectional pipes can be used
+ * - Pipe_ConfigurePipe() now automatically defaults IN pipes to accepting infinite IN requests, this can still be changed by calling
+ * the existing \ref Pipe_SetFiniteINRequests() function
*
*
* \section Sec_ChangeLog090605 Version 090605