On Mon, Jan 25, 1999 at 05:07:08PM -0800, Simon Cooke wrote:
> >But, with the MIDI-Out interrupt, I agree. In fact, depending
> >on your interpretation of the Tech Manual, MIDI Out doesn't
> >generate and INT signal...(?)

> Umm... actually, how you should probably do it is this:

> At startup, wait at least 2 frames (this gives the MIDI system time to 
> output the data - it's 31.765 or so kHZ, so 2 frames is ample).

If it is at startup then what data is there to output?

> Set a flag to true (MIDI system can send data).

> Then, when you want to send data through the MIDI, check the flag. If 
> true, set it to false and then OUT to the MIDI port. If false, wait 
> until it's true (spinlock, or alternatively, just HALT). 

> In your interrupt driver, when you get a MIDI OUT interrupt, set the 
> flag to TRUE.

The point is that (a) the MIDI OUT interrupt is quite difficult to catch
if there are line and frame interrupts going on as well because you coul
easily miss one while the interrupts are disabled; and (b) you don't need
that flag because in(248) already contains one (bit 1).

imc

Reply via email to