summaryrefslogtreecommitdiff
path: root/arm9/lib/include/MI_exMemory.h
blob: 8bd355ac9e26f07b51b26e2e573d790ec8ca7085 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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_