Corrected CDC class bootloader to fix a few bugs, changed address counter to store...
[pub/USBasp.git] / Demos / Mouse / Mouse.c
index da8a4a8..f8ec0a0 100644 (file)
@@ -113,6 +113,9 @@ EVENT_HANDLER(USB_Connect)
 \r
        /* Indicate USB enumerating */\r
        UpdateStatus(Status_USBEnumerating);\r
+\r
+       /* Default to report protocol on connect */\r
+       UsingReportProtocol = true;\r
 }\r
 \r
 /** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via\r
@@ -141,9 +144,6 @@ EVENT_HANDLER(USB_ConfigurationChanged)
        /* Indicate USB connected and ready */\r
        UpdateStatus(Status_USBReady);\r
 \r
-       /* Default to report protocol on connect */\r
-       UsingReportProtocol = true;\r
-\r
        /* Start running mouse reporting task */\r
        Scheduler_SetTaskMode(USB_Mouse_Report, TASK_RUN);\r
 }\r