diff options
author | Dean Camera <[email protected]> | 2009-11-13 13:24:04 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2009-11-13 13:24:04 +0000 |
commit | 588886878e0fe948417123b57c108a1bd7992f85 (patch) | |
tree | b2a87de1c9a49c8c10f9978770a089071d03cb2e /Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c | |
parent | e625fd6df33ab2112779728622a717589f0b8417 (diff) | |
download | qmk_firmware-588886878e0fe948417123b57c108a1bd7992f85.tar.gz qmk_firmware-588886878e0fe948417123b57c108a1bd7992f85.zip |
Corrections, improvements and additions to the incomplete RNDISHost demo.
Change device demos which use the joystick to use the natural UP, DOWN, LEFT, RIGHT ordering in all demos when checking the joystick's position.
Diffstat (limited to 'Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c')
-rw-r--r-- | Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c index 77aa2a91aa..caa33f9075 100644 --- a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c +++ b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c @@ -170,6 +170,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn uint8_t JoyStatus_LCL = Joystick_GetStatus();
uint8_t ButtonStatus_LCL = Buttons_GetStatus();
+ /* Determine which interface must have its report generated */
if (HIDInterfaceInfo == &Keyboard_HID_Interface)
{
USB_KeyboardReport_Data_t* KeyboardReport = (USB_KeyboardReport_Data_t*)ReportData;
@@ -207,10 +208,10 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn else if (JoyStatus_LCL & JOY_DOWN)
MouseReport->Y = 1;
- if (JoyStatus_LCL & JOY_RIGHT)
- MouseReport->X = 1;
- else if (JoyStatus_LCL & JOY_LEFT)
+ if (JoyStatus_LCL & JOY_LEFT)
MouseReport->X = -1;
+ else if (JoyStatus_LCL & JOY_RIGHT)
+ MouseReport->X = 1;
if (JoyStatus_LCL & JOY_PRESS)
MouseReport->Button = (1 << 0);
|