aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/Joystick
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/Joystick')
-rw-r--r--Demos/Device/Joystick/Joystick.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Demos/Device/Joystick/Joystick.c b/Demos/Device/Joystick/Joystick.c
index ee4bc6ad0..a5c3242fe 100644
--- a/Demos/Device/Joystick/Joystick.c
+++ b/Demos/Device/Joystick/Joystick.c
@@ -129,11 +129,11 @@ EVENT_HANDLER(USB_UnhandledControlPacket)
{
USB_JoystickReport_Data_t JoystickReportData;
+ Endpoint_ClearSETUP();
+
/* Create the next HID report to send to the host */
GetNextReport(&JoystickReportData);
-
- Endpoint_ClearSETUP();
-
+
/* Write the report data to the control endpoint */
Endpoint_Write_Control_Stream_LE(&JoystickReportData, sizeof(JoystickReportData));