Fixed USB_RemoteWakeupEnabled flag never being set (the REMOTE WAKEUP Set Feature...
[pub/USBasp.git] / Demos / Device / Joystick / Joystick.c
index ee4bc6a..a5c3242 100644 (file)
@@ -129,11 +129,11 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
                        {\r
                                USB_JoystickReport_Data_t JoystickReportData;\r
                                \r
+                               Endpoint_ClearSETUP();\r
+\r
                                /* Create the next HID report to send to the host */                            \r
                                GetNextReport(&JoystickReportData);\r
-                               \r
-                               Endpoint_ClearSETUP();\r
-       \r
+                                       \r
                                /* Write the report data to the control endpoint */\r
                                Endpoint_Write_Control_Stream_LE(&JoystickReportData, sizeof(JoystickReportData));\r
                                \r