\r
#include "KeyboardMouse.h"\r
\r
-/* Project Tags, for reading out using the ButtLoad project */\r
-BUTTLOADTAG(ProjName, "LUFA MouseKBD App");\r
-BUTTLOADTAG(BuildTime, __TIME__);\r
-BUTTLOADTAG(BuildDate, __DATE__);\r
-BUTTLOADTAG(LUFAVersion, "LUFA V" LUFA_VERSION_STRING);\r
-\r
/* Scheduler Task List */\r
TASK_LIST\r
{\r
case REQ_GetReport:\r
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
- Endpoint_Ignore_Word();\r
+ Endpoint_Discard_Word();\r
\r
uint16_t wIndex = Endpoint_Read_Word_LE();\r
\r
if (wLength > ReportSize)\r
wLength = ReportSize;\r
\r
- Endpoint_ClearSetupReceived();\r
+ Endpoint_ClearControlSETUP();\r
\r
/* Write the report data to the control endpoint */\r
Endpoint_Write_Control_Stream_LE(ReportData, wLength);\r
memset(ReportData, 0, ReportSize);\r
\r
/* Finalize the stream transfer to send the last packet or clear the host abort */\r
- Endpoint_ClearSetupOUT();\r
+ Endpoint_ClearControlOUT();\r
}\r
\r
break;\r
case REQ_SetReport:\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
- Endpoint_ClearSetupReceived();\r
+ Endpoint_ClearControlSETUP();\r
\r
/* Wait until the LED report has been sent by the host */\r
- while (!(Endpoint_IsSetupOUTReceived()));\r
+ while (!(Endpoint_IsOUTReceived()));\r
\r
/* Read in the LED report from the host */\r
uint8_t LEDStatus = Endpoint_Read_Byte();\r
LEDs_SetAllLEDs(LEDMask);\r
\r
/* Clear the endpoint data */\r
- Endpoint_ClearSetupOUT();\r
+ Endpoint_ClearControlOUT();\r
\r
/* Acknowledge status stage */\r
- while (!(Endpoint_IsSetupINReady()));\r
- Endpoint_ClearSetupIN();\r
+ while (!(Endpoint_IsINReady()));\r
+ Endpoint_ClearControlIN();\r
}\r
\r
break;\r
Endpoint_SelectEndpoint(KEYBOARD_IN_EPNUM);\r
\r
/* Check if Keyboard Endpoint Ready for Read/Write */\r
- if (Endpoint_ReadWriteAllowed())\r
+ if (Endpoint_IsReadWriteAllowed())\r
{\r
/* Write Keyboard Report Data */\r
Endpoint_Write_Stream_LE(&KeyboardReportData, sizeof(KeyboardReportData));\r
\r
/* Finalize the stream transfer to send the last packet */\r
- Endpoint_ClearCurrentBank();\r
+ Endpoint_ClearIN();\r
\r
/* Clear the report data afterwards */\r
memset(&KeyboardReportData, 0, sizeof(KeyboardReportData));\r
Endpoint_SelectEndpoint(KEYBOARD_OUT_EPNUM);\r
\r
/* Check if Keyboard LED Endpoint Ready for Read/Write */\r
- if (Endpoint_ReadWriteAllowed())\r
+ if (Endpoint_IsReadWriteAllowed())\r
{ \r
/* Read in the LED report from the host */\r
uint8_t LEDStatus = Endpoint_Read_Byte();\r
LEDs_SetAllLEDs(LEDMask);\r
\r
/* Handshake the OUT Endpoint - clear endpoint and ready for next report */\r
- Endpoint_ClearCurrentBank();\r
+ Endpoint_ClearOUT();\r
}\r
}\r
}\r
Endpoint_SelectEndpoint(MOUSE_IN_EPNUM);\r
\r
/* Check if Mouse Endpoint Ready for Read/Write */\r
- if (Endpoint_ReadWriteAllowed())\r
+ if (Endpoint_IsReadWriteAllowed())\r
{\r
/* Write Mouse Report Data */\r
Endpoint_Write_Stream_LE(&MouseReportData, sizeof(MouseReportData));\r
\r
/* Finalize the stream transfer to send the last packet */\r
- Endpoint_ClearCurrentBank();\r
+ Endpoint_ClearIN();\r
\r
/* Clear the report data afterwards */\r
memset(&MouseReportData, 0, sizeof(MouseReportData));\r