diff options
Diffstat (limited to 'Demos')
-rw-r--r-- | Demos/Device/ClassDriver/CDC/CDC.c | 3 | ||||
-rw-r--r-- | Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/Demos/Device/ClassDriver/CDC/CDC.c b/Demos/Device/ClassDriver/CDC/CDC.c index cc8abe416..95e1a6919 100644 --- a/Demos/Device/ClassDriver/CDC/CDC.c +++ b/Demos/Device/ClassDriver/CDC/CDC.c @@ -75,8 +75,7 @@ int main(void) {
CheckJoystickMovement();
- uint16_t BytesToDiscard = CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface);
- while (BytesToDiscard--)
+ while (CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface))
CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface);
CDC_Device_USBTask(&VirtualSerial_CDC_Interface);
diff --git a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c index 89537066c..637071a7e 100644 --- a/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c +++ b/Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c @@ -95,7 +95,7 @@ int main(void) if (Tx_Buffer.Elements)
CDC_Device_SendByte(&VirtualSerial_CDC_Interface, Buffer_GetElement(&Tx_Buffer));
- /* Read bytes from the USART transmit buffer into the USART */
+ /* Load bytes from the USART transmit buffer into the USART */
if (Rx_Buffer.Elements)
Serial_TxByte(Buffer_GetElement(&Rx_Buffer));
|