\r
#include "RNDISEthernet.h"\r
\r
-/* Project Tags, for reading out using the ButtLoad project */\r
-BUTTLOADTAG(ProjName, "LUFA RNDIS 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
if (bmRequestType == (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE))\r
{\r
/* Clear the SETUP packet, ready for data transfer */\r
- Endpoint_ClearSetupReceived();\r
+ Endpoint_ClearControlSETUP();\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_ClearSetupIN();\r
+ Endpoint_ClearControlIN();\r
\r
/* Process the RNDIS message */\r
ProcessRNDISControlMessage();\r
wLength = MessageHeader->MessageLength;\r
\r
/* Clear the SETUP packet, ready for data transfer */\r
- Endpoint_ClearSetupReceived();\r
+ Endpoint_ClearControlSETUP();\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_ClearSetupOUT();\r
+ Endpoint_ClearControlOUT();\r
\r
/* Reset the message header once again after transmission */\r
MessageHeader->MessageLength = 0;\r
Endpoint_SelectEndpoint(CDC_NOTIFICATION_EPNUM);\r
\r
/* Check if a message response is ready for the host */\r
- if (Endpoint_ReadWriteAllowed() && ResponseReady)\r
+ if (Endpoint_IsINReady() && ResponseReady)\r
{\r
USB_Notification_t Notification = (USB_Notification_t)\r
{\r
Endpoint_Write_Stream_LE(&Notification, sizeof(Notification));\r
\r
/* Finalize the stream transfer to send the last packet */\r
- Endpoint_ClearCurrentBank();\r
+ Endpoint_ClearIN();\r
\r
/* Indicate a response is no longer ready */\r
ResponseReady = false;\r
Endpoint_SelectEndpoint(CDC_RX_EPNUM);\r
\r
/* Check if the data OUT endpoint contains data, and that the IN buffer is empty */\r
- if (Endpoint_ReadWriteAllowed() && !(FrameIN.FrameInBuffer))\r
+ if (Endpoint_IsOUTReceived() && !(FrameIN.FrameInBuffer))\r
{\r
/* Read in the packet message header */\r
Endpoint_Read_Stream_LE(&RNDISPacketHeader, sizeof(RNDIS_PACKET_MSG_t));\r
Endpoint_Read_Stream_LE(FrameIN.FrameData, RNDISPacketHeader.DataLength);\r
\r
/* Finalize the stream transfer to send the last packet */\r
- Endpoint_ClearCurrentBank();\r
+ Endpoint_ClearOUT();\r
\r
/* Store the size of the Ethernet frame */\r
FrameIN.FrameLength = RNDISPacketHeader.DataLength;\r
Endpoint_SelectEndpoint(CDC_TX_EPNUM);\r
\r
/* Check if the data IN endpoint is ready for more data, and that the IN buffer is full */\r
- if (Endpoint_ReadWriteAllowed() && FrameOUT.FrameInBuffer)\r
+ if (Endpoint_IsINReady() && FrameOUT.FrameInBuffer)\r
{\r
/* Clear the packet header with all 0s so that the relevant fields can be filled */\r
memset(&RNDISPacketHeader, 0, sizeof(RNDIS_PACKET_MSG_t));\r
Endpoint_Write_Stream_LE(FrameOUT.FrameData, RNDISPacketHeader.DataLength);\r
\r
/* Finalize the stream transfer to send the last packet */\r
- Endpoint_ClearCurrentBank();\r
+ Endpoint_ClearIN();\r
\r
/* Indicate Ethernet OUT buffer no longer full */\r
FrameOUT.FrameInBuffer = false;\r