summaryrefslogtreecommitdiff
path: root/arm7/lib/include/OS_system.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2020-06-06 10:17:48 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2020-06-06 10:17:48 -0400
commit287997378d2531af6c610721f2be2424ca4cbfa3 (patch)
treea52d852aeac6ea91103dc5b4ce9dad2fee375bc6 /arm7/lib/include/OS_system.h
parent3e3328342369ac8143a442c5b85ad56ce587b195 (diff)
parentcae6ef601c8d2892c078eb77327e4552f3c8bf64 (diff)
Merge branch 'master' of https://github.com/martmists/pokediamond into pikalax_work
Diffstat (limited to 'arm7/lib/include/OS_system.h')
-rw-r--r--arm7/lib/include/OS_system.h31
1 files changed, 5 insertions, 26 deletions
diff --git a/arm7/lib/include/OS_system.h b/arm7/lib/include/OS_system.h
index b6c81ab4..85e607ea 100644
--- a/arm7/lib/include/OS_system.h
+++ b/arm7/lib/include/OS_system.h
@@ -1,36 +1,15 @@
#ifndef POKEDIAMOND_ARM7_OS_SYSTEM_H
#define POKEDIAMOND_ARM7_OS_SYSTEM_H
-#include "types.h"
-
-//todo consts.h
-#define HW_PSR_CPU_MODE_MASK 0x1f // CPU mode
-
-#define HW_PSR_DISABLE_FIQ 0x40 // Disable FIQ
-#define HW_PSR_DISABLE_IRQ 0x80 // Disable IRQ
-#define HW_PSR_DISABLE_IRQ_FIQ 0xc0 // Disable FIQ and IRQ
-
-typedef enum {
- OS_PROCMODE_USER=16,
- OS_PROCMODE_FIQ=17,
- OS_PROCMODE_IRQ=18,
- OS_PROCMODE_SVC=19,
- OS_PROCMODE_ABORT=23,
- OS_PROCMODE_UNDEF=27,
- OS_PROCMODE_SYS=31
-} OSProcMode;
-
-typedef enum {
- OS_INTRMODE_DISABLE_IRQ = HW_PSR_DISABLE_IRQ,
- OS_INTRMODE_DISABLE_FIQ = HW_PSR_DISABLE_FIQ,
- OS_INTRMODE_ENABLE = 0
-} OSIntrMode;
+#include "nitro/types.h"
+#include "consts.h"
+#include "nitro/OS_system_shared.h"
OSIntrMode OS_EnableInterrupts(void);
OSIntrMode OS_DisableInterrupts(void);
-OSIntrMode OS_RestoreInterrupts(register OSIntrMode state);
+OSIntrMode OS_RestoreInterrupts(OSIntrMode state);
OSIntrMode OS_DisableInterrupts_IrqAndFiq(void);
-OSIntrMode OS_RestoreInterrupts_IrqAndFiq(register OSIntrMode state);
+OSIntrMode OS_RestoreInterrupts_IrqAndFiq(OSIntrMode state);
OSProcMode OS_GetProcMode(void);
void OS_SpinWait(u32 cycle);