aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/LowLevel
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-11-13 13:24:04 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-11-13 13:24:04 +0000
commit588886878e0fe948417123b57c108a1bd7992f85 (patch)
treeb2a87de1c9a49c8c10f9978770a089071d03cb2e /Demos/Device/LowLevel
parente625fd6df33ab2112779728622a717589f0b8417 (diff)
downloadlufa-588886878e0fe948417123b57c108a1bd7992f85.tar.gz
lufa-588886878e0fe948417123b57c108a1bd7992f85.tar.bz2
lufa-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/LowLevel')
-rw-r--r--Demos/Device/LowLevel/Joystick/Joystick.c6
-rw-r--r--Demos/Device/LowLevel/Mouse/Mouse.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/Demos/Device/LowLevel/Joystick/Joystick.c b/Demos/Device/LowLevel/Joystick/Joystick.c
index 6d04c8fa6..aa5244c15 100644
--- a/Demos/Device/LowLevel/Joystick/Joystick.c
+++ b/Demos/Device/LowLevel/Joystick/Joystick.c
@@ -156,10 +156,10 @@ bool GetNextReport(USB_JoystickReport_Data_t* ReportData)
else if (JoyStatus_LCL & JOY_DOWN)
ReportData->Y = 100;
- if (JoyStatus_LCL & JOY_RIGHT)
- ReportData->X = 100;
- else if (JoyStatus_LCL & JOY_LEFT)
+ if (JoyStatus_LCL & JOY_LEFT)
ReportData->X = -100;
+ else if (JoyStatus_LCL & JOY_RIGHT)
+ ReportData->X = 100;
if (JoyStatus_LCL & JOY_PRESS)
ReportData->Button = (1 << 1);
diff --git a/Demos/Device/LowLevel/Mouse/Mouse.c b/Demos/Device/LowLevel/Mouse/Mouse.c
index 2f7a63f7f..4b318e30c 100644
--- a/Demos/Device/LowLevel/Mouse/Mouse.c
+++ b/Demos/Device/LowLevel/Mouse/Mouse.c
@@ -238,10 +238,10 @@ void CreateMouseReport(USB_MouseReport_Data_t* ReportData)
else if (JoyStatus_LCL & JOY_DOWN)
ReportData->Y = 1;
- if (JoyStatus_LCL & JOY_RIGHT)
- ReportData->X = 1;
- else if (JoyStatus_LCL & JOY_LEFT)
+ if (JoyStatus_LCL & JOY_LEFT)
ReportData->X = -1;
+ else if (JoyStatus_LCL & JOY_RIGHT)
+ ReportData->X = 1;
if (JoyStatus_LCL & JOY_PRESS)
ReportData->Button = (1 << 0);