Endpoint_ClearIN();\r
\r
/* Wait until the endpoint is ready for another packet */\r
- while (!(Endpoint_IsINReady()))\r
- {\r
- if (USB_DeviceState == DEVICE_STATE_Unattached)\r
- return;\r
- }\r
+ Endpoint_WaitUntilReady();\r
\r
/* Send an empty packet to ensure that the host does not buffer data sent to it */\r
Endpoint_ClearIN();\r
Endpoint_ClearIN();\r
\r
/* Wait until the endpoint is ready for the next packet */\r
- while (!(Endpoint_IsINReady()))\r
- {\r
- if (USB_DeviceState == DEVICE_STATE_Unattached)\r
- return;\r
- }\r
+ Endpoint_WaitUntilReady();\r
\r
/* Send an empty packet to prevent host buffering */\r
Endpoint_ClearIN();\r