Remove unsupported devices from the BootloaderTest build test.
[pub/USBasp.git] / Demos / Host / LowLevel / MIDIHost / MIDIHost.c
index f4a52ac..1ae40c2 100644 (file)
@@ -18,7 +18,7 @@
   advertising or publicity pertaining to distribution of the
   software without specific, written prior permission.
 
-  The author disclaim all warranties with regard to this
+  The author disclaims all warranties with regard to this
   software, including all implied warranties of merchantability
   and fitness.  In no event shall the author be liable for any
   special, indirect or consequential damages or any damages
@@ -46,7 +46,7 @@ int main(void)
        puts_P(PSTR(ESC_FG_CYAN "MIDI Host Demo running.\r\n" ESC_FG_WHITE));
 
        LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
-       sei();
+       GlobalInterruptEnable();
 
        for (;;)
        {
@@ -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;
        }