PS2SDK
PS2 Homebrew Libraries
sbusintr.h
Go to the documentation of this file.
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright (c) 2003 Marcus R. Brown <mrbrown@0xd6.org>
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
9 */
10 
16 #ifndef __SBUSINTR_H__
17 #define __SBUSINTR_H__
18 
19 #include <types.h>
20 #include <irx.h>
21 
22 /* SBUS interface */
24  SBUS_E_OK,
25 
27  SBUS_E_INIT = 0xd600,
32 };
33 
34 typedef int (*sbus_intr_handler_t)(u32 irq, void *arg);
35 
36 extern int sbus_intr_init();
37 extern void sbus_intr_exit();
38 
39 extern int sbus_intr_handler_add(u32 irq, sbus_intr_handler_t handler, void *arg);
40 extern int sbus_intr_handler_del(u32 irq);
41 
42 extern void sbus_intr_main_interrupt(u32 irq);
43 
44 #define sbusintr_IMPORTS_start DECLARE_IMPORT_TABLE(sbusintr, 1, 1)
45 #define sbusintr_IMPORTS_end END_IMPORT_TABLE
46 
47 #define I_sbus_intr_init DECLARE_IMPORT(4, sbus_intr_init)
48 #define I_sbus_intr_exit DECLARE_IMPORT(2, sbus_intr_exit)
49 #define I_sbus_intr_handler_add DECLARE_IMPORT(5, sbus_intr_handler_add)
50 #define I_sbus_intr_handler_del DECLARE_IMPORT(6, sbus_intr_handler_del)
51 #define I_sbus_intr_main_interrupt DECLARE_IMPORT(7, sbus_intr_main_interrupt)
52 
53 #endif /* __SBUSINTR_H__ */
irx.h
SBUS_E_ARG
@ SBUS_E_ARG
Definition: sbusintr.h:29
SBUS_E_IRQ
@ SBUS_E_IRQ
Definition: sbusintr.h:31
sbus_errors
sbus_errors
Definition: sbusintr.h:23
SBUS_E_INIT
@ SBUS_E_INIT
Definition: sbusintr.h:27