X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/3991c94b3858bbb02ca9ea6497cf60c84635b99a..eb410869474e14ec5762a96b930bc200409b6915:/Projects/Benito/Benito.c?ds=inline diff --git a/Projects/Benito/Benito.c b/Projects/Benito/Benito.c index 1afb74a72..26c566496 100644 --- a/Projects/Benito/Benito.c +++ b/Projects/Benito/Benito.c @@ -67,11 +67,6 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface = .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM, .NotificationEndpointSize = CDC_NOTIFICATION_EPSIZE, }, - - .State = - { - // Leave all state values to their defaults - } }; /** Main program entry point. This routine contains the overall program flow, including initial @@ -84,7 +79,7 @@ int main(void) for (;;) { /* Echo bytes from the host to the target via the hardware USART */ - if (CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface)) + if (CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface) > 0) { Serial_TxByte(CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface)); @@ -107,7 +102,7 @@ int main(void) /* Check if the LEDs should be ping-ponging (during enumeration) */ if (PingPongMSRemaining && !(--PingPongMSRemaining)) { - LEDs_ChangeLEDs(LEDMASK_BUSY, (~LEDs_GetLEDs() & LEDMASK_BUSY)); + LEDs_ToggleLEDs(LEDMASK_BUSY); PingPongMSRemaining = PING_PONG_LED_PULSE_MS; }