FW: fix FWirq callback bug

This commit is contained in:
Gauvain 'GovanifY' Roussel-Tarbouriech 2020-09-19 22:52:28 +02:00 committed by refractionpcsx2
parent 6f98fd4b65
commit e1ff498a8e
2 changed files with 2 additions and 13 deletions

View File

@ -14,7 +14,7 @@
*/
#include "PrecompiledHeader.h"
#include "IopCommon.h"
#include <stdlib.h>
#include <string>
using namespace std;
@ -24,8 +24,6 @@ using namespace std;
u8 phyregs[16];
s8* fwregs;
void (*FWirq)();
s32 FWopen()
{
memset(phyregs, 0, sizeof(phyregs));
@ -67,7 +65,7 @@ void PHYRead()
if (fwRu32(0x8424) & 0x40000000) //RRx interrupt mask
{
fwRu32(0x8420) |= 0x40000000;
FWirq();
fwIrq();
}
}
@ -195,9 +193,3 @@ void FWwrite32(u32 addr, u32 value)
}
DevCon.WriteLn("FW: write mem 0x%x: 0x%x", addr, value);
}
void FWirqCallback(void (*callback)())
{
// Register FWirq, so we can trigger an interrupt with it later.
FWirq = callback;
}

View File

@ -27,12 +27,9 @@ extern s8* fwregs;
//PHY Access Address for ease of use :P
#define PHYACC fwRu32(0x8414)
extern void (*FWirq)();
s32 FWopen();
void FWclose();
void PHYWrite();
void PHYRead();
u32 FWread32(u32 addr);
void FWwrite32(u32 addr, u32 value);
void FWirqCallback(void (*callback)());