From 4897ef8972d1cff73d39abf282e85d253dd119f2 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 4 Jun 2009 03:03:48 +0000 Subject: Ensure all USB device class drivers have the same three main functions as their interface for consistency. --- Demos/Device/AudioInput/AudioInput.c | 1 + Demos/Device/AudioOutput/AudioOutput.c | 1 + Demos/Device/MIDI/MIDI.c | 7 +++++++ 3 files changed, 9 insertions(+) (limited to 'Demos/Device') diff --git a/Demos/Device/AudioInput/AudioInput.c b/Demos/Device/AudioInput/AudioInput.c index 31b3159e0..93ffe0bf4 100644 --- a/Demos/Device/AudioInput/AudioInput.c +++ b/Demos/Device/AudioInput/AudioInput.c @@ -62,6 +62,7 @@ int main(void) if (Microphone_Audio_Interface.InterfaceEnabled) ProcessNextSample(); + USB_Audio_USBTask(&Microphone_Audio_Interface); USB_USBTask(); } } diff --git a/Demos/Device/AudioOutput/AudioOutput.c b/Demos/Device/AudioOutput/AudioOutput.c index 4ff2e7453..8c3bf6188 100644 --- a/Demos/Device/AudioOutput/AudioOutput.c +++ b/Demos/Device/AudioOutput/AudioOutput.c @@ -62,6 +62,7 @@ int main(void) if (Speaker_Audio_Interface.InterfaceEnabled) ProcessNextSample(); + USB_Audio_USBTask(&Speaker_Audio_Interface); USB_USBTask(); } } diff --git a/Demos/Device/MIDI/MIDI.c b/Demos/Device/MIDI/MIDI.c index 4fef04754..8881d1dc7 100644 --- a/Demos/Device/MIDI/MIDI.c +++ b/Demos/Device/MIDI/MIDI.c @@ -64,6 +64,7 @@ int main(void) { CheckJoystickMovement(); + USB_MIDI_USBTask(&Keyboard_MIDI_Interface); USB_USBTask(); } } @@ -168,3 +169,9 @@ void EVENT_USB_ConfigurationChanged(void) if (!(USB_MIDI_ConfigureEndpoints(&Keyboard_MIDI_Interface))) LEDs_SetAllLEDs(LEDMASK_USB_ERROR); } + +/** Event handler for the library USB Unhandled Control Packet event. */ +void EVENT_USB_UnhandledControlPacket(void) +{ + USB_MIDI_ProcessControlPacket(&Keyboard_MIDI_Interface); +} -- cgit v1.2.3