Removed specialized Endpoint_ClearControl* and Pipe_ClearControl* macros in favour...
[pub/USBasp.git] / Demos / Device / GenericHID / GenericHID.c
index a0d4f15..207f63c 100644 (file)
@@ -165,7 +165,7 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
                case REQ_GetReport:\r
                        if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
                        {\r
-                               Endpoint_ClearControlSETUP();\r
+                               Endpoint_ClearSETUP();\r
        \r
                                uint8_t GenericData[GENERIC_REPORT_SIZE];\r
                                \r
@@ -175,14 +175,14 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
                                Endpoint_Write_Control_Stream_LE(&GenericData, sizeof(GenericData));\r
 \r
                                /* Finalize the stream transfer to send the last packet or clear the host abort */\r
-                               Endpoint_ClearControlOUT();\r
+                               Endpoint_ClearOUT();\r
                        }\r
                \r
                        break;\r
                case REQ_SetReport:\r
                        if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
                        {\r
-                               Endpoint_ClearControlSETUP();\r
+                               Endpoint_ClearSETUP();\r
                                \r
                                /* Wait until the generic report has been sent by the host */\r
                                while (!(Endpoint_IsOUTReceived()));\r
@@ -194,13 +194,13 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
                                ProcessGenericHIDReport(GenericData);\r
                        \r
                                /* Clear the endpoint data */\r
-                               Endpoint_ClearControlOUT();\r
+                               Endpoint_ClearOUT();\r
 \r
                                /* Wait until the host is ready to receive the request confirmation */\r
                                while (!(Endpoint_IsINReady()));\r
                                \r
                                /* Handshake the request by sending an empty IN packet */\r
-                               Endpoint_ClearControlIN();\r
+                               Endpoint_ClearIN();\r
                        }\r
                        \r
                        break;\r