- /* Select the Joystick Report Endpoint */\r
- Endpoint_SelectEndpoint(JOYSTICK_EPNUM);\r
-\r
- /* Check to see if the host is ready for another packet */\r
- if (Endpoint_IsINReady())\r
- {\r
- USB_JoystickReport_Data_t JoystickReportData;\r
- \r
- /* Create the next HID report to send to the host */\r
- GetNextReport(&JoystickReportData);\r
+ USB_JoystickReport_Data_t 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