Sync ereader_helpers with pokefirered

This commit is contained in:
GriffinR
2021-04-23 17:04:44 -04:00
parent f823cd224f
commit 004c37bf02
4 changed files with 227 additions and 204 deletions

View File

@@ -47,10 +47,10 @@ static void sub_81D4D50(struct Unk03006370 *arg0, int arg1, u32 *arg2)
{
volatile u16 backupIME = REG_IME;
REG_IME = 0;
gIntrTable[1] = sub_81D3FAC;
gIntrTable[2] = sub_81D3F9C;
gIntrTable[1] = EReaderHelper_SerialCallback;
gIntrTable[2] = EReaderHelper_Timer3Callback;
EReaderHelper_SaveRegsState();
sub_81D4238();
EReaderHelper_ClearSendRecvMgr();
REG_IE |= INTR_FLAG_VCOUNT;
REG_IME = backupIME;
arg0->unk0 = 0;
@@ -62,7 +62,7 @@ static void sub_81D4DB8(struct Unk03006370 *arg0)
{
volatile u16 backupIME = REG_IME;
REG_IME = 0;
sub_81D4238();
EReaderHelper_ClearSendRecvMgr();
EReaderHelper_RestoreRegsState();
RestoreSerialTimer3IntrHandlers();
REG_IME = backupIME;