summaryrefslogtreecommitdiff
path: root/arm9/lib/include/OS_interrupt.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2020-05-08 11:55:16 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2020-05-08 11:55:16 -0400
commit782eca721768b17d51d79e36b519e95d8d9e5b9b (patch)
tree7ab6dcdcffbb9e4c02ae8b8dc5ce9df7a9113d78 /arm9/lib/include/OS_interrupt.h
parentd3bd9a77bb8ca065d295911aca7fbd2da4a846f5 (diff)
parentf76cec09f8a2995244256d4b097d9eed2bebd34a (diff)
Merge branch 'master' of github.com:martmists/pokediamond into libfs
Diffstat (limited to 'arm9/lib/include/OS_interrupt.h')
-rw-r--r--arm9/lib/include/OS_interrupt.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/arm9/lib/include/OS_interrupt.h b/arm9/lib/include/OS_interrupt.h
new file mode 100644
index 00000000..b8425b4e
--- /dev/null
+++ b/arm9/lib/include/OS_interrupt.h
@@ -0,0 +1,29 @@
+//
+// Created by red031000 on 2020-05-07.
+//
+
+#ifndef POKEDIAMOND_OS_INTERRUPT_H
+#define POKEDIAMOND_OS_INTERRUPT_H
+
+#include "types.h"
+
+typedef void (*OSIrqFunction) (void);
+
+typedef struct
+{
+ void (*func) (void *);
+ u32 enable;
+ void* arg;
+} OSIrqCallbackInfo;
+
+typedef u32 OSIrqMask;
+
+extern OSIrqFunction OS_IRQTable[];
+extern OSIrqCallbackInfo OSi_IrqCallbackInfo[7+1];
+
+void OS_InitIrqTable();
+void OS_SetIrqFunction(OSIrqMask intrBit, OSIrqFunction function);
+OSIrqFunction OS_GetIrqFunction(OSIrqMask intrBit);
+void OSi_EnterDmaCallback(u32 dmaNo, void (*callback) (void *), void *arg);
+
+#endif //POKEDIAMOND_OS_INTERRUPT_H