Fix incorrect ADEFS and CPPDEFS entries in the DFU and CDC class bootloader makefiles.
[pub/USBasp.git] / Demos / Device / ClassDriver / MIDI / MIDI.c
index cae7277..508ed96 100644 (file)
@@ -3,7 +3,7 @@
      Copyright (C) Dean Camera, 2010.
 
   dean [at] fourwalledcubicle [dot] com
-      www.fourwalledcubicle.com
+           www.lufa-lib.org
 */
 
 /*
@@ -71,7 +71,7 @@ int main(void)
                CheckJoystickMovement();
 
                MIDI_EventPacket_t ReceivedMIDIEvent;
-               if (MIDI_Device_ReceiveEventPacket(&Keyboard_MIDI_Interface, &ReceivedMIDIEvent))
+               while (MIDI_Device_ReceiveEventPacket(&Keyboard_MIDI_Interface, &ReceivedMIDIEvent))
                {
                        if ((ReceivedMIDIEvent.Command == (MIDI_COMMAND_NOTE_ON >> 4)) && (ReceivedMIDIEvent.Data3 > 0))
                          LEDs_SetAllLEDs(ReceivedMIDIEvent.Data2 > 64 ? LEDS_LED1 : LEDS_LED2);
@@ -187,8 +187,8 @@ void EVENT_USB_Device_ConfigurationChanged(void)
        LEDs_SetAllLEDs(ConfigSuccess ? LEDMASK_USB_READY : LEDMASK_USB_ERROR);
 }
 
-/** Event handler for the library USB Unhandled Control Request event. */
-void EVENT_USB_Device_UnhandledControlRequest(void)
+/** Event handler for the library USB Control Request reception event. */
+void EVENT_USB_Device_ControlRequest(void)
 {
        MIDI_Device_ProcessControlRequest(&Keyboard_MIDI_Interface);
 }