From d099c2d3874a5b11a86a5ed3c363e78ec29bee80 Mon Sep 17 00:00:00 2001 From: Cuyler36 Date: Sat, 29 Apr 2023 08:21:36 -0400 Subject: [PATCH] Add missing headers --- config/rel_slices.yml | 8 ++++---- include/libultra/osMesg.h | 11 ++++++++--- include/libultra/os_timer.h | 18 ++++++++++++++++++ rel/irqmgr.c | 3 +++ 4 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 include/libultra/os_timer.h diff --git a/config/rel_slices.yml b/config/rel_slices.yml index 35e58d8e..8071945b 100644 --- a/config/rel_slices.yml +++ b/config/rel_slices.yml @@ -52,10 +52,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/include/libultra/osMesg.h b/include/libultra/osMesg.h index d2b960ed..d7241fa6 100644 --- a/include/libultra/osMesg.h +++ b/include/libultra/osMesg.h @@ -3,16 +3,21 @@ #include "types.h" #include "dolphin/os/OSThread.h" +#include "dolphin/os/OSMessage.h" typedef void* OSMesg; typedef struct OSMesgQueue { /* 0x00 */ OSThread* mtqueue; /* 0x04 */ OSThread* fullqueue; - /* 0x08 */ s32 validCount; - /* 0x0C */ s32 first; - /* 0x10 */ s32 msgCount; + /* 0x08 */ int validCount; + /* 0x0C */ int first; + /* 0x10 */ int msgCount; /* 0x14 */ OSMesg* msg; } OSMesgQueue; // size = 0x18 +extern void osCreateMesgQueue(OSMessageQueue* mq ,OSMessage msg, int flags); +extern int osSendMesg(OSMessageQueue* mq, OSMessage msg, int flags); +extern int osRecvMesg(OSMessageQueue* mq, OSMessage msg, int flags); + #endif diff --git a/include/libultra/os_timer.h b/include/libultra/os_timer.h new file mode 100644 index 00000000..4c7580a6 --- /dev/null +++ b/include/libultra/os_timer.h @@ -0,0 +1,18 @@ +#ifndef LIBULTRA_OS_TIMER_H +#define LIBULTRA_OS_TIMER_H + +#include "types.h" +#include "dolphin/os/OSTimer.h" +#include "dolphin/os/OSMessage.h" + +#ifdef __cplusplus +extern "C" { +#endif + +extern int osSetTimer(OSTimer* t, OSTime countdown, OSTime interval, OSMessageQueue* mq, OSMessage msg); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/rel/irqmgr.c b/rel/irqmgr.c index 17785fc2..32f137bd 100644 --- a/rel/irqmgr.c +++ b/rel/irqmgr.c @@ -1,5 +1,8 @@ #include "irqmgr.h" #include "libultra/os_thread.h" +#include "libultra/libultra.h" +#include "libultra/os_timer.h" +#include "libultra/osMesg.h" #include "dolphin/os.h" #include "dolphin/os/OSMessage.h" #include "dolphin/os/OSTime.h"