if (JoyStatus_LCL & JOY_LEFT)
ReportData->X = -1;
else if (JoyStatus_LCL & JOY_RIGHT)
- ReportData->X = 1;
+ ReportData->X = 1;
if (JoyStatus_LCL & JOY_PRESS)
- ReportData->Button = (1 << 0);
+ ReportData->Button |= (1 << 0);
if (ButtonStatus_LCL & BUTTONS_BUTTON1)
ReportData->Button |= (1 << 1);
PrevMouseReportData = MouseReportData;
/* Write Mouse Report Data */
- Endpoint_Write_Stream_LE(&MouseReportData, sizeof(MouseReportData));
+ Endpoint_Write_Stream_LE(&MouseReportData, sizeof(MouseReportData), NULL);
/* Finalize the stream transfer to send the last packet */
Endpoint_ClearIN();