aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/CDC/CDC.c
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/ClassDriver/CDC/CDC.c')
-rw-r--r--Demos/Device/ClassDriver/CDC/CDC.c3
1 files changed, 1 insertions, 2 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);