From 251bf2f2e2273dd7715949338d97bdb1da68b46e Mon Sep 17 00:00:00 2001 From: Prakxo Date: Fri, 27 Oct 2023 11:36:57 +0000 Subject: [PATCH] link irqmgr --- config/rel_slices.yml | 8 ++++---- rel/irqmgr.c | 20 +++++++++++++------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/config/rel_slices.yml b/config/rel_slices.yml index 7248afe4..52338d9a 100644 --- a/config/rel_slices.yml +++ b/config/rel_slices.yml @@ -284,10 +284,10 @@ graph.c: .text: [0x80405518, 0x80405EC8] .data: [0x8065ECA8, 0x8065ECB0] .bss: [0x812F31E8, 0x812F3560] -#irqmgr.c: -# .text: [0x80405EC8, 0x80406480] -# .data: [0x8065ECB0, 0x8065ECD0] -# .bss: [0x812F3560, 0x812F4CB0] +irqmgr.c: + .text: [0x80405EC8, 0x80406480] + .data: [0x8065ECB0, 0x8065ECD0] + .bss: [0x812F3560, 0x812F4CB0] lb_rtc.c: .text: [0x80406480, 0x8040752C] .rodata: [0x806436F8, 0x806437A0] diff --git a/rel/irqmgr.c b/rel/irqmgr.c index 6aa65f26..6f663220 100644 --- a/rel/irqmgr.c +++ b/rel/irqmgr.c @@ -9,10 +9,10 @@ #define MSEC(x) OSMicrosecondsToTicks(((u64)(x)) * (u64)1000) -volatile int ResetStatus; // 0x00 -volatile OSTime ResetTime; // 0x08 -volatile OSTime RetraceTime; // 0x10 -volatile int RetraceCount; // 0x18 +volatile int ResetStatus = 0; // 0x00 +volatile OSTime ResetTime = 0; // 0x08 +volatile OSTime RetraceTime = 0; // 0x10 +volatile int RetraceCount = 0; // 0x18 static irqmgr_t* this; // 0x1C irqmgr_t irqmgr_class; @@ -193,14 +193,20 @@ extern void CreateIRQManager(void* stack, size_t stack_size, int priority, u8 re #define VI_STACK_SIZE 0x1000 +static u16 vc_retraceCount; static OSMessage vc_msg; static OSMessageQueue* vc_msgq; -static u16 vc_retraceCount; -static u16 retrace; /* this probably belongs in one of the unused vi functions below */ static u8 viThreadStack[VI_STACK_SIZE]; static OSThread viThread; -/* @unused ? viMgrMain(?) */ +/* @fabricated @unused */ + +void viMgrMain(void){ + static u16 retrace; + + retrace = 0; + vc_retraceCount = 0; +} /* @unused ? osCreateViManager(?) */