summaryrefslogtreecommitdiff
path: root/include/rvl/EXI/EXIHardware.h
blob: d8f14b62772a84b00b13fda9ed5801d4feafa805 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef RVL_SDK_EXI_HARDWARE_H
#define RVL_SDK_EXI_HARDWARE_H
#include "common.h"
#include "rvl/EXI/EXICommon.h"


#ifdef __cplusplus
extern "C" {
#endif

/**
 * Documentation from:
 * https://www.gc-forever.com/yagcd/chap5.html#sec5.9
 */
typedef struct ExiChannelControl {
    u32 csr;       // at 0x0
    void *dmaAddr; // at 0x4
    u32 dmaLen;    // at 0x8
    u32 cr;        // at 0xC
    u32 imm;       // at 0x10
} ExiChannelControl;

volatile ExiChannelControl EXI_CHAN_CTRL[EXI_MAX_CHAN] AT_ADDRESS(0xCD006800);

// CSR - Control Status Register
#define EXI_CSR_EXIINTMASK (1 << 0)
#define EXI_CSR_EXIINT (1 << 1)
#define EXI_CSR_TCINTMASK (1 << 2)
#define EXI_CSR_TCINT (1 << 3)
#define EXI_CSR_EXTINTMASK (1 << 10)
#define EXI_CSR_EXTINT (1 << 11)
#define EXI_CSR_EXT (1 << 12)
#define EXI_CSR_ROMDIS (1 << 13)

#ifdef __cplusplus
}
#endif
#endif