\r
}\r
\r
-void CDC_Device_ProcessControlPacket(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo)\r
+void CDC_Device_ProcessControlRequest(USB_ClassInfo_CDC_Device_t* CDCInterfaceInfo)\r
{\r
if (!(Endpoint_IsSETUPReceived()))\r
return;\r
if (!(Endpoint_IsReadWriteAllowed()))\r
{\r
Endpoint_ClearIN();\r
-\r
- while (!(Endpoint_IsReadWriteAllowed()))\r
- {\r
- if (USB_DeviceState == DEVICE_STATE_Unattached)\r
- return;\r
- }\r
+ Endpoint_WaitUntilReady();\r
} \r
\r
Endpoint_ClearIN();\r
if (!(Endpoint_IsReadWriteAllowed()))\r
{\r
Endpoint_ClearIN();\r
- \r
- while (!(Endpoint_IsReadWriteAllowed()))\r
- {\r
- if (USB_DeviceState == DEVICE_STATE_Unattached)\r
- return; \r
- }\r
+ Endpoint_WaitUntilReady();\r
}\r
\r
Endpoint_Write_Byte(Data); \r