From b4d6f1314b3b322afabe85d848e09a36d4e7a47a Mon Sep 17 00:00:00 2001 From: red031000 Date: Thu, 21 May 2020 20:23:26 +0100 Subject: OS_InitLock --- arm9/lib/include/MI_exMemory.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'arm9/lib/include/MI_exMemory.h') 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_ -- cgit v1.2.3