X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/f7ab433c67b86723385ec05ee9c7b96dd18e6dde..e4bf986bb351121a39076a7c85c09cd40b43f123:/Demos/Device/ClassDriver/Joystick/Joystick.c diff --git a/Demos/Device/ClassDriver/Joystick/Joystick.c b/Demos/Device/ClassDriver/Joystick/Joystick.c index 36a74a218..987fe1055 100644 --- a/Demos/Device/ClassDriver/Joystick/Joystick.c +++ b/Demos/Device/ClassDriver/Joystick/Joystick.c @@ -136,7 +136,7 @@ void EVENT_USB_Device_StartOfFrame(void) * \return Boolean true to force the sending of the report, false to let the library determine if it needs to be sent */ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo, uint8_t* const ReportID, - void* ReportData, uint16_t* ReportSize) + const uint8_t ReportType, void* ReportData, uint16_t* ReportSize) { USB_JoystickReport_Data_t* JoystickReport = (USB_JoystickReport_Data_t*)ReportData; @@ -148,10 +148,10 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn else if (JoyStatus_LCL & JOY_DOWN) JoystickReport->Y = 100; - if (JoyStatus_LCL & JOY_RIGHT) - JoystickReport->X = 100; - else if (JoyStatus_LCL & JOY_LEFT) + if (JoyStatus_LCL & JOY_LEFT) JoystickReport->X = -100; + else if (JoyStatus_LCL & JOY_RIGHT) + JoystickReport->X = 100; if (JoyStatus_LCL & JOY_PRESS) JoystickReport->Button = (1 << 1);