Removed specialized Endpoint_ClearControl* and Pipe_ClearControl* macros in favour...
[pub/USBasp.git] / LUFA / Drivers / USB / LowLevel / DevChapter9.c
index 19d7298..3f2805c 100644 (file)
@@ -108,7 +108,7 @@ void USB_Device_ProcessControlPacket(void)
        if (Endpoint_IsSETUPReceived())\r
        {\r
                Endpoint_StallTransaction();\r
-               Endpoint_ClearControlSETUP();           \r
+               Endpoint_ClearSETUP();          \r
        }\r
 }\r
 \r
@@ -116,11 +116,11 @@ static void USB_Device_SetAddress(void)
 {\r
        uint8_t wValue_LSB = Endpoint_Read_Byte();\r
 \r
-       Endpoint_ClearControlSETUP();\r
+       Endpoint_ClearSETUP();\r
        \r
        while (!(Endpoint_IsINReady()));\r
        \r
-       Endpoint_ClearControlIN();\r
+       Endpoint_ClearIN();\r
        \r
        while (!(Endpoint_IsINReady()));\r
 \r
@@ -152,11 +152,11 @@ static void USB_Device_SetConfiguration(void)
                return;\r
        }\r
        \r
-       Endpoint_ClearControlSETUP();\r
+       Endpoint_ClearSETUP();\r
 \r
        USB_ConfigurationNumber = wValue_LSB;\r
 \r
-       Endpoint_ClearControlIN();\r
+       Endpoint_ClearIN();\r
 \r
        if (!(AlreadyConfigured) && USB_ConfigurationNumber)\r
          RAISE_EVENT(USB_DeviceEnumerationComplete);\r
@@ -166,14 +166,14 @@ static void USB_Device_SetConfiguration(void)
 \r
 void USB_Device_GetConfiguration(void)\r
 {\r
-       Endpoint_ClearControlSETUP();   \r
+       Endpoint_ClearSETUP();  \r
 \r
        Endpoint_Write_Byte(USB_ConfigurationNumber);\r
        \r
-       Endpoint_ClearControlIN();\r
+       Endpoint_ClearIN();\r
 \r
        while (!(Endpoint_IsOUTReceived()));\r
-       Endpoint_ClearControlOUT();\r
+       Endpoint_ClearOUT();\r
 }\r
 \r
 static void USB_Device_GetDescriptor(void)\r
@@ -190,7 +190,7 @@ static void USB_Device_GetDescriptor(void)
        if ((DescriptorSize = USB_GetDescriptor(wValue, wIndex, &DescriptorPointer)) == NO_DESCRIPTOR)\r
          return;\r
        \r
-       Endpoint_ClearControlSETUP();   \r
+       Endpoint_ClearSETUP();  \r
        \r
        if (wLength > DescriptorSize)\r
          wLength = DescriptorSize;\r
@@ -201,7 +201,7 @@ static void USB_Device_GetDescriptor(void)
                {\r
                        if (Endpoint_IsOUTReceived())\r
                        {\r
-                               Endpoint_ClearControlOUT();\r
+                               Endpoint_ClearOUT();\r
                                return;\r
                        }               \r
                }\r
@@ -220,17 +220,17 @@ static void USB_Device_GetDescriptor(void)
                }\r
                \r
                SendZLP = (Endpoint_BytesInEndpoint() == USB_ControlEndpointSize);\r
-               Endpoint_ClearControlIN();\r
+               Endpoint_ClearIN();\r
        }\r
        \r
        if (SendZLP)\r
        {\r
                while (!(Endpoint_IsINReady()));\r
-               Endpoint_ClearControlIN();\r
+               Endpoint_ClearIN();\r
        }\r
 \r
        while (!(Endpoint_IsOUTReceived()));\r
-       Endpoint_ClearControlOUT();\r
+       Endpoint_ClearOUT();\r
 }\r
 \r
 static void USB_Device_GetStatus(const uint8_t bmRequestType)\r
@@ -264,14 +264,14 @@ static void USB_Device_GetStatus(const uint8_t bmRequestType)
        }\r
        \r
        Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);                      \r
-       Endpoint_ClearControlSETUP();\r
+       Endpoint_ClearSETUP();\r
 \r
        Endpoint_Write_Word_LE(CurrentStatus);\r
 \r
-       Endpoint_ClearControlIN();\r
+       Endpoint_ClearIN();\r
        \r
        while (!(Endpoint_IsOUTReceived()));\r
-       Endpoint_ClearControlOUT();\r
+       Endpoint_ClearOUT();\r
 }\r
 \r
 #if !defined(FEATURELESS_CONTROL_ONLY_DEVICE)\r
@@ -306,8 +306,8 @@ static void USB_Device_ClearSetFeature(const uint8_t bRequest, const uint8_t bmR
                                        }\r
 \r
                                        Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);\r
-                                       Endpoint_ClearControlSETUP();\r
-                                       Endpoint_ClearControlIN();\r
+                                       Endpoint_ClearSETUP();\r
+                                       Endpoint_ClearIN();\r
                                }\r
                        }\r
                        \r