- /* Write Joystick Report Data */\r
- Endpoint_Write_Stream_LE(&JoystickReportData, sizeof(JoystickReportData));\r
-\r
- /* Finalize the stream transfer to send the last packet */\r
- Endpoint_ClearIN();\r
- \r
- /* Clear the report data afterwards */\r
- memset(&JoystickReportData, 0, sizeof(JoystickReportData));\r
- }\r
+ /* Create the next HID report to send to the host */\r
+ GetNextReport(&JoystickReportData);\r
+ \r
+ /* Write Joystick Report Data */\r
+ Endpoint_Write_Stream_LE(&JoystickReportData, sizeof(JoystickReportData));\r
+\r
+ /* Finalize the stream transfer to send the last packet */\r
+ Endpoint_ClearIN();\r
+ \r
+ /* Clear the report data afterwards */\r
+ memset(&JoystickReportData, 0, sizeof(JoystickReportData));\r