X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/f896c00c48f04fb9273555ab8d9b1af99f865d25..cbbd3d746acef02a4afd562652a2ba71b24dfd6f:/Demos/Device/ClassDriver/CDC/CDC.c diff --git a/Demos/Device/ClassDriver/CDC/CDC.c b/Demos/Device/ClassDriver/CDC/CDC.c index 8ecfb7b37..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); @@ -107,7 +106,7 @@ void CheckJoystickMovement(void) char* ReportString = NULL; static bool ActionSent = false; - char* JoystickStrings[] = + char* const JoystickStrings[] = { "Joystick Up\r\n", "Joystick Down\r\n",