diff options
Diffstat (limited to 'Demos/Device/ClassDriver')
-rw-r--r-- | Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c | 2 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/Mouse/Mouse.c | 2 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c index af6e83949..1c01730b0 100644 --- a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c +++ b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c @@ -217,7 +217,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn MouseReport->X = 1;
if (JoyStatus_LCL & JOY_PRESS)
- MouseReport->Button = (1 << 0);
+ MouseReport->Button |= (1 << 0);
*ReportSize = sizeof(USB_MouseReport_Data_t);
return true;
diff --git a/Demos/Device/ClassDriver/Mouse/Mouse.c b/Demos/Device/ClassDriver/Mouse/Mouse.c index 22f0895ea..48348c774 100644 --- a/Demos/Device/ClassDriver/Mouse/Mouse.c +++ b/Demos/Device/ClassDriver/Mouse/Mouse.c @@ -155,7 +155,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn MouseReport->X = 1;
if (JoyStatus_LCL & JOY_PRESS)
- MouseReport->Button = (1 << 0);
+ MouseReport->Button |= (1 << 0);
if (ButtonStatus_LCL & BUTTONS_BUTTON1)
MouseReport->Button |= (1 << 1);
diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c index 5edda2f9d..e7c899b79 100644 --- a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c +++ b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c @@ -217,7 +217,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn MouseReport->X = 1;
if (JoyStatus_LCL & JOY_PRESS)
- MouseReport->Button = (1 << 0);
+ MouseReport->Button |= (1 << 0);
if (ButtonStatus_LCL & BUTTONS_BUTTON1)
MouseReport->Button |= (1 << 1);
|