case REQ_GetReport:\r
if (USB_ControlRequest.bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
+ Endpoint_ClearSETUP();\r
+ \r
/* Determine if it is the mouse or the keyboard data that is being requested */\r
if (!(USB_ControlRequest.wIndex))\r
{\r
ReportSize = sizeof(MouseReportData);\r
}\r
\r
- Endpoint_ClearSETUP();\r
- \r
/* Write the report data to the control endpoint */\r
Endpoint_Write_Control_Stream_LE(ReportData, ReportSize);\r
\r
{\r
uint8_t JoyStatus_LCL = Joystick_GetStatus();\r
\r
- /* Check if HWB is not pressed, if so mouse mode enabled */\r
- if (!(HWB_GetStatus()))\r
+ /* Check if board button is not pressed, if so mouse mode enabled */\r
+ if (!(Buttons_GetStatus() & BUTTONS_BUTTON1))\r
{\r
if (JoyStatus_LCL & JOY_UP)\r
KeyboardReportData.KeyCode[0] = 0x04; // A\r
{\r
uint8_t JoyStatus_LCL = Joystick_GetStatus();\r
\r
- /* Check if HWB is pressed, if so mouse mode enabled */\r
- if (HWB_GetStatus())\r
+ /* Check if board button is pressed, if so mouse mode enabled */\r
+ if (Buttons_GetStatus() & BUTTONS_BUTTON1)\r
{\r
if (JoyStatus_LCL & JOY_UP)\r
MouseReportData.Y = 1;\r