diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-10-08 08:46:27 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-10-08 08:46:27 +0000 |
commit | c7bc3ec391da3904f0db6398171c7fed37d4f836 (patch) | |
tree | daec9cabab609050e8f7f693a1ee41253e03c009 /Demos/Host/LowLevel/MIDIHost | |
parent | 664a2921816069483604f5e05a2a02b6ddf8727a (diff) | |
download | lufa-c7bc3ec391da3904f0db6398171c7fed37d4f836.tar.gz lufa-c7bc3ec391da3904f0db6398171c7fed37d4f836.tar.bz2 lufa-c7bc3ec391da3904f0db6398171c7fed37d4f836.zip |
Add new MIDI Host Class driver to the library, and new MIDIHost ClassDriver demo.
Make MouseHost and KeyboardHost ClassDriver demos use the HID Class driver's structures for the boot protocol Mouse/Keyboard report data, rather than rolling their own.
Diffstat (limited to 'Demos/Host/LowLevel/MIDIHost')
-rw-r--r-- | Demos/Host/LowLevel/MIDIHost/MIDIHost.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c index 63f7b695c..d8a4f31dc 100644 --- a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c +++ b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c @@ -177,18 +177,18 @@ void MIDI_Host_Task(void) if (Pipe_IsINReceived())
{
- USB_MIDI_EventPacket_t MIDIPacket;
+ USB_MIDI_EventPacket_t MIDIEvent;
- Pipe_Read_Stream_LE(&MIDIPacket, sizeof(MIDIPacket));
+ Pipe_Read_Stream_LE(&MIDIEvent, sizeof(MIDIEvent));
- bool NoteOnEvent = ((MIDIPacket.Command & 0x0F) == (MIDI_COMMAND_NOTE_ON >> 4));
- bool NoteOffEvent = ((MIDIPacket.Command & 0x0F) == (MIDI_COMMAND_NOTE_OFF >> 4));
+ bool NoteOnEvent = ((MIDIEvent.Command & 0x0F) == (MIDI_COMMAND_NOTE_ON >> 4));
+ bool NoteOffEvent = ((MIDIEvent.Command & 0x0F) == (MIDI_COMMAND_NOTE_OFF >> 4));
if (NoteOnEvent || NoteOffEvent)
{
printf_P(PSTR("MIDI Note %s - Channel %d, Pitch %d, Velocity %d"), NoteOnEvent ? "On" : "Off",
- ((MIDIPacket.Data1 & 0x0F) + 1),
- MIDIPacket.Data2, MIDIPacket.Data3);
+ ((MIDIEvent.Data1 & 0x0F) + 1),
+ MIDIEvent.Data2, MIDIEvent.Data3);
}
Pipe_ClearIN();
|