summaryrefslogtreecommitdiff
path: root/arm9/lib/include
diff options
context:
space:
mode:
Diffstat (limited to 'arm9/lib/include')
-rw-r--r--arm9/lib/include/OS_init.h (renamed from arm9/lib/include/OS.h)6
-rw-r--r--arm9/lib/include/OS_system.h9
-rw-r--r--arm9/lib/include/consts.h8
-rw-r--r--arm9/lib/include/nitro.h2
4 files changed, 16 insertions, 9 deletions
diff --git a/arm9/lib/include/OS.h b/arm9/lib/include/OS_init.h
index b152dfb8..c556253a 100644
--- a/arm9/lib/include/OS.h
+++ b/arm9/lib/include/OS_init.h
@@ -2,8 +2,8 @@
// Created by mart on 4/12/20.
//
-#ifndef POKEDIAMOND_OS_H
-#define POKEDIAMOND_OS_H
+#ifndef POKEDIAMOND_OS_INIT_H
+#define POKEDIAMOND_OS_INIT_H
#include "types.h"
#include "consts.h"
@@ -14,4 +14,4 @@
void OS_Init();
-#endif //POKEDIAMOND_OS_H
+#endif //POKEDIAMOND_OS_INIT_H
diff --git a/arm9/lib/include/OS_system.h b/arm9/lib/include/OS_system.h
index c7f121bd..93903315 100644
--- a/arm9/lib/include/OS_system.h
+++ b/arm9/lib/include/OS_system.h
@@ -17,17 +17,22 @@ typedef enum {
OS_PROCMODE_SYS=31
} OSProcMode;
+ENUMS_ALWAYS_INT_ON
typedef enum {
- OS_INTRMODE_DISABLE = HW_PSR_IRQ_DISABLE,
+ OS_INTRMODE_DISABLE_IRQ = HW_PSR_DISABLE_IRQ,
+ OS_INTRMODE_DISABLE_FIQ = HW_PSR_DISABLE_FIQ,
OS_INTRMODE_ENABLE = 0
} OSIntrMode;
+ENUMS_ALWAYS_INT_RESET
OSIntrMode OS_EnableInterrupts();
OSIntrMode OS_DisableInterrupts();
OSIntrMode OS_RestoreInterrupts(OSIntrMode state);
OSIntrMode OS_DisableInterrupts_IrqAndFiq();
OSIntrMode OS_RestoreInterrupts_IrqAndFiq(OSIntrMode state);
+OSIntrMode OS_GetCpsrIrq();
OSProcMode OS_GetProcMode();
-
+void OS_SpinWait();
+void OS_WaitVBlankIntr();
#endif //POKEDIAMOND_OS_SYSTEM_H
diff --git a/arm9/lib/include/consts.h b/arm9/lib/include/consts.h
index 6fc71be2..930f9af5 100644
--- a/arm9/lib/include/consts.h
+++ b/arm9/lib/include/consts.h
@@ -9,9 +9,9 @@
#define HW_PSR_CPU_MODE_MASK 0x1f // CPU mode
-#define HW_PSR_FIQ_DISABLE 0x40 // Disable FIQ
-#define HW_PSR_IRQ_DISABLE 0x80 // Disable IRQ
-#define HW_PSR_IRQ_FIQ_DISABLE 0xc0 // Disable FIQ and IRQ
+#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
#define HW_C6_PR_4KB 0x16
#define HW_C6_PR_8KB 0x18
@@ -42,4 +42,6 @@
#define OSi_TRUNC(n, a) (((u32) (n)) & ~((a) - 1))
#define OSi_ROUND(n, a) (((u32) (n) + (a) - 1) & ~((a) - 1))
+#define OS_IE_V_BLANK (1UL << 0)
+
#endif //POKEDIAMOND_CONSTS_H
diff --git a/arm9/lib/include/nitro.h b/arm9/lib/include/nitro.h
index 8d875653..f7397fb0 100644
--- a/arm9/lib/include/nitro.h
+++ b/arm9/lib/include/nitro.h
@@ -8,7 +8,7 @@ extern "C" {
// Include all nitro files
#include "types.h"
#include "consts.h"
-#include "OS.h"
+#include "OS_init.h"
#include "mmap.h"
#ifdef __cplusplus