projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Loop in the ClassDriver MIDI device/host demos until there are no more incomming...
[pub/USBasp.git]
/
Demos
/
Device
/
LowLevel
/
MIDI
/
MIDI.c
diff --git
a/Demos/Device/LowLevel/MIDI/MIDI.c
b/Demos/Device/LowLevel/MIDI/MIDI.c
index
e436455
..
bfe90b0
100644
(file)
--- a/
Demos/Device/LowLevel/MIDI/MIDI.c
+++ b/
Demos/Device/LowLevel/MIDI/MIDI.c
@@
-204,8
+204,12
@@
void MIDI_Task(void)
LEDs_SetAllLEDs(LEDS_NO_LEDS);
}
LEDs_SetAllLEDs(LEDS_NO_LEDS);
}
- /* Clear the endpoint ready for new packet */
- Endpoint_ClearOUT();
+ /* If the endpoint is now empty, clear the bank */
+ if (!(Endpoint_BytesInEndpoint()))
+ {
+ /* Clear the endpoint ready for new packet */
+ Endpoint_ClearOUT();
+ }
}
}
}
}