PS2SDK
PS2 Homebrew Libraries
s_dcb.c
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
9 */
10 
11 #include "libspu2_internal.h"
12 
13 void _SpuDataCallback(int (*callback)(void *userdata))
14 {
15  char dummyarg[8];
16 
17  ReleaseIntrHandler(IOP_IRQ_DMA_SPU2);
18  RegisterIntrHandler(IOP_IRQ_DMA_SPU2, 1, callback, dummyarg);
19 }
20 
21 void _SpuAutoDMACallback(int (*callback)(void *userdata))
22 {
23  char dummyarg[8];
24 
25  ReleaseIntrHandler(IOP_IRQ_DMA_SPU);
26  RegisterIntrHandler(IOP_IRQ_DMA_SPU, 1, callback, dummyarg);
27 }
RegisterIntrHandler
int RegisterIntrHandler(int irq, int mode, int(*handler)(void *arg), void *arg)
Definition: intrman.c:115
ReleaseIntrHandler
int ReleaseIntrHandler(int irq)
Definition: intrman.c:157