Add svn:eol-style property to source files, so that the line endings are correctly...
[pub/USBasp.git] / LUFA / Drivers / USB / LowLevel / Template / Template_Endpoint_Control_R.c
index 92b5396..db97644 100644 (file)
@@ -1,44 +1,44 @@
-uint8_t TEMPLATE_FUNC_NAME (void* Buffer, uint16_t Length)\r
-{\r
-       uint8_t* DataStream = ((uint8_t*)Buffer + TEMPLATE_BUFFER_OFFSET(Length));\r
-       \r
-       if (!(Length))\r
-         Endpoint_ClearOUT();\r
-       \r
-       while (Length)\r
-       {\r
-               if (Endpoint_IsSETUPReceived())\r
-                 return ENDPOINT_RWCSTREAM_HostAborted;\r
-\r
-               if (USB_DeviceState == DEVICE_STATE_Unattached)\r
-                 return ENDPOINT_RWCSTREAM_DeviceDisconnected;\r
-               else if (USB_DeviceState == DEVICE_STATE_Suspended)\r
-                 return ENDPOINT_RWCSTREAM_BusSuspended;\r
-                 \r
-               if (Endpoint_IsOUTReceived())\r
-               {\r
-                       while (Length && Endpoint_BytesInEndpoint())\r
-                       {\r
-                               TEMPLATE_TRANSFER_BYTE(DataStream);\r
-                               Length--;\r
-                       }\r
-                       \r
-                       Endpoint_ClearOUT();\r
-               }                 \r
-       }\r
-       \r
-       while (!(Endpoint_IsINReady()))\r
-       {\r
-               if (USB_DeviceState == DEVICE_STATE_Unattached)\r
-                 return ENDPOINT_RWCSTREAM_DeviceDisconnected;\r
-               else if (USB_DeviceState == DEVICE_STATE_Suspended)\r
-                 return ENDPOINT_RWCSTREAM_BusSuspended;\r
-       }\r
-       \r
-       return ENDPOINT_RWCSTREAM_NoError;\r
-}\r
-\r
-\r
-#undef TEMPLATE_BUFFER_OFFSET\r
-#undef TEMPLATE_FUNC_NAME\r
+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())
+                 return ENDPOINT_RWCSTREAM_HostAborted;
+
+               if (USB_DeviceState == DEVICE_STATE_Unattached)
+                 return ENDPOINT_RWCSTREAM_DeviceDisconnected;
+               else if (USB_DeviceState == DEVICE_STATE_Suspended)
+                 return ENDPOINT_RWCSTREAM_BusSuspended;
+                 
+               if (Endpoint_IsOUTReceived())
+               {
+                       while (Length && Endpoint_BytesInEndpoint())
+                       {
+                               TEMPLATE_TRANSFER_BYTE(DataStream);
+                               Length--;
+                       }
+                       
+                       Endpoint_ClearOUT();
+               }                 
+       }
+       
+       while (!(Endpoint_IsINReady()))
+       {
+               if (USB_DeviceState == DEVICE_STATE_Unattached)
+                 return ENDPOINT_RWCSTREAM_DeviceDisconnected;
+               else if (USB_DeviceState == DEVICE_STATE_Suspended)
+                 return ENDPOINT_RWCSTREAM_BusSuspended;
+       }
+       
+       return ENDPOINT_RWCSTREAM_NoError;
+}
+
+
+#undef TEMPLATE_BUFFER_OFFSET
+#undef TEMPLATE_FUNC_NAME
 #undef TEMPLATE_TRANSFER_BYTE
\ No newline at end of file