SSBM Decomp
Loading...
Searching...
No Matches
OSInterrupt.h
Go to the documentation of this file.
1
#ifndef _DOLPHIN_OSINTERRUPT_H_
2
#define _DOLPHIN_OSINTERRUPT_H_
3
4
#include <
dolphin/os.h
>
5
#include <
dolphin/types.h
>
6
7
#ifdef __cplusplus
8
extern
"C"
{
9
#endif
10
11
#define __OS_INTERRUPT_MEM_0 0
12
#define __OS_INTERRUPT_MEM_1 1
13
#define __OS_INTERRUPT_MEM_2 2
14
#define __OS_INTERRUPT_MEM_3 3
15
#define __OS_INTERRUPT_MEM_ADDRESS 4
16
#define __OS_INTERRUPT_DSP_AI 5
17
#define __OS_INTERRUPT_DSP_ARAM 6
18
#define __OS_INTERRUPT_DSP_DSP 7
19
#define __OS_INTERRUPT_AI_AI 8
20
#define __OS_INTERRUPT_EXI_0_EXI 9
21
#define __OS_INTERRUPT_EXI_0_TC 10
22
#define __OS_INTERRUPT_EXI_0_EXT 11
23
#define __OS_INTERRUPT_EXI_1_EXI 12
24
#define __OS_INTERRUPT_EXI_1_TC 13
25
#define __OS_INTERRUPT_EXI_1_EXT 14
26
#define __OS_INTERRUPT_EXI_2_EXI 15
27
#define __OS_INTERRUPT_EXI_2_TC 16
28
#define __OS_INTERRUPT_PI_CP 17
29
#define __OS_INTERRUPT_PI_PE_TOKEN 18
30
#define __OS_INTERRUPT_PI_PE_FINISH 19
31
#define __OS_INTERRUPT_PI_SI 20
32
#define __OS_INTERRUPT_PI_DI 21
33
#define __OS_INTERRUPT_PI_RSW 22
34
#define __OS_INTERRUPT_PI_ERROR 23
35
#define __OS_INTERRUPT_PI_VI 24
36
#define __OS_INTERRUPT_PI_DEBUG 25
37
#define __OS_INTERRUPT_PI_HSP 26
38
#define __OS_INTERRUPT_MAX 32
39
40
#define OS_INTERRUPTMASK(interrupt) (0x80000000u >> (interrupt))
41
42
#define OS_INTERRUPTMASK_MEM_0 OS_INTERRUPTMASK(__OS_INTERRUPT_MEM_0)
43
#define OS_INTERRUPTMASK_MEM_1 OS_INTERRUPTMASK(__OS_INTERRUPT_MEM_1)
44
#define OS_INTERRUPTMASK_MEM_2 OS_INTERRUPTMASK(__OS_INTERRUPT_MEM_2)
45
#define OS_INTERRUPTMASK_MEM_3 OS_INTERRUPTMASK(__OS_INTERRUPT_MEM_3)
46
#define OS_INTERRUPTMASK_MEM_ADDRESS \
47
OS_INTERRUPTMASK(__OS_INTERRUPT_MEM_ADDRESS)
48
#define OS_INTERRUPTMASK_MEM \
49
(OS_INTERRUPTMASK_MEM_0 | OS_INTERRUPTMASK_MEM_1 | \
50
OS_INTERRUPTMASK_MEM_2 | OS_INTERRUPTMASK_MEM_3 | \
51
OS_INTERRUPTMASK_MEM_ADDRESS)
52
#define OS_INTERRUPTMASK_DSP_AI OS_INTERRUPTMASK(__OS_INTERRUPT_DSP_AI)
53
#define OS_INTERRUPTMASK_DSP_ARAM OS_INTERRUPTMASK(__OS_INTERRUPT_DSP_ARAM)
54
#define OS_INTERRUPTMASK_DSP_DSP OS_INTERRUPTMASK(__OS_INTERRUPT_DSP_DSP)
55
#define OS_INTERRUPTMASK_DSP \
56
(OS_INTERRUPTMASK_DSP_AI | OS_INTERRUPTMASK_DSP_ARAM | \
57
OS_INTERRUPTMASK_DSP_DSP)
58
#define OS_INTERRUPTMASK_AI_AI OS_INTERRUPTMASK(__OS_INTERRUPT_AI_AI)
59
#define OS_INTERRUPTMASK_AI (OS_INTERRUPTMASK_AI_AI)
60
#define OS_INTERRUPTMASK_EXI_0_EXI OS_INTERRUPTMASK(__OS_INTERRUPT_EXI_0_EXI)
61
#define OS_INTERRUPTMASK_EXI_0_TC OS_INTERRUPTMASK(__OS_INTERRUPT_EXI_0_TC)
62
#define OS_INTERRUPTMASK_EXI_0_EXT OS_INTERRUPTMASK(__OS_INTERRUPT_EXI_0_EXT)
63
#define OS_INTERRUPTMASK_EXI_0 \
64
(OS_INTERRUPTMASK_EXI_0_EXI | OS_INTERRUPTMASK_EXI_0_TC | \
65
OS_INTERRUPTMASK_EXI_0_EXT)
66
#define OS_INTERRUPTMASK_EXI_1_EXI OS_INTERRUPTMASK(__OS_INTERRUPT_EXI_1_EXI)
67
#define OS_INTERRUPTMASK_EXI_1_TC OS_INTERRUPTMASK(__OS_INTERRUPT_EXI_1_TC)
68
#define OS_INTERRUPTMASK_EXI_1_EXT OS_INTERRUPTMASK(__OS_INTERRUPT_EXI_1_EXT)
69
#define OS_INTERRUPTMASK_EXI_1 \
70
(OS_INTERRUPTMASK_EXI_1_EXI | OS_INTERRUPTMASK_EXI_1_TC | \
71
OS_INTERRUPTMASK_EXI_1_EXT)
72
#define OS_INTERRUPTMASK_EXI_2_EXI OS_INTERRUPTMASK(__OS_INTERRUPT_EXI_2_EXI)
73
#define OS_INTERRUPTMASK_EXI_2_TC OS_INTERRUPTMASK(__OS_INTERRUPT_EXI_2_TC)
74
#define OS_INTERRUPTMASK_EXI_2 \
75
(OS_INTERRUPTMASK_EXI_2_EXI | OS_INTERRUPTMASK_EXI_2_TC)
76
#define OS_INTERRUPTMASK_EXI \
77
(OS_INTERRUPTMASK_EXI_0_EXI | OS_INTERRUPTMASK_EXI_0_TC | \
78
OS_INTERRUPTMASK_EXI_0_EXT | OS_INTERRUPTMASK_EXI_1_EXI | \
79
OS_INTERRUPTMASK_EXI_1_TC | OS_INTERRUPTMASK_EXI_1_EXT | \
80
OS_INTERRUPTMASK_EXI_2_EXI | OS_INTERRUPTMASK_EXI_2_TC)
81
#define OS_INTERRUPTMASK_PI_PE_TOKEN \
82
OS_INTERRUPTMASK(__OS_INTERRUPT_PI_PE_TOKEN)
83
#define OS_INTERRUPTMASK_PI_PE_FINISH \
84
OS_INTERRUPTMASK(__OS_INTERRUPT_PI_PE_FINISH)
85
#define OS_INTERRUPTMASK_PI_PE \
86
(OS_INTERRUPTMASK_PI_PE_TOKEN | OS_INTERRUPTMASK_PI_PE_FINISH)
87
#define OS_INTERRUPTMASK_PI_CP OS_INTERRUPTMASK(__OS_INTERRUPT_PI_CP)
88
#define OS_INTERRUPTMASK_PI_SI OS_INTERRUPTMASK(__OS_INTERRUPT_PI_SI)
89
#define OS_INTERRUPTMASK_PI_DI OS_INTERRUPTMASK(__OS_INTERRUPT_PI_DI)
90
#define OS_INTERRUPTMASK_PI_RSW OS_INTERRUPTMASK(__OS_INTERRUPT_PI_RSW)
91
#define OS_INTERRUPTMASK_PI_ERROR OS_INTERRUPTMASK(__OS_INTERRUPT_PI_ERROR)
92
#define OS_INTERRUPTMASK_PI_VI OS_INTERRUPTMASK(__OS_INTERRUPT_PI_VI)
93
#define OS_INTERRUPTMASK_PI_DEBUG OS_INTERRUPTMASK(__OS_INTERRUPT_PI_DEBUG)
94
#define OS_INTERRUPTMASK_PI_HSP OS_INTERRUPTMASK(__OS_INTERRUPT_PI_HSP)
95
#define OS_INTERRUPTMASK_PI \
96
(OS_INTERRUPTMASK_PI_CP | OS_INTERRUPTMASK_PI_SI | \
97
OS_INTERRUPTMASK_PI_DI | OS_INTERRUPTMASK_PI_RSW | \
98
OS_INTERRUPTMASK_PI_ERROR | OS_INTERRUPTMASK_PI_VI | \
99
OS_INTERRUPTMASK_PI_PE_TOKEN | OS_INTERRUPTMASK_PI_PE_FINISH | \
100
OS_INTERRUPTMASK_PI_DEBUG | OS_INTERRUPTMASK_PI_HSP)
101
102
extern
volatile
__OSInterrupt
__OSLastInterrupt
;
103
extern
volatile
u32
__OSLastInterruptSrr0
;
104
extern
volatile
OSTime
__OSLastInterruptTime
;
105
106
__OSInterruptHandler
__OSSetInterruptHandler
(
__OSInterrupt
interrupt,
107
__OSInterruptHandler
handler);
108
109
__OSInterruptHandler
__OSGetInterruptHandler
(
__OSInterrupt
interrupt);
110
111
void
__OSDispatchInterrupt
(
__OSException
exception,
OSContext
* context);
112
113
OSInterruptMask
OSGetInterruptMask
(
void
);
114
OSInterruptMask
OSSetInterruptMask
(
OSInterruptMask
mask
);
115
OSInterruptMask
__OSMaskInterrupts
(
OSInterruptMask
mask
);
116
OSInterruptMask
__OSUnmaskInterrupts
(
OSInterruptMask
mask
);
117
118
#ifdef __cplusplus
119
}
120
#endif
121
122
#endif
__OSException
u8 __OSException
Definition
OSException.h:29
__OSUnmaskInterrupts
OSInterruptMask __OSUnmaskInterrupts(OSInterruptMask mask)
__OSLastInterruptSrr0
volatile u32 __OSLastInterruptSrr0
__OSSetInterruptHandler
__OSInterruptHandler __OSSetInterruptHandler(__OSInterrupt interrupt, __OSInterruptHandler handler)
OSGetInterruptMask
OSInterruptMask OSGetInterruptMask(void)
__OSLastInterruptTime
volatile OSTime __OSLastInterruptTime
OSSetInterruptMask
OSInterruptMask OSSetInterruptMask(OSInterruptMask mask)
__OSMaskInterrupts
OSInterruptMask __OSMaskInterrupts(OSInterruptMask mask)
__OSLastInterrupt
volatile __OSInterrupt __OSLastInterrupt
__OSDispatchInterrupt
void __OSDispatchInterrupt(__OSException exception, OSContext *context)
__OSGetInterruptHandler
__OSInterruptHandler __OSGetInterruptHandler(__OSInterrupt interrupt)
types.h
u32
unsigned long u32
Definition
types.h:9
os.h
__OSInterruptHandler
void(* __OSInterruptHandler)(__OSInterrupt interrupt, OSContext *context)
Definition
os.h:18
OSTime
s64 OSTime
Definition
os.h:10
__OSInterrupt
s16 __OSInterrupt
Definition
os.h:13
OSInterruptMask
u32 OSInterruptMask
Definition
os.h:14
mask
int mask
Definition
state.c:133
OSContext
Definition
OSContext.h:138
extern
dolphin
include
dolphin
os
OSInterrupt.h
Generated by
1.15.0