projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enhance the HotmailNotifier project so that the LEDs' individual brightness can be...
[pub/USBasp.git]
/
Demos
/
Device
/
ClassDriver
/
MIDI
/
MIDI.c
diff --git
a/Demos/Device/ClassDriver/MIDI/MIDI.c
b/Demos/Device/ClassDriver/MIDI/MIDI.c
index
d50a254
..
765bec6
100644
(file)
--- a/
Demos/Device/ClassDriver/MIDI/MIDI.c
+++ b/
Demos/Device/ClassDriver/MIDI/MIDI.c
@@
-46,11
+46,13
@@
USB_ClassInfo_MIDI_Device_t Keyboard_MIDI_Interface =
{
\r
.StreamingInterfaceNumber = 1,
\r
\r
{
\r
.StreamingInterfaceNumber = 1,
\r
\r
- .DataINEndpointNumber = MIDI_STREAM_IN_EPNUM,
\r
- .DataINEndpointSize = MIDI_STREAM_EPSIZE,
\r
+ .DataINEndpointNumber = MIDI_STREAM_IN_EPNUM,
\r
+ .DataINEndpointSize = MIDI_STREAM_EPSIZE,
\r
+ .DataINEndpointDoubleBank = false,
\r
\r
\r
- .DataOUTEndpointNumber = MIDI_STREAM_OUT_EPNUM,
\r
- .DataOUTEndpointSize = MIDI_STREAM_EPSIZE,
\r
+ .DataOUTEndpointNumber = MIDI_STREAM_OUT_EPNUM,
\r
+ .DataOUTEndpointSize = MIDI_STREAM_EPSIZE,
\r
+ .DataOUTEndpointDoubleBank = false,
\r
},
\r
};
\r
\r
},
\r
};
\r
\r
@@
-70,7
+72,7
@@
int main(void)
MIDI_EventPacket_t ReceivedMIDIEvent;
\r
if (MIDI_Device_ReceiveEventPacket(&Keyboard_MIDI_Interface, &ReceivedMIDIEvent))
\r
{
\r
MIDI_EventPacket_t ReceivedMIDIEvent;
\r
if (MIDI_Device_ReceiveEventPacket(&Keyboard_MIDI_Interface, &ReceivedMIDIEvent))
\r
{
\r
- if (
ReceivedMIDIEvent.Command == (MIDI_COMMAND_NOTE_ON >> 4
))
\r
+ if (
(ReceivedMIDIEvent.Command == (MIDI_COMMAND_NOTE_ON >> 4)) && (ReceivedMIDIEvent.Data3 > 0
))
\r
LEDs_SetAllLEDs(ReceivedMIDIEvent.Data2 > 64 ? LEDS_LED1 : LEDS_LED2);
\r
else
\r
LEDs_SetAllLEDs(LEDS_NO_LEDS);
\r
LEDs_SetAllLEDs(ReceivedMIDIEvent.Data2 > 64 ? LEDS_LED1 : LEDS_LED2);
\r
else
\r
LEDs_SetAllLEDs(LEDS_NO_LEDS);
\r