aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.c
diff options
context:
space:
mode:
Diffstat (limited to 'Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.c')
-rw-r--r--Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.c b/Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.c
index ba498c99d..ecb87a298 100644
--- a/Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.c
+++ b/Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.c
@@ -173,10 +173,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);
-
- if (!(MIDI_Device_ConfigureEndpoints(&Keyboard_MIDI_Interface)))
- LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
+ bool ConfigSuccess = true;
+
+ ConfigSuccess &= MIDI_Device_ConfigureEndpoints(&Keyboard_MIDI_Interface);
+
+ LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
}
/** Event handler for the library USB Unhandled Control Request event. */