while (!(Endpoint_IsReadWriteAllowed()));\r
\r
/* Write the bytes from the buffer to the endpoint while space is available */\r
- while (Tx_Buffer.Elements && (Endpoint_BytesInEndpoint() < CDC_TXRX_EPSIZE))\r
+ while (Tx_Buffer.Elements && Endpoint_IsReadWriteAllowed())\r
{\r
/* Write each byte retreived from the buffer to the endpoint */\r
Endpoint_Write_Byte(Buffer_GetElement(&Tx_Buffer));\r