[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] TimerA interrupt handler



Hi,

I want to make my sample replay routine 100% in C. But I'm unable to "rewrite" this code:

move.l #timerA,$134.w ; set timer a handler
clr.b $fffffa19.w ; clear timer a control register
move.b #1,$fffffa1f.w ; count to value '1'
move.b #%1000,$fffffa19.w ; event count mode
bclr #3,$fffffa17.w ; automatic end-of-interrupt mode
bset #5,$fffffa07.w ; enable timer a
bset #5,$fffffa13.w ; same here (mask register)

into C. I thought this:

Xbtimer( XB_TIMERA, 1<<4, 1, timerA ); // event count mode, count to '1'
Jenabint( MFP_TIMERA );

will do the trick but nope, it doesn't work ('timerA' is not executed). I suspect the 'automatic end-of-interrupt mode' bit settings, as there's no way how to set it via a C function, AFAIK. Any ideas?

--
MiKRO / Mystic Bytes
http://mikro.atari.org