diff options
author | Revo <projectrevotpp@hotmail.com> | 2020-08-01 15:02:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-01 15:02:32 -0400 |
commit | f7208c80c780bb666630a343cfe5912009dd5eaa (patch) | |
tree | 17421b1f2a300fcb8714d42f0c9fe3796bd540d1 /arm9/lib/include | |
parent | d318e480ca2c5ad51f4ce008808f39f2f92882f7 (diff) | |
parent | ee287295971d0b25fe434cbd1e618f053d29e7c4 (diff) |
Merge pull request #252 from red031000/master
arm9 OS_valarm
Diffstat (limited to 'arm9/lib/include')
-rw-r--r-- | arm9/lib/include/OS_init.h | 1 | ||||
-rw-r--r-- | arm9/lib/include/OS_interrupt.h | 1 | ||||
-rw-r--r-- | arm9/lib/include/OS_valarm.h | 25 | ||||
-rw-r--r-- | arm9/lib/include/registers.h | 1 |
4 files changed, 28 insertions, 0 deletions
diff --git a/arm9/lib/include/OS_init.h b/arm9/lib/include/OS_init.h index ea1fa66b..7427fed8 100644 --- a/arm9/lib/include/OS_init.h +++ b/arm9/lib/include/OS_init.h @@ -25,6 +25,7 @@ #include "OS_reset.h" #include "OS_exception.h" #include "OS_message.h" +#include "OS_valarm.h" void OS_Init(void); diff --git a/arm9/lib/include/OS_interrupt.h b/arm9/lib/include/OS_interrupt.h index d84cae00..893e6d65 100644 --- a/arm9/lib/include/OS_interrupt.h +++ b/arm9/lib/include/OS_interrupt.h @@ -4,6 +4,7 @@ #include "consts.h" #include "nitro/OS_interrupt_shared.h" +#define OS_IE_V_COUNT (1UL << REG_OS_IE_VE_SHIFT) #define OS_IE_TIMER0 (1UL << REG_OS_IE_T0_SHIFT) #define OS_IE_TIMER1 (1UL << REG_OS_IE_T1_SHIFT) diff --git a/arm9/lib/include/OS_valarm.h b/arm9/lib/include/OS_valarm.h new file mode 100644 index 00000000..b4850f9d --- /dev/null +++ b/arm9/lib/include/OS_valarm.h @@ -0,0 +1,25 @@ +#ifndef POKEDIAMOND_OS_VALARM_H +#define POKEDIAMOND_OS_VALARM_H + +#include "nitro/types.h" +#include "OS_alarm.h" + +typedef struct OSiVAlarm OSVAlarm; +struct OSiVAlarm +{ + OSAlarmHandler handler; + void *arg; + u32 tag; + u32 frame; + s16 fire; + s16 delay; + OSVAlarm *prev; + OSVAlarm *next; + BOOL period; + BOOL finish; + BOOL canceled; +}; + +void OS_InitVAlarm(void); + +#endif //POKEDIAMOND_OS_VALARM_H diff --git a/arm9/lib/include/registers.h b/arm9/lib/include/registers.h index 6bfb52ac..b2915f8c 100644 --- a/arm9/lib/include/registers.h +++ b/arm9/lib/include/registers.h @@ -345,6 +345,7 @@ #define reg_MI_MCD1 (*(REGType32v *)0x4100010) #define reg_CARD_DATA (*(REGType32v *)0x4100010) //? +#define REG_OS_IE_VE_SHIFT 2 #define REG_OS_IE_T0_SHIFT 3 #define REG_OS_IE_T1_SHIFT 4 |