/*\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
- Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
- Copyright 2009 Denver Gingerich (denver [at] ossguy [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
.Config =\r
{\r
- .InterfaceNumber = 0,\r
+ .InterfaceNumber = 1,\r
\r
- .ReportINEndpointNumber = MOUSE_IN_EPNUM,\r
- .ReportINEndpointSize = HID_EPSIZE,\r
+ .ReportINEndpointNumber = MOUSE_IN_EPNUM,\r
+ .ReportINEndpointSize = HID_EPSIZE,\r
\r
- .PrevReportINBuffer = PrevMouseHIDReportBuffer,\r
- .PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer),\r
+ .PrevReportINBuffer = PrevMouseHIDReportBuffer,\r
+ .PrevReportINBufferSize = sizeof(PrevMouseHIDReportBuffer),\r
}, \r
};\r
\r
SetupHardware();\r
\r
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);\r
+ sei();\r
\r
for (;;)\r
{\r
if (!(ButtonStatus_LCL & BUTTONS_BUTTON1))\r
return 0;\r
\r
+ KeyboardReport->Modifier = HID_KEYBOARD_MODIFER_LEFTSHIFT;\r
+\r
if (JoyStatus_LCL & JOY_UP)\r
KeyboardReport->KeyCode[0] = 0x04; // A\r
else if (JoyStatus_LCL & JOY_DOWN)\r
MouseReport->X = 1;\r
\r
if (JoyStatus_LCL & JOY_PRESS)\r
- MouseReport->Button = (1 << 0);\r
+ MouseReport->Button |= (1 << 0);\r
\r
*ReportSize = sizeof(USB_MouseReport_Data_t);\r
return true; \r
uint8_t LEDMask = LEDS_NO_LEDS;\r
uint8_t* LEDReport = (uint8_t*)ReportData;\r
\r
- if (*LEDReport & 0x01) // NUM Lock\r
+ if (*LEDReport & HID_KEYBOARD_LED_NUMLOCK)\r
LEDMask |= LEDS_LED1;\r
\r
- if (*LEDReport & 0x02) // CAPS Lock\r
+ if (*LEDReport & HID_KEYBOARD_LED_CAPSLOCK)\r
LEDMask |= LEDS_LED3;\r
\r
- if (*LEDReport & 0x04) // SCROLL Lock\r
+ if (*LEDReport & HID_KEYBOARD_LED_SCROLLLOCK)\r
LEDMask |= LEDS_LED4;\r
\r
LEDs_SetAllLEDs(LEDMask);\r