Fixed MIDI_Host_Flush() not aborting early when the specified MIDI host interface...
[pub/USBasp.git] / Demos / Device / ClassDriver / RNDISEthernet / RNDISEthernet.c
index 76c4906..d332b20 100644 (file)
@@ -123,10 +123,11 @@ void EVENT_USB_Device_Disconnect(void)
 /** Event handler for the library USB Configuration Changed event. */
 void EVENT_USB_Device_ConfigurationChanged(void)
 {
-       LEDs_SetAllLEDs(LEDMASK_USB_READY);
+       bool ConfigSuccess = true;
 
-       if (!(RNDIS_Device_ConfigureEndpoints(&Ethernet_RNDIS_Interface)))
-         LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+       ConfigSuccess &= RNDIS_Device_ConfigureEndpoints(&Ethernet_RNDIS_Interface);
+
+       LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
 /** Event handler for the library USB Unhandled Control Request event. */