X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/5dbfdaa17dc4cb35783ec121453c7dfaca9874f3..a6e85d6ed80720e15477433f4abf0ca5f54422ba:/Demos/Device/ClassDriver/CDC/CDC.c?ds=inline 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);