Fixed Endpoint_Write_Control_Stream_* functions not sending a terminating IN when...
[pub/USBasp.git] / LUFA / Drivers / USB / LowLevel / Template / Template_Endpoint_Control_W.c
index a2a9b8c..2de7a74 100644 (file)
@@ -5,7 +5,9 @@ uint8_t TEMPLATE_FUNC_NAME (const void* Buffer, uint16_t Length)
        \r
        if (Length > USB_ControlRequest.wLength)\r
          Length = USB_ControlRequest.wLength;\r
-       \r
+       else if (!(Length))\r
+         Endpoint_ClearIN();\r
+\r
        while (Length || LastPacketFull)\r
        {\r
                if (Endpoint_IsSETUPReceived())\r