summaryrefslogtreecommitdiff
path: root/arm9/lib/include/MI_exMemory.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2020-05-24 20:19:14 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2020-05-24 20:19:14 -0400
commit516f4fc5bfa14a29282a00f34feb46e3d6050b7d (patch)
tree4d2aedca74b102c70e25c52dcf0087309dbabe53 /arm9/lib/include/MI_exMemory.h
parentfd12515498ab52959748ccdabba35f9dcf2c9a32 (diff)
parent57e3bc44ffbf46304d7bcf2a141863c8962e53b9 (diff)
Merge branch 'pikalax_work' of github.com:PikalaxALT/pokediamond into pikalax_work
Diffstat (limited to 'arm9/lib/include/MI_exMemory.h')
-rw-r--r--arm9/lib/include/MI_exMemory.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/arm9/lib/include/MI_exMemory.h b/arm9/lib/include/MI_exMemory.h
index 4a8a10a8..8bd355ac 100644
--- a/arm9/lib/include/MI_exMemory.h
+++ b/arm9/lib/include/MI_exMemory.h
@@ -1,9 +1,23 @@
#ifndef NITRO_MI_EXMEMORY_H_
#define NITRO_MI_EXMEMORY_H_
+#include "consts.h"
+
typedef enum {
MI_PROCESSOR_ARM9 = 0,
MI_PROCESSOR_ARM7 = 1
} MIProcessor;
+static inline void MIi_SetCardProcessor(MIProcessor proc)
+{
+ reg_MI_EXMEMCNT =
+ (u16)((reg_MI_EXMEMCNT & ~0x0800) | (proc << 11));
+}
+
+static inline void MIi_SetCartridgeProcessor(MIProcessor proc)
+{
+ reg_MI_EXMEMCNT =
+ (u16)((reg_MI_EXMEMCNT & ~0x0080) | (proc << 7));
+}
+
#endif //NITRO_MI_EXMEMORY_H_