From 767dcd48b5eae7aede5736fd35e3b863de5bc7ab Mon Sep 17 00:00:00 2001 From: Dean Date: Sun, 20 May 2012 13:04:26 +0000 Subject: Additional fixes to the MIDI host driver due to not unfreezing/re-freezing pipes correctly (thanks to Michael Brown). git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@2225 d5102386-fcda-11dd-9fdb-3debd5008f28 --- Demos/Host/LowLevel/MIDIHost/MIDIHost.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Demos') diff --git a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c index f4a52acc..f6b607a9 100644 --- a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c +++ b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c @@ -167,6 +167,7 @@ void MIDIHost_Task(void) return; Pipe_SelectPipe(MIDI_DATA_IN_PIPE); + Pipe_Unfreeze(); if (Pipe_IsINReceived()) { @@ -187,8 +188,11 @@ void MIDIHost_Task(void) MIDIEvent.Data2, MIDIEvent.Data3); } } + + Pipe_Freeze(); Pipe_SelectPipe(MIDI_DATA_OUT_PIPE); + Pipe_Unfreeze(); if (Pipe_IsOUTReady()) { @@ -251,6 +255,8 @@ void MIDIHost_Task(void) Pipe_ClearOUT(); } + Pipe_Freeze(); + /* Save previous joystick value for next joystick change detection */ PrevJoystickStatus = JoystickStatus; } -- cgit v1.2.3