Extend the automatic serial number descriptor code to read out and send all 10 bytes...
[pub/USBasp.git] / Demos / Device / LowLevel / RNDISEthernet / RNDISEthernet.c
index d77d25b..ca38c24 100644 (file)
@@ -284,6 +284,10 @@ void Ethernet_Task(void)
           outgoing frames should be loaded into the FrameOUT structure. Both structures can only hold a single\r
           Ethernet frame at a time, so the FrameInBuffer bool is used to indicate when the buffers contain data. */\r
 \r
           outgoing frames should be loaded into the FrameOUT structure. Both structures can only hold a single\r
           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_DeviceState != DEVICE_STATE_Configured)\r
+         return;\r
+\r
        /* Check if a frame has been written to the IN frame buffer */\r
        if (FrameIN.FrameInBuffer)\r
        {\r
        /* Check if a frame has been written to the IN frame buffer */\r
        if (FrameIN.FrameInBuffer)\r
        {\r