Fixed PDI programming mode in the AVRISP programmer project not exiting programming...
[pub/USBasp.git] / Demos / Device / ClassDriver / VirtualSerialMouse / VirtualSerialMouse.c
index 485a986..e7c899b 100644 (file)
@@ -1,13 +1,13 @@
 /*\r
              LUFA Library\r
 /*\r
              LUFA Library\r
-     Copyright (C) Dean Camera, 2009.\r
+     Copyright (C) Dean Camera, 2010.\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
               \r
   dean [at] fourwalledcubicle [dot] com\r
       www.fourwalledcubicle.com\r
 */\r
 \r
 /*\r
-  Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+  Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
 \r
   Permission to use, copy, modify, distribute, and sell this \r
   software and its documentation for any purpose is hereby granted\r
 \r
   Permission to use, copy, modify, distribute, and sell this \r
   software and its documentation for any purpose is hereby granted\r
@@ -71,7 +71,7 @@ USB_ClassInfo_HID_Device_t Mouse_HID_Interface =
        {\r
                .Config =\r
                        {\r
        {\r
                .Config =\r
                        {\r
-                               .InterfaceNumber                = 0,\r
+                               .InterfaceNumber                = 2,\r
 \r
                                .ReportINEndpointNumber         = MOUSE_EPNUM,\r
                                .ReportINEndpointSize           = MOUSE_EPSIZE,\r
 \r
                                .ReportINEndpointNumber         = MOUSE_EPNUM,\r
                                .ReportINEndpointSize           = MOUSE_EPSIZE,\r
@@ -217,7 +217,7 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
          MouseReport->X =  1;\r
 \r
        if (JoyStatus_LCL & JOY_PRESS)\r
          MouseReport->X =  1;\r
 \r
        if (JoyStatus_LCL & JOY_PRESS)\r
-         MouseReport->Button  = (1 << 0);\r
+         MouseReport->Button |= (1 << 0);\r
          \r
        if (ButtonStatus_LCL & BUTTONS_BUTTON1)\r
          MouseReport->Button |= (1 << 1);\r
          \r
        if (ButtonStatus_LCL & BUTTONS_BUTTON1)\r
          MouseReport->Button |= (1 << 1);\r