Added new USB_DeviceState variable to keep track of the current Device mode USB state.
[pub/USBasp.git] / Demos / Device / LowLevel / RNDISEthernet / RNDISEthernet.c
index 1c0e030..ca38c24 100644 (file)
@@ -285,7 +285,7 @@ void Ethernet_Task(void)
           Ethernet frame at a time, so the FrameInBuffer bool is used to indicate when the buffers contain data. */\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
        /* Check if a frame has been written to the IN frame buffer */\r