Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
OSInterrupt.h
Go to the documentation of this file.
1#ifndef OSINTERRUPT_H
2#define OSINTERRUPT_H
3
4#include "dolphin/types.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10typedef struct OSContext OSContext;
11
48
49#define OS_INTERRUPTMASK(interrupt) (0x80000000u >> (interrupt))
50
51#define OS_INTERRUPTMASK_MEM_0 OS_INTERRUPTMASK(OS_INTR_MEM_0)
52#define OS_INTERRUPTMASK_MEM_1 OS_INTERRUPTMASK(OS_INTR_MEM_1)
53#define OS_INTERRUPTMASK_MEM_2 OS_INTERRUPTMASK(OS_INTR_MEM_2)
54#define OS_INTERRUPTMASK_MEM_3 OS_INTERRUPTMASK(OS_INTR_MEM_3)
55#define OS_INTERRUPTMASK_MEM_ADDRESS OS_INTERRUPTMASK(OS_INTR_MEM_ADDRESS)
56#define OS_INTERRUPTMASK_MEM_RESET \
57 (OS_INTERRUPTMASK_MEM_0 | OS_INTERRUPTMASK_MEM_1 | OS_INTERRUPTMASK_MEM_2 | \
58 OS_INTERRUPTMASK_MEM_3)
59#define OS_INTERRUPTMASK_MEM \
60 (OS_INTERRUPTMASK_MEM_0 | OS_INTERRUPTMASK_MEM_1 | OS_INTERRUPTMASK_MEM_2 | \
61 OS_INTERRUPTMASK_MEM_3 | OS_INTERRUPTMASK_MEM_ADDRESS)
62
63#define OS_INTERRUPTMASK_DSP_AI OS_INTERRUPTMASK(OS_INTR_DSP_AI)
64#define OS_INTERRUPTMASK_DSP_ARAM OS_INTERRUPTMASK(OS_INTR_DSP_ARAM)
65#define OS_INTERRUPTMASK_DSP_DSP OS_INTERRUPTMASK(OS_INTR_DSP_DSP)
66#define OS_INTERRUPTMASK_DSP \
67 (OS_INTERRUPTMASK_DSP_AI | OS_INTERRUPTMASK_DSP_ARAM | OS_INTERRUPTMASK_DSP_DSP)
68
69#define OS_INTERRUPTMASK_AI_AI OS_INTERRUPTMASK(OS_INTR_AI_AI)
70#define OS_INTERRUPTMASK_AI (OS_INTERRUPTMASK_AI_AI)
71
72#define OS_INTERRUPTMASK_EXI_0_EXI OS_INTERRUPTMASK(OS_INTR_EXI_0_EXI)
73#define OS_INTERRUPTMASK_EXI_0_TC OS_INTERRUPTMASK(OS_INTR_EXI_0_TC)
74#define OS_INTERRUPTMASK_EXI_0_EXT OS_INTERRUPTMASK(OS_INTR_EXI_0_EXT)
75#define OS_INTERRUPTMASK_EXI_0 \
76 (OS_INTERRUPTMASK_EXI_0_EXI | OS_INTERRUPTMASK_EXI_0_TC | OS_INTERRUPTMASK_EXI_0_EXT)
77
78#define OS_INTERRUPTMASK_EXI_1_EXI OS_INTERRUPTMASK(OS_INTR_EXI_1_EXI)
79#define OS_INTERRUPTMASK_EXI_1_TC OS_INTERRUPTMASK(OS_INTR_EXI_1_TC)
80#define OS_INTERRUPTMASK_EXI_1_EXT OS_INTERRUPTMASK(OS_INTR_EXI_1_EXT)
81#define OS_INTERRUPTMASK_EXI_1 \
82 (OS_INTERRUPTMASK_EXI_1_EXI | OS_INTERRUPTMASK_EXI_1_TC | OS_INTERRUPTMASK_EXI_1_EXT)
83
84#define OS_INTERRUPTMASK_EXI_2_EXI OS_INTERRUPTMASK(OS_INTR_EXI_2_EXI)
85#define OS_INTERRUPTMASK_EXI_2_TC OS_INTERRUPTMASK(OS_INTR_EXI_2_TC)
86#define OS_INTERRUPTMASK_EXI_2 (OS_INTERRUPTMASK_EXI_2_EXI | OS_INTERRUPTMASK_EXI_2_TC)
87#define OS_INTERRUPTMASK_EXI \
88 (OS_INTERRUPTMASK_EXI_0_EXI | OS_INTERRUPTMASK_EXI_0_TC | OS_INTERRUPTMASK_EXI_0_EXT | \
89 OS_INTERRUPTMASK_EXI_1_EXI | OS_INTERRUPTMASK_EXI_1_TC | OS_INTERRUPTMASK_EXI_1_EXT | \
90 OS_INTERRUPTMASK_EXI_2_EXI | OS_INTERRUPTMASK_EXI_2_TC)
91
92#define OS_INTERRUPTMASK_PI_PE_TOKEN OS_INTERRUPTMASK(OS_INTR_PI_PE_TOKEN)
93#define OS_INTERRUPTMASK_PI_PE_FINISH OS_INTERRUPTMASK(OS_INTR_PI_PE_FINISH)
94#define OS_INTERRUPTMASK_PI_PE (OS_INTERRUPTMASK_PI_PE_TOKEN | OS_INTERRUPTMASK_PI_PE_FINISH)
95
96#define OS_INTERRUPTMASK_PI_CP OS_INTERRUPTMASK(OS_INTR_PI_CP)
97#define OS_INTERRUPTMASK_PI_SI OS_INTERRUPTMASK(OS_INTR_PI_SI)
98#define OS_INTERRUPTMASK_PI_DI OS_INTERRUPTMASK(OS_INTR_PI_DI)
99#define OS_INTERRUPTMASK_PI_RSW OS_INTERRUPTMASK(OS_INTR_PI_RSW)
100#define OS_INTERRUPTMASK_PI_ERROR OS_INTERRUPTMASK(OS_INTR_PI_ERROR)
101#define OS_INTERRUPTMASK_PI_VI OS_INTERRUPTMASK(OS_INTR_PI_VI)
102#define OS_INTERRUPTMASK_PI_DEBUG OS_INTERRUPTMASK(OS_INTR_PI_DEBUG)
103#define OS_INTERRUPTMASK_PI_HSP OS_INTERRUPTMASK(OS_INTR_PI_HSP)
104#define OS_INTERRUPTMASK_PI \
105 (OS_INTERRUPTMASK_PI_CP | OS_INTERRUPTMASK_PI_SI | OS_INTERRUPTMASK_PI_DI | \
106 OS_INTERRUPTMASK_PI_RSW | OS_INTERRUPTMASK_PI_ERROR | OS_INTERRUPTMASK_PI_VI | \
107 OS_INTERRUPTMASK_PI_PE_TOKEN | OS_INTERRUPTMASK_PI_PE_FINISH | OS_INTERRUPTMASK_PI_DEBUG | \
108 OS_INTERRUPTMASK_PI_HSP)
109
113
120void __OSInterruptInit(void);
124void __OSDispatchInterrupt(u8 interrupt, OSContext* context);
126
129
130#ifdef __cplusplus
131};
132#endif
133
134#endif /* OSINTERRUPT_H */
static OSContext context
Definition JUTException.cpp:233
void __OSDispatchInterrupt(u8 interrupt, OSContext *context)
Definition OSInterrupt.c:301
BOOL OSDisableInterrupts(void)
Definition OSInterrupt.c:10
static void ExternalInterruptHandler(__OSInterrupt interrupt, OSContext *context)
static OSInterruptMask SetInterruptMask(OSInterruptMask param_0, OSInterruptMask param_1)
Definition OSInterrupt.c:104
void(* __OSInterruptHandler)(__OSInterrupt interrupt, OSContext *context)
Definition OSInterrupt.h:112
OSInterruptMask __OSUnmaskInterrupts(OSInterruptMask mask)
Definition OSInterrupt.c:262
__OSInterruptHandler __OSGetInterruptHandler(s16 index)
Definition OSInterrupt.c:82
BOOL OSEnableInterrupts(void)
Definition OSInterrupt.c:30
__OSInterruptHandler __OSSetInterruptHandler(__OSInterrupt interrupt, __OSInterruptHandler handler)
Definition OSInterrupt.c:75
s16 __OSInterrupt
Definition OSInterrupt.h:110
void __RAS_OSDisableInterrupts_end(void)
void __RAS_OSDisableInterrupts_begin(void)
void __OSInterruptInit(void)
Definition OSInterrupt.c:87
BOOL OSRestoreInterrupts(BOOL enable)
OSInterruptType
Definition OSInterrupt.h:12
@ OS_INTR_EXI_2_EXI
Definition OSInterrupt.h:28
@ OS_INTR_EXI_0_TC
Definition OSInterrupt.h:23
@ OS_INTR_PI_HSP
Definition OSInterrupt.h:39
@ OS_INTR_PI_DI
Definition OSInterrupt.h:34
@ OS_INTR_MEM_ADDRESS
Definition OSInterrupt.h:17
@ OS_INTR_31
Definition OSInterrupt.h:44
@ OS_INTR_MEM_0
Definition OSInterrupt.h:13
@ OS_INTR_PI_VI
Definition OSInterrupt.h:37
@ OS_INTR_EXI_0_EXT
Definition OSInterrupt.h:24
@ OS_INTR_PI_DEBUG
Definition OSInterrupt.h:38
@ OS_INTR_PI_RSW
Definition OSInterrupt.h:35
@ OS_INTR_DSP_ARAM
Definition OSInterrupt.h:19
@ OS_INTR_PI_SI
Definition OSInterrupt.h:33
@ OS_INTR_PI_PE_TOKEN
Definition OSInterrupt.h:31
@ OS_INTR_MEM_3
Definition OSInterrupt.h:16
@ OS_INTR_AI_AI
Definition OSInterrupt.h:21
@ OS_INTR_EXI_1_EXI
Definition OSInterrupt.h:25
@ OS_INTR_PI_PE_FINISH
Definition OSInterrupt.h:32
@ OS_INTR_DSP_DSP
Definition OSInterrupt.h:20
@ OS_INTR_MEM_2
Definition OSInterrupt.h:15
@ OS_INTR_30
Definition OSInterrupt.h:43
@ OS_INTR_PI_CP
Definition OSInterrupt.h:30
@ OS_INTR_29
Definition OSInterrupt.h:42
@ OS_INTR_MEM_1
Definition OSInterrupt.h:14
@ OS_INTR_28
Definition OSInterrupt.h:41
@ OS_INTR_EXI_0_EXI
Definition OSInterrupt.h:22
@ OS_INTR_PI_ACR
Definition OSInterrupt.h:40
@ OS_INTR_EXI_1_TC
Definition OSInterrupt.h:26
@ OS_INTR_EXI_2_TC
Definition OSInterrupt.h:29
@ OS_INTR_DSP_AI
Definition OSInterrupt.h:18
@ OS_INTR_EXI_1_EXT
Definition OSInterrupt.h:27
@ OS_INTR_PI_ERROR
Definition OSInterrupt.h:36
@ OS_INTR_MAX
Definition OSInterrupt.h:46
u32 OSInterruptMask
Definition OSInterrupt.h:111
OSInterruptMask __OSMaskInterrupts(OSInterruptMask mask)
Definition OSInterrupt.c:242
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition OSContext.h:137
int BOOL
Definition types.h:27
unsigned long u32
Definition types.h:10
signed short s16
Definition types.h:5
unsigned char u8
Definition types.h:8