diff options
Diffstat (limited to 'Demos/Device/LowLevel/USBtoSerial')
-rw-r--r-- | Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c b/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c index 3ed406db4..444aa5e1c 100644 --- a/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c +++ b/Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c @@ -265,7 +265,7 @@ void CDC_Task(void) while (!(Endpoint_IsReadWriteAllowed()));
/* Write the bytes from the buffer to the endpoint while space is available */
- while (Tx_Buffer.Elements && (Endpoint_BytesInEndpoint() < CDC_TXRX_EPSIZE))
+ while (Tx_Buffer.Elements && Endpoint_IsReadWriteAllowed())
{
/* Write each byte retreived from the buffer to the endpoint */
Endpoint_Write_Byte(Buffer_GetElement(&Tx_Buffer));
|