Might work better with the interrupt handler... I should go to bed now.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28014 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol
2008-10-12 22:52:51 +00:00
parent e673981e7e
commit fd630a4552
@@ -5,6 +5,7 @@
#include <arch_platform.h>
#include <new>
#include <util/kernel_cpp.h>
#include <KernelExport.h>
@@ -13,7 +14,7 @@
//#include <platform/openfirmware/openfirmware.h>
#include <platform/atari_m68k/MFP.h>
#include <real_time_clock.h>
#include <util/kernel_cpp.h>
#include <timer.h>
#include "debugger_keymaps.h"
@@ -118,6 +119,8 @@ public:
private:
MFP *MFPForIrq(int irq);
static int32 MFPTimerInterrupt(void *data);
int fRTC;
MFP *fMFP[2];
@@ -290,7 +293,7 @@ M68KAtari::InitTimer(struct kernel_args *kernelArgs)
{
out8(fMFP[0]->Base() + MFP_TACR, 0); // stop it
install_io_interrupt_handler(fMFP[0]->Vector()+13, &pit_timer_interrupt, NULL, 0);
install_io_interrupt_handler(fMFP[0]->Vector()+13, &MFPTimerInterrupt, fMFP[0], 0);
return B_OK;
}
@@ -542,6 +545,12 @@ M68KAtari::MFPForIrq(int irq)
return NULL;
}
int32
M68KAtari::MFPTimerInterrupt(void *data)
{
return timer_interrupt();
}
// static buffer for constructing the actual M68KPlatform
static char *sM68KPlatformBuffer[sizeof(M68KAtari)];