diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-11-20 06:56:43 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-11-20 06:56:43 +0000 |
commit | 6c38ca28907034aa9a5f294dc26f98d90234dea8 (patch) | |
tree | b79eaa41d1df490b6cf137d514c4ca33b14c9c97 /LUFA | |
parent | 7ef58eef7a57c46ab53ed8a26805b58dcffd7010 (diff) | |
download | lufa-6c38ca28907034aa9a5f294dc26f98d90234dea8.tar.gz lufa-6c38ca28907034aa9a5f294dc26f98d90234dea8.tar.bz2 lufa-6c38ca28907034aa9a5f294dc26f98d90234dea8.zip |
Fixed Endpoint_Write_Control_Stream_* functions not sending a terminating IN when the given data length is zero.
Diffstat (limited to 'LUFA')
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c | 3 | ||||
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c | 4 | ||||
-rw-r--r-- | LUFA/ManPages/ChangeLog.txt | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c index e64f0ed4a..6948296a5 100644 --- a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c +++ b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c @@ -2,6 +2,9 @@ uint8_t TEMPLATE_FUNC_NAME (void* Buffer, uint16_t Length) {
uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));
+ if (!(Length))
+ Endpoint_ClearOUT();
+
while (Length)
{
if (Endpoint_IsSETUPReceived())
diff --git a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c index a2a9b8c1a..2de7a74f5 100644 --- a/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c +++ b/LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c @@ -5,7 +5,9 @@ uint8_t TEMPLATE_FUNC_NAME (const void* Buffer, uint16_t Length) if (Length > USB_ControlRequest.wLength)
Length = USB_ControlRequest.wLength;
-
+ else if (!(Length))
+ Endpoint_ClearIN();
+
while (Length || LastPacketFull)
{
if (Endpoint_IsSETUPReceived())
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 8390fde2c..57a1a2b29 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -51,6 +51,7 @@ * - Fixed HID host Class driver report send/receive report broken when issued through the control pipe
* - Fixed HOST_STATE_AS_GPIOR compile time option being ignored when in host mode (thanks to David Lyons)
* - Fixed LowLevel Keyboard demo not saving the issues report only after it has been sent to the host
+ * - Fixed Endpoint_Write_Control_Stream_* functions not sending a terminating IN when given data Length is zero
*
* \section Sec_ChangeLog090924 Version 090924
*
|