case REQ_GetLineEncoding:\r
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
for (uint8_t i = 0; i < sizeof(LineCoding); i++)\r
Endpoint_Write_Byte(*(LineCodingData++)); \r
\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsOUTReceived()));\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r
case REQ_SetLineEncoding:\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
while (!(Endpoint_IsOUTReceived()));\r
\r
for (uint8_t i = 0; i < sizeof(LineCoding); i++)\r
*(LineCodingData++) = Endpoint_Read_Byte();\r
\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
case REQ_SetControlLineState:\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
switch (bRequest)\r
{\r
case DFU_DNLOAD:\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Check if bootloader is waiting to terminate */\r
if (WaitForExit)\r
/* Check if endpoint is empty - if so clear it and wait until ready for next packet */\r
if (!(Endpoint_BytesInEndpoint()))\r
{\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
while (!(Endpoint_IsOUTReceived()));\r
}\r
\r
/* Check if endpoint is empty - if so clear it and wait until ready for next packet */\r
if (!(Endpoint_BytesInEndpoint()))\r
{\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
while (!(Endpoint_IsOUTReceived()));\r
}\r
\r
}\r
}\r
\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
break;\r
case DFU_UPLOAD:\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
while (!(Endpoint_IsINReady()));\r
\r
/* Check if endpoint is full - if so clear it and wait until ready for next packet */\r
if (Endpoint_BytesInEndpoint() == FIXED_CONTROL_ENDPOINT_SIZE)\r
{\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
while (!(Endpoint_IsINReady()));\r
}\r
\r
/* Check if endpoint is full - if so clear it and wait until ready for next packet */\r
if (Endpoint_BytesInEndpoint() == FIXED_CONTROL_ENDPOINT_SIZE)\r
{\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
while (!(Endpoint_IsINReady()));\r
}\r
\r
DFU_State = dfuIDLE;\r
}\r
\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsOUTReceived()));\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
\r
break;\r
case DFU_GETSTATUS:\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Write 8-bit status value */\r
Endpoint_Write_Byte(DFU_Status);\r
/* Write 8-bit state string ID number */\r
Endpoint_Write_Byte(0);\r
\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsOUTReceived()));\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
\r
break; \r
case DFU_CLRSTATUS:\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Reset the status value variable to the default OK status */\r
DFU_Status = OK;\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
break;\r
case DFU_GETSTATE:\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Write the current device state to the endpoint */\r
Endpoint_Write_Byte(DFU_State);\r
\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsOUTReceived()));\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
\r
break;\r
case DFU_ABORT:\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Reset the current state variable to the default idle state */\r
DFU_State = dfuIDLE;\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
break;\r
}\r
{\r
if (!(Endpoint_BytesInEndpoint()))\r
{\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
\r
/* Wait until next data packet received */\r
while (!(Endpoint_IsOUTReceived()));\r
case REQ_SetReport:\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Wait until the command (report) has been sent by the host */\r
while (!(Endpoint_IsOUTReceived()));\r
/* Check if endpoint is empty - if so clear it and wait until ready for next packet */\r
if (!(Endpoint_BytesInEndpoint()))\r
{\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
while (!(Endpoint_IsOUTReceived()));\r
}\r
\r
boot_rww_enable();\r
}\r
\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
{\r
uint16_t wValue = Endpoint_Read_Word_LE();\r
\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Check if the host is enabling the audio interface (setting AlternateSetting to 1) */\r
if (wValue)\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
{\r
uint16_t wValue = Endpoint_Read_Word_LE();\r
\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Check if the host is enabling the audio interface (setting AlternateSetting to 1) */\r
if (wValue)\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
{ \r
/* Acknowledge the SETUP packet, ready for data transfer */\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Write the line coding data to the control endpoint */\r
Endpoint_Write_Control_Stream_LE(LineCodingData, sizeof(CDC_Line_Coding_t));\r
\r
/* Finalize the stream transfer to send the last packet or clear the host abort */\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
/* Acknowledge the SETUP packet, ready for data transfer */\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Read the line coding data in from the host into the global struct */\r
Endpoint_Read_Control_Stream_LE(LineCodingData, sizeof(CDC_Line_Coding_t));\r
\r
/* Finalize the stream transfer to clear the last packet from the host */\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
#endif\r
\r
/* Acknowledge the SETUP packet, ready for data transfer */\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
{ \r
/* Acknowledge the SETUP packet, ready for data transfer */\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Write the line coding data to the control endpoint */\r
Endpoint_Write_Control_Stream_LE(LineCodingData, sizeof(CDC_Line_Coding_t));\r
\r
/* Finalize the stream transfer to send the last packet or clear the host abort */\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
/* Acknowledge the SETUP packet, ready for data transfer */\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Read the line coding data in from the host into the global struct */\r
Endpoint_Read_Control_Stream_LE(LineCodingData, sizeof(CDC_Line_Coding_t));\r
\r
/* Finalize the stream transfer to clear the last packet from the host */\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
/* Acknowledge the SETUP packet, ready for data transfer */\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
case REQ_GetReport:\r
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
uint8_t GenericData[GENERIC_REPORT_SIZE];\r
\r
Endpoint_Write_Control_Stream_LE(&GenericData, sizeof(GenericData));\r
\r
/* Finalize the stream transfer to send the last packet or clear the host abort */\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r
case REQ_SetReport:\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Wait until the generic report has been sent by the host */\r
while (!(Endpoint_IsOUTReceived()));\r
ProcessGenericHIDReport(GenericData);\r
\r
/* Clear the endpoint data */\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
\r
/* Wait until the host is ready to receive the request confirmation */\r
while (!(Endpoint_IsINReady()));\r
\r
/* Handshake the request by sending an empty IN packet */\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
if (wLength > sizeof(JoystickReportData))\r
wLength = sizeof(JoystickReportData);\r
\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Write the report data to the control endpoint */\r
Endpoint_Write_Control_Stream_LE(&JoystickReportData, wLength);\r
\r
/* Finalize the stream transfer to send the last packet or clear the host abort */\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r
if (wLength > sizeof(KeyboardReportData))\r
wLength = sizeof(KeyboardReportData);\r
\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Write the report data to the control endpoint */\r
Endpoint_Write_Control_Stream_LE(&KeyboardReportData, wLength);\r
\r
/* Finalize the stream transfer to send the last packet or clear the host abort */\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r
case REQ_SetReport:\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Wait until the LED report has been sent by the host */\r
while (!(Endpoint_IsOUTReceived()));\r
ProcessLEDReport(LEDStatus);\r
\r
/* Clear the endpoint data */\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
case REQ_GetProtocol:\r
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Write the current protocol flag to the host */\r
Endpoint_Write_Byte(UsingReportProtocol);\r
\r
/* Send the flag to the host */\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsOUTReceived()));\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r
/* Read in the wValue parameter containing the new protocol mode */\r
uint16_t wValue = Endpoint_Read_Word_LE();\r
\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Set or clear the flag depending on what the host indicates that the current Protocol should be */\r
UsingReportProtocol = (wValue != 0x0000);\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
/* Read in the wValue parameter containing the idle period */\r
uint16_t wValue = Endpoint_Read_Word_LE();\r
\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Get idle period in MSB */\r
IdleCount = (wValue >> 8);\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
case REQ_GetIdle:\r
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
{ \r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Write the current idle duration to the host */\r
Endpoint_Write_Byte(IdleCount);\r
\r
/* Send the flag to the host */\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsOUTReceived()));\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r
if (wLength > ReportSize)\r
wLength = ReportSize;\r
\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\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_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r
case REQ_SetReport:\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Wait until the LED report has been sent by the host */\r
while (!(Endpoint_IsOUTReceived()));\r
LEDs_SetAllLEDs(LEDMask);\r
\r
/* Clear the endpoint data */\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
case REQ_MassStorageReset:\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Indicate that the current transfer should be aborted */\r
IsMassStoreReset = true; \r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
case REQ_GetMaxLUN:\r
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Indicate to the host the number of supported LUNs (virtual disks) on the device */\r
Endpoint_Write_Byte(TOTAL_LUNS - 1);\r
\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsOUTReceived()));\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r
if (wLength > sizeof(MouseReportData))\r
wLength = sizeof(MouseReportData);\r
\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Write the report data to the control endpoint */\r
Endpoint_Write_Control_Stream_LE(&MouseReportData, wLength);\r
memset(&MouseReportData, 0, sizeof(MouseReportData));\r
\r
/* Finalize the stream transfer to send the last packet or clear the host abort */\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r
case REQ_GetProtocol:\r
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Write the current protocol flag to the host */\r
Endpoint_Write_Byte(UsingReportProtocol);\r
\r
/* Send the flag to the host */\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsOUTReceived()));\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r
/* Read in the wValue parameter containing the new protocol mode */\r
uint16_t wValue = Endpoint_Read_Word_LE();\r
\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Set or clear the flag depending on what the host indicates that the current Protocol should be */\r
UsingReportProtocol = (wValue != 0x0000);\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
/* Read in the wValue parameter containing the idle period */\r
uint16_t wValue = Endpoint_Read_Word_LE();\r
\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Get idle period in MSB */\r
IdleCount = (wValue >> 8);\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
case REQ_GetIdle:\r
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
{ \r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Write the current idle duration to the host */\r
Endpoint_Write_Byte(IdleCount);\r
\r
/* Send the flag to the host */\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsOUTReceived()));\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
/* Clear the SETUP packet, ready for data transfer */\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Read in the RNDIS message into the message buffer */\r
Endpoint_Read_Control_Stream_LE(RNDISMessageBuffer, wLength);\r
\r
/* Finalize the stream transfer to clear the last packet from the host */\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
/* Process the RNDIS message */\r
ProcessRNDISControlMessage();\r
wLength = MessageHeader->MessageLength;\r
\r
/* Clear the SETUP packet, ready for data transfer */\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Write the message response data to the endpoint */\r
Endpoint_Write_Control_Stream_LE(RNDISMessageBuffer, wLength);\r
\r
/* Finalize the stream transfer to send the last packet or clear the host abort */\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
\r
/* Reset the message header once again after transmission */\r
MessageHeader->MessageLength = 0;\r
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
{ \r
/* Acknowledge the SETUP packet, ready for data transfer */\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Write the line coding data to the control endpoint */\r
Endpoint_Write_Control_Stream_LE(LineCodingData, sizeof(LineCoding));\r
\r
/* Finalize the stream transfer to send the last packet or clear the host abort */\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
/* Acknowledge the SETUP packet, ready for data transfer */\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Read the line coding data in from the host into the global struct */\r
Endpoint_Read_Control_Stream_LE(LineCodingData, sizeof(LineCoding));\r
\r
/* Finalize the stream transfer to clear the last packet from the host */\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
/* Reconfigure the USART with the new settings */\r
ReconfigureUSART();\r
#endif\r
\r
/* Acknowledge the SETUP packet, ready for data transfer */\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
* - The USB Host management task now saves and restores the currently selected pipe before and after the task completes\r
* - Fixed GenericHIDHost demo report write routine incorrect for control type requests (thanks to Andrei Krainev)\r
* - Removed Endpoint_ClearCurrentBank() and Pipe_ClearCurrentBank() in favour of new Endpoint_ClearIN(), Endpoint_ClearOUT(),\r
- * Endpoint_ClearControlIN(), Endpoint_ClearControlOUT(), Pipe_ClearIN(), Pipe_ClearOUT(), Pipe_ClearControlIN() and\r
- * Pipe_ClearControlOUT() macros (done to allow for the detection of packets of zero length)\r
+ * Pipe_ClearIN() and Pipe_ClearOUT() macros (done to allow for the detection of packets of zero length)\r
* - Renamed *_ReadWriteAllowed() macros to *_IsReadWriteAllowed() to remain consistent with the rest of the LUFA API\r
* - Endpoint_IsSetupReceived() macro has been renamed to Endpoint_IsSETUPReceived(), Endpoint_ClearSetupReceived() macro has been\r
- * renamed to Endpoint_ClearControlSETUP(), the Pipe_IsSetupSent() macro has been renamed to Pipe_IsSETUPSent() and the\r
+ * renamed to Endpoint_ClearSETUP(), the Pipe_IsSetupSent() macro has been renamed to Pipe_IsSETUPSent() and the\r
* Pipe_ClearSetupSent() macro is no longer applicable and should be removed - changes made to compliment the new endpoint and pipe\r
* bank management API\r
- * - Updated all demos, bootloaders and projects to use the new endpoint and pipe management APIs (thanks to Roman Thiel)\r
+ * - Updated all demos, bootloaders and projects to use the new endpoint and pipe management APIs (thanks to Roman Thiel (Curetis AG))\r
* - Updated library doxygen documentation, added groups, changed documentation macro functions to real functions for clarity\r
* - Removed old endpoint and pipe aliased read/write/discard routines which did not have an explicit endian specifier for clarity\r
* - Removed the ButtLoadTag.h header file, as no one used for its intended purpose anyway\r
if (Endpoint_IsSETUPReceived())\r
{\r
Endpoint_StallTransaction();\r
- Endpoint_ClearControlSETUP(); \r
+ Endpoint_ClearSETUP(); \r
}\r
}\r
\r
{\r
uint8_t wValue_LSB = Endpoint_Read_Byte();\r
\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
while (!(Endpoint_IsINReady()));\r
\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
while (!(Endpoint_IsINReady()));\r
\r
return;\r
}\r
\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
USB_ConfigurationNumber = wValue_LSB;\r
\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
if (!(AlreadyConfigured) && USB_ConfigurationNumber)\r
RAISE_EVENT(USB_DeviceEnumerationComplete);\r
\r
void USB_Device_GetConfiguration(void)\r
{\r
- Endpoint_ClearControlSETUP(); \r
+ Endpoint_ClearSETUP(); \r
\r
Endpoint_Write_Byte(USB_ConfigurationNumber);\r
\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
while (!(Endpoint_IsOUTReceived()));\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
static void USB_Device_GetDescriptor(void)\r
if ((DescriptorSize = USB_GetDescriptor(wValue, wIndex, &DescriptorPointer)) == NO_DESCRIPTOR)\r
return;\r
\r
- Endpoint_ClearControlSETUP(); \r
+ Endpoint_ClearSETUP(); \r
\r
if (wLength > DescriptorSize)\r
wLength = DescriptorSize;\r
{\r
if (Endpoint_IsOUTReceived())\r
{\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
return;\r
} \r
}\r
}\r
\r
SendZLP = (Endpoint_BytesInEndpoint() == USB_ControlEndpointSize);\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
if (SendZLP)\r
{\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
while (!(Endpoint_IsOUTReceived()));\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
static void USB_Device_GetStatus(const uint8_t bmRequestType)\r
}\r
\r
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP); \r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
Endpoint_Write_Word_LE(CurrentStatus);\r
\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
while (!(Endpoint_IsOUTReceived()));\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
#if !defined(FEATURELESS_CONTROL_ONLY_DEVICE)\r
}\r
\r
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);\r
- Endpoint_ClearControlSETUP();\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearSETUP();\r
+ Endpoint_ClearIN();\r
}\r
}\r
\r
Endpoint_SelectEndpoint(Number);\r
Endpoint_EnableEndpoint();\r
\r
- UECFG1X = 0; \r
+ UECFG1X = 0;\r
\r
UECFG0X = UECFG0XData;\r
UECFG1X = UECFG1XData;\r
}\r
\r
SendZLP = (Endpoint_BytesInEndpoint() == USB_ControlEndpointSize);\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
if (Endpoint_IsOUTReceived())\r
if (SendZLP)\r
{\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
while (!(Endpoint_IsOUTReceived()));\r
}\r
\r
SendZLP = (Endpoint_BytesInEndpoint() == USB_ControlEndpointSize);\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
if (Endpoint_IsOUTReceived())\r
if (SendZLP)\r
{\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
while (!(Endpoint_IsOUTReceived()));\r
Length--;\r
}\r
\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
while (!(Endpoint_IsINReady()));\r
Length--;\r
}\r
\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
while (!(Endpoint_IsINReady()));\r
*\r
* \note This is not applicable for non CONTROL type endpoints. \r
*/\r
- static inline void Endpoint_ClearControlSETUP(void);\r
+ static inline void Endpoint_ClearSETUP(void);\r
\r
- /** Sends an IN packet to the host on the currently selected CONTROL type endpoint, freeing up the\r
- * endpoint for the next packet.\r
- *\r
- * \ingroup Group_EndpointPacketManagement\r
- *\r
- * \note For non CONTROL type endpoints, use Endpoint_ClearIN() instead. \r
- */\r
- static inline void Endpoint_ClearControlIN(void);\r
- \r
- /** Acknowledges an OUT packet to the host on the currently selected CONTROL type endpoint, freeing\r
- * up the endpoint for the next packet.\r
+ /** Sends an IN packet to the host on the currently selected endpoint, freeing up the endpoint for the\r
+ * next packet and switching to the alternative endpoint bank if double banked.\r
*\r
* \ingroup Group_EndpointPacketManagement\r
- *\r
- * \note For non CONTROL type endpoints, use Endpoint_ClearOUT() instead.\r
- */\r
- static inline void Endpoint_ClearControlOUT(void);\r
- \r
- /** Sends an IN packet to the host on the currently selected non CONTROL type endpoint, freeing\r
- * up the endpoint for the next packet and switching to the alternative endpoint bank if double banked.\r
- *\r
- * \ingroup Group_EndpointPacketManagement\r
- *\r
- * \note For CONTROL type endpoints, use Endpoint_ClearControlIN() instead.\r
*/\r
static inline void Endpoint_ClearIN(void);\r
\r
- /** Acknowledges an OUT packet to the host on the currently selected non CONTROL type endpoint, freeing\r
- * up the endpoint for the next packet and switching to the alternative endpoint bank if double banked.\r
+ /** Acknowledges an OUT packet to the host on the currently selected endpoint, freeing up the endpoint\r
+ * for the next packet and switching to the alternative endpoint bank if double banked.\r
*\r
* \ingroup Group_EndpointPacketManagement\r
- *\r
- * \note For CONTROL type endpoints, use Endpoint_ClearControlOUT() instead.\r
*/\r
static inline void Endpoint_ClearOUT(void);\r
\r
\r
#define Endpoint_IsSETUPReceived() ((UEINTX & (1 << RXSTPI)) ? true : false)\r
\r
- #define Endpoint_ClearControlSETUP() MACROS{ UEINTX &= ~(1 << RXSTPI); }MACROE\r
-\r
- #define Endpoint_ClearControlIN() MACROS{ UEINTX &= ~(1 << TXINI); }MACROE\r
-\r
- #define Endpoint_ClearControlOUT() MACROS{ UEINTX &= ~(1 << RXOUTI); }MACROE\r
+ #define Endpoint_ClearSETUP() MACROS{ UEINTX &= ~(1 << RXSTPI); }MACROE\r
\r
#define Endpoint_ClearIN() MACROS{ uint8_t Temp = UEINTX; UEINTX = (Temp & ~(1 << TXINI)); \\r
UEINTX = (Temp & ~(1 << FIFOCON)); }MACROE\r
/** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in little endian,\r
* sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared\r
* in both failure and success states; the user is responsible for manually clearing the setup OUT to\r
- * finalize the transfer via the Endpoint_ClearControlOUT() macro.\r
+ * finalize the transfer via the Endpoint_ClearOUT() macro.\r
*\r
* \note This routine should only be used on CONTROL type endpoints.\r
*\r
/** Writes the given number of bytes to the CONTROL type endpoint from the given buffer in big endian,\r
* sending full packets to the host as needed. The host OUT acknowledgement is not automatically cleared\r
* in both failure and success states; the user is responsible for manually clearing the setup OUT to\r
- * finalize the transfer via the Endpoint_ClearControlOUT() macro.\r
+ * finalize the transfer via the Endpoint_ClearOUT() macro.\r
*\r
* \note This routine should only be used on CONTROL type endpoints.\r
*\r
/** Reads the given number of bytes from the CONTROL endpoint from the given buffer in little endian,\r
* discarding fully read packets from the host as needed. The device IN acknowledgement is not\r
* automatically sent after success or failure states; the user is responsible for manually sending the\r
- * setup IN to finalize the transfer via the Endpoint_ClearControlIN() macro.\r
+ * setup IN to finalize the transfer via the Endpoint_ClearIN() macro.\r
*\r
* \note This routine should only be used on CONTROL type endpoints.\r
*\r
*\r
* \return A value from the Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
*/\r
- uint8_t Endpoint_Read_Control_Stream_LE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
+ uint8_t Endpoint_Read_Control_Stream_LE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1);\r
\r
/** Reads the given number of bytes from the CONTROL endpoint from the given buffer in big endian,\r
* discarding fully read packets from the host as needed. The device IN acknowledgement is not\r
* automatically sent after success or failure states; the user is responsible for manually sending the\r
- * setup IN to finalize the transfer via the Endpoint_ClearControlIN() macro.\r
+ * setup IN to finalize the transfer via the Endpoint_ClearIN() macro.\r
*\r
* \note This routine should only be used on CONTROL type endpoints.\r
*\r
*\r
* \return A value from the Endpoint_ControlStream_RW_ErrorCodes_t enum.\r
*/\r
- uint8_t Endpoint_Read_Control_Stream_BE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1); \r
+ uint8_t Endpoint_Read_Control_Stream_BE(void* Buffer, uint16_t Length) ATTR_NON_NULL_PTR_ARG(1); \r
\r
/* Private Interface - For use in library only: */\r
#if !defined(__DOXYGEN__)\r
for (uint8_t HeaderByte = 0; HeaderByte < sizeof(USB_Host_Request_Header_t); HeaderByte++)\r
Pipe_Write_Byte(*(HeaderStream++));\r
\r
- Pipe_ClearControlSETUP();\r
+ Pipe_ClearSETUP();\r
\r
if ((ReturnStatus = USB_Host_Wait_For_Setup_IOS(USB_HOST_WAITFOR_SetupSent)))\r
goto End_Of_Control_Send;\r
}\r
\r
Pipe_Freeze();\r
- Pipe_ClearControlIN();\r
+ Pipe_ClearIN();\r
}\r
}\r
\r
if ((ReturnStatus = USB_Host_Wait_For_Setup_IOS(USB_HOST_WAITFOR_OutReady)))\r
goto End_Of_Control_Send;\r
\r
- Pipe_ClearControlOUT();\r
+ Pipe_ClearOUT();\r
\r
if ((ReturnStatus = USB_Host_Wait_For_Setup_IOS(USB_HOST_WAITFOR_OutReady)))\r
goto End_Of_Control_Send;\r
DataLen--;\r
}\r
\r
- Pipe_ClearControlOUT();\r
+ Pipe_ClearOUT();\r
}\r
\r
if ((ReturnStatus = USB_Host_Wait_For_Setup_IOS(USB_HOST_WAITFOR_OutReady)))\r
if ((ReturnStatus = USB_Host_Wait_For_Setup_IOS(USB_HOST_WAITFOR_InReceived)))\r
goto End_Of_Control_Send;\r
\r
- Pipe_ClearControlIN();\r
+ Pipe_ClearIN();\r
}\r
\r
End_Of_Control_Send:\r
*/\r
static inline bool Pipe_IsSETUPSent(void);\r
\r
- /** Acknowledges the reception of a setup IN request from the attached device on the currently selected\r
- * CONTROL type pipe, freeing the bank ready for the next packet.\r
- *\r
- * \ingroup Group_PipePacketManagement\r
- *\r
- * \note For non CONTROL type pipes, use Pipe_ClearIN() instead. \r
- */\r
- static inline void Pipe_ClearControlIN(void);\r
-\r
- /** Sends the currently selected pipe's contents to the device as an OUT packet on the selected pipe, freeing\r
- * the bank ready for the next packet.\r
- *\r
- * \ingroup Group_PipePacketManagement\r
- *\r
- * \note For non CONTROL type pipes, use Pipe_ClearOUT() instead. \r
- */\r
- static inline void Pipe_ClearControlOUT(void);\r
-\r
/** Sends the currently selected CONTROL type pipe's contents to the device as a SETUP packet.\r
*\r
- * \ingroup Group_PipePacketManagement\r
- *\r
- * \note This is not applicable for non CONTROL type pipes. \r
+ * \ingroup Group_PipePacketManagement \r
*/\r
- static inline void Pipe_ClearControlSETUP(void);\r
+ static inline void Pipe_ClearSETUP(void);\r
\r
/** Acknowledges the reception of a setup IN request from the attached device on the currently selected\r
* pipe, freeing the bank ready for the next packet.\r
*\r
* \ingroup Group_PipePacketManagement\r
- *\r
- * \note For CONTROL type pipes, use Pipe_ClearControlIN() instead. \r
*/\r
static inline void Pipe_ClearIN(void);\r
\r
* the bank ready for the next packet.\r
*\r
* \ingroup Group_PipePacketManagement\r
- *\r
- * \note For CONTROL type pipes, use Pipe_ClearControlOUT() instead. \r
*/\r
static inline void Pipe_ClearOUT(void);\r
\r
#define Pipe_ClearIN() MACROS{ uint8_t Temp = UPINTX; UPINTX = (Temp & ~(1 << RXINI)); \\r
UPINTX = (Temp & ~(1 << FIFOCON)); }MACROE\r
\r
- #define Pipe_ClearControlIN() MACROS{ uint8_t Temp = UPINTX; UPINTX = (Temp & ~(1 << RXINI)); \\r
- UPINTX = (Temp & ~(1 << FIFOCON)); }MACROE\r
-\r
#define Pipe_ClearOUT() MACROS{ uint8_t Temp = UPINTX; UPINTX = (Temp & ~(1 << TXOUTI)); \\r
UPINTX = (Temp & ~(1 << FIFOCON)); }MACROE\r
\r
- #define Pipe_ClearControlOUT() MACROS{ uint8_t Temp = UPINTX; UPINTX = (Temp & ~(1 << TXOUTI)); \\r
- UPINTX = (Temp & ~(1 << FIFOCON)); }MACROE\r
-\r
- #define Pipe_ClearControlSETUP() MACROS{ uint8_t Temp = UPINTX; UPINTX = (Temp & ~(1 << TXSTPI)); \\r
+ #define Pipe_ClearSETUP() MACROS{ uint8_t Temp = UPINTX; UPINTX = (Temp & ~(1 << TXSTPI)); \\r
UPINTX = (Temp & ~(1 << FIFOCON)); }MACROE\r
\r
#define Pipe_IsNAKReceived() ((UPINTX & (1 << NAKEDI)) ? true : false)\r
* library demos should update to the latest versions.\r
*\r
* <b>Device Mode</b>\r
- * - The Endpoint_ClearCurrentBank() macro has been removed, and is now replaced with the Endpoint_ClearIN(), Endpoint_ClearOUT(),\r
- * Endpoint_ClearControlIN(), Endpoint_ClearControlOUT() and other related macros. See Endpoint.h documentation for more details\r
- * on the new endpoint management macros.\r
+ * - The Endpoint_ClearCurrentBank() macro has been removed, and is now replaced with the Endpoint_ClearIN(), Endpoint_ClearOUT() \r
+ * macros. See Endpoint.h documentation for more details on the new endpoint management macros.\r
* - The Endpoint_ReadWriteAllowed() macro has been renamed to Endpoint_IsReadWriteAllowed() to be more consistent with the rest of\r
* the API naming scheme.\r
* - The Endpoint_IsSetupINReady() and Endpoint_IsSetupOutReceived() macros have been renamed to Endpoint_IsINReady() and\r
* Endpoint_IsOUTReceived() respectively.\r
* - The Endpoint_IsSetupReceived() macro has been renamed to Endpoint_IsSETUPReceived().\r
- * - The Endpoint_ClearSetupReceived() macro has been renamed to Endpoint_ClearControlSETUP().\r
+ * - The Endpoint_ClearSetupReceived() macro has been renamed to Endpoint_ClearSETUP().\r
* - All endpoint read/write/discard aliases which did not have an explicitly endianness specifier (such as Endpoint_Read_Word()) have\r
* been removed for clarity. Existing projects should use the "_LE" suffix on such calls to use the explicit Little Endian versions.\r
*\r
* in existing projects where the Control pipe is to be operated on.\r
* - The USB Host management task now saves and restores the currently selected pipe before and after the task runs. Projects no longer\r
* need to manage this manually when calling the USB management task.\r
- * - The Pipe_ClearCurrentBank() macro has been removed, and is now replaced with the Pipe_ClearIN(), Pipe_ClearOUT(),\r
- * Pipe_ClearControlIN(), Pipe_ClearControlOUT() and other related macros. See Pipe.h documentation for more details on the new pipe\r
- * management macros.\r
+ * - The Pipe_ClearCurrentBank() macro has been removed, and is now replaced with the Pipe_ClearIN(), Pipe_ClearOUT() macros. See\r
+ * Pipe.h documentation for more details on the new pipe management macros.\r
* - The Pipe_ReadWriteAllowed() macro has been renamed to Pipe_IsReadWriteAllowed() to be more consistent with the rest of the API\r
* naming scheme.\r
* - The Pipe_IsSetupINReceived() and Pipe_IsOutReady() macros have been renamed to Pipe_IsINReceived() and Pipe_IsOUTReady()\r
* respectively.\r
- * - The new Pipe_ClearControlSETUP() macro should be used to send CONTROL transactions, rather than the previous Pipe_ClearSetupOUT() macro.\r
+ * - The new Pipe_ClearSETUP() macro should be used to send SETUP transactions, rather than the previous Pipe_ClearSetupOUT() macro.\r
* - The Pipe_IsSetupSent() macro has been renamed to Pipe_IsSETUPSent().\r
* - The Pipe_ClearSetupSent() macro is no longer applicable and should be removed.\r
* - All pipe read/write/discard aliases which did not have an explicitly endianness specifier (such as Pipe_Read_Word()) have\r
if (wLength > sizeof(KeyboardReportData))\r
wLength = sizeof(KeyboardReportData);\r
\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Write the report data to the control endpoint */\r
Endpoint_Write_Control_Stream_LE(&KeyboardReportData, wLength);\r
\r
/* Finalize the stream transfer to send the last packet or clear the host abort */\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r
case REQ_GetProtocol:\r
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Write the current protocol flag to the host */\r
Endpoint_Write_Byte(UsingReportProtocol);\r
\r
/* Send the flag to the host */\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsOUTReceived()));\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r
/* Read in the wValue parameter containing the new protocol mode */\r
uint16_t wValue = Endpoint_Read_Word_LE();\r
\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Set or clear the flag depending on what the host indicates that the current Protocol should be */\r
UsingReportProtocol = (wValue != 0x0000);\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
/* Read in the wValue parameter containing the idle period */\r
uint16_t wValue = Endpoint_Read_Word_LE();\r
\r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Get idle period in MSB */\r
IdleCount = (wValue >> 8);\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsINReady()));\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
}\r
\r
break;\r
case REQ_GetIdle:\r
if (bmRequestType == (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE))\r
{ \r
- Endpoint_ClearControlSETUP();\r
+ Endpoint_ClearSETUP();\r
\r
/* Write the current idle duration to the host */\r
Endpoint_Write_Byte(IdleCount);\r
\r
/* Send the flag to the host */\r
- Endpoint_ClearControlIN();\r
+ Endpoint_ClearIN();\r
\r
/* Acknowledge status stage */\r
while (!(Endpoint_IsOUTReceived()));\r
- Endpoint_ClearControlOUT();\r
+ Endpoint_ClearOUT();\r
}\r
\r
break;\r