ReportData->X = 100;
if (JoyStatus_LCL & JOY_PRESS)
- ReportData->Button = (1 << 1);
+ ReportData->Button |= (1 << 1);
if (ButtonStatus_LCL & BUTTONS_BUTTON1)
ReportData->Button |= (1 << 0);
GetNextReport(&JoystickReportData);
/* Write Joystick Report Data */
- Endpoint_Write_Stream_LE(&JoystickReportData, sizeof(JoystickReportData));
+ Endpoint_Write_Stream_LE(&JoystickReportData, sizeof(JoystickReportData), NULL);
/* Finalize the stream transfer to send the last packet */
Endpoint_ClearIN();