Added new USB_DeviceState variable to keep track of the current Device mode USB state.
[pub/USBasp.git] / Demos / Device / Incomplete / Sideshow / Sideshow.c
index cc8bd51..d67fae0 100644 (file)
@@ -142,7 +142,7 @@ void EVENT_USB_UnhandledControlPacket(void)
 void SideShow_Task(void)\r
 {\r
        /* Device must be connected and configured for the task to run */\r
-       if (!(USB_IsConnected) || !(USB_ConfigurationNumber))\r
+       if (USB_DeviceState != DEVICE_STATE_Configured)\r
          return;\r
 \r
        /* Select the SideShow data out endpoint */\r