grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / camd / skipsysex.c
blob89dff77f798e724428061d45c2a3ff07f4b23c8b
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #include <proto/exec.h>
11 #include "camd_intern.h"
14 /*****************************************************************************
16 NAME */
18 AROS_LH1(void, SkipSysEx,
20 /* SYNOPSIS */
21 AROS_LHA(struct MidiNode *, midinode, A0),
23 /* LOCATION */
24 struct CamdBase *, CamdBase, 29, Camd)
26 /* FUNCTION
27 Remind me to fill in things here later.
29 INPUTS
31 RESULT
33 NOTES
35 EXAMPLE
37 BUGS
39 SEE ALSO
40 QuerySysEx(), GetSysEx()
42 INTERNALS
44 HISTORY
46 2001-01-12 ksvalast first created
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
52 struct MyMidiNode *mymidinode=(struct MyMidiNode *)midinode;
53 UBYTE data;
55 ObtainSemaphore(&mymidinode->sysexsemaphore2);
57 if(
58 mymidinode->lastreadstatus!=0xf0
60 ReleaseSemaphore(&mymidinode->sysexsemaphore2);
61 return;
64 mymidinode->sysex_nextis0=TRUE;
66 do{
67 data=*mymidinode->sysex_read;
68 mymidinode->sysex_read++;
69 if(mymidinode->sysex_read==mymidinode->sysex_end){
70 mymidinode->sysex_read=mymidinode->sysex_start;
72 }while(data!=0xf7);
74 ReleaseSemaphore(&mymidinode->sysexsemaphore2);
76 AROS_LIBFUNC_EXIT