summaryrefslogtreecommitdiff
path: root/arm9/lib/include/OS_system.h
diff options
context:
space:
mode:
authorMartmists <mail@martmists.com>2020-05-01 19:44:04 +0200
committerGitHub <noreply@github.com>2020-05-01 19:44:04 +0200
commite370125c3e2e34936152768c40bd932b88690baa (patch)
tree85e8314866f65fb95e62a66b029ab5eeca55e994 /arm9/lib/include/OS_system.h
parent10b569f131fc58959d7c50dd4b07f01a52b5e162 (diff)
parentfa332326543d03fe6afdc0dcd04f0a666450955b (diff)
Merge pull request #51 from red031000/master
match OS_protectionRegion
Diffstat (limited to 'arm9/lib/include/OS_system.h')
-rw-r--r--arm9/lib/include/OS_system.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/arm9/lib/include/OS_system.h b/arm9/lib/include/OS_system.h
new file mode 100644
index 00000000..c7f121bd
--- /dev/null
+++ b/arm9/lib/include/OS_system.h
@@ -0,0 +1,33 @@
+//
+// Created by mart on 4/23/20.
+//
+
+#ifndef POKEDIAMOND_OS_SYSTEM_H
+#define POKEDIAMOND_OS_SYSTEM_H
+
+#include "consts.h"
+
+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 = HW_PSR_IRQ_DISABLE,
+ OS_INTRMODE_ENABLE = 0
+} OSIntrMode;
+
+OSIntrMode OS_EnableInterrupts();
+OSIntrMode OS_DisableInterrupts();
+OSIntrMode OS_RestoreInterrupts(OSIntrMode state);
+OSIntrMode OS_DisableInterrupts_IrqAndFiq();
+OSIntrMode OS_RestoreInterrupts_IrqAndFiq(OSIntrMode state);
+OSProcMode OS_GetProcMode();
+
+
+#endif //POKEDIAMOND_OS_SYSTEM_H