Update of /cvsroot/lapetus/lapetus
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv22012
Modified Files:
timer.c
Log Message:
-Changed to use new functions, etc.
Index: timer.c
===================================================================
RCS file: /cvsroot/lapetus/lapetus/timer.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- timer.c 12 Feb 2007 04:19:49 -0000 1.2
+++ timer.c 28 Feb 2007 04:38:09 -0000 1.3
@@ -74,14 +74,14 @@
int TimerSetup(int type, u32 *freq)
{
u32 clock=0;
- int old_imask = get_imask();
+ int old_levelmask = InterruptGetLevelMask();
if (freq == NULL)
return LAPETUS_ERR_INVALIDPOINTER;
freq[0] = 0;
- set_imask(0xF);
+ InterruptSetLevelMask(0xF);
if (BIOS_GetClockSpeed == 0)
clock = 26846587;
@@ -141,11 +141,11 @@
case TIMER_HBLANK:
// Setup Interrupt
BIOS_SetSCUInterrupt(0x42, TimerHBlankIncrement);
- BIOS_ChangeSCUInterruptMask(~0x0004, 0);
+ BIOS_ChangeSCUInterruptMask(~MASK_HBLANKIN, 0);
freq[0] = 224; // fix me
- if (old_imask > 0xC)
- old_imask = 0xC;
+ if (old_levelmask > 0xC)
+ old_levelmask = 0xC;
break;
default:
@@ -153,10 +153,10 @@
}
timercounter = 0;
- if (old_imask == 0xF)
- old_imask = 0xE;
+ if (old_levelmask == 0xF)
+ old_levelmask = 0xE;
- set_imask(old_imask);
+ InterruptSetLevelMask(old_levelmask);
return LAPETUS_ERR_OK;
}
|