Commit for 090810rc1 release.
[pub/USBasp.git] / Projects / Benito / Benito.c
index 2f0317d..d7e0413 100644 (file)
@@ -67,11 +67,6 @@ USB_ClassInfo_CDC_Device_t VirtualSerial_CDC_Interface =
                                .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,\r
                                .NotificationEndpointSize   = CDC_NOTIFICATION_EPSIZE,\r
                        },\r
                                .NotificationEndpointNumber = CDC_NOTIFICATION_EPNUM,\r
                                .NotificationEndpointSize   = CDC_NOTIFICATION_EPSIZE,\r
                        },\r
-               \r
-               .State =\r
-                       {\r
-                               // Leave all state values to their defaults\r
-                       }\r
        };\r
 \r
 /** Main program entry point. This routine contains the overall program flow, including initial\r
        };\r
 \r
 /** Main program entry point. This routine contains the overall program flow, including initial\r
@@ -84,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
@@ -160,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
@@ -183,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