Commit for 090810rc1 release.
[pub/USBasp.git] / Projects / Benito / Benito.c
index 9e85fbd..d7e0413 100644 (file)
@@ -79,7 +79,7 @@ int main(void)
        for (;;)\r
        {\r
                /* Echo bytes from the host to the target via the hardware USART */\r
        for (;;)\r
        {\r
                /* Echo bytes from the host to the target via the hardware USART */\r
-               if (CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface))\r
+               if (CDC_Device_BytesReceived(&VirtualSerial_CDC_Interface) > 0)\r
                {\r
                        Serial_TxByte(CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface));\r
 \r
                {\r
                        Serial_TxByte(CDC_Device_ReceiveByte(&VirtualSerial_CDC_Interface));\r
 \r
@@ -155,21 +155,21 @@ void SetupHardware(void)
 }\r
 \r
 /** Event handler for the library USB Connection event. */\r
 }\r
 \r
 /** Event handler for the library USB Connection event. */\r
-void EVENT_USB_Connect(void)\r
+void EVENT_USB_Device_Connect(void)\r
 {\r
        PingPongMSRemaining = PING_PONG_LED_PULSE_MS;\r
        LEDs_SetAllLEDs(LEDMASK_TX);\r
 }\r
 \r
 /** Event handler for the library USB Disconnection event. */\r
 {\r
        PingPongMSRemaining = PING_PONG_LED_PULSE_MS;\r
        LEDs_SetAllLEDs(LEDMASK_TX);\r
 }\r
 \r
 /** Event handler for the library USB Disconnection event. */\r
-void EVENT_USB_Disconnect(void)\r
+void EVENT_USB_Device_Disconnect(void)\r
 {\r
        PingPongMSRemaining = 0;\r
        LEDs_TurnOffLEDs(LEDMASK_BUSY);\r
 }\r
 \r
 /** Event handler for the library USB Configuration Changed event. */\r
 {\r
        PingPongMSRemaining = 0;\r
        LEDs_TurnOffLEDs(LEDMASK_BUSY);\r
 }\r
 \r
 /** Event handler for the library USB Configuration Changed event. */\r
-void EVENT_USB_ConfigurationChanged(void)\r
+void EVENT_USB_Device_ConfigurationChanged(void)\r
 {\r
        PingPongMSRemaining = 0;\r
        LEDs_TurnOffLEDs(LEDMASK_BUSY);\r
 {\r
        PingPongMSRemaining = 0;\r
        LEDs_TurnOffLEDs(LEDMASK_BUSY);\r
@@ -178,10 +178,10 @@ void EVENT_USB_ConfigurationChanged(void)
          LEDs_TurnOnLEDs(LEDMASK_ERROR);\r
 }\r
 \r
          LEDs_TurnOnLEDs(LEDMASK_ERROR);\r
 }\r
 \r
-/** Event handler for the library USB Unhandled Control Packet event. */\r
-void EVENT_USB_UnhandledControlPacket(void)\r
+/** Event handler for the library USB Unhandled Control Request event. */\r
+void EVENT_USB_Device_UnhandledControlRequest(void)\r
 {\r
 {\r
-       CDC_Device_ProcessControlPacket(&VirtualSerial_CDC_Interface);\r
+       CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);\r
 }\r
 \r
 /** Event handler for the CDC Class driver Line Encoding Changed event.\r
 }\r
 \r
 /** Event handler for the CDC Class driver Line Encoding Changed event.\r