PS2SDK
PS2 Homebrew Libraries
aifdev9.h
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 
11 #ifndef __AIFDEV9_H__
12 #define __AIFDEV9_H__
13 
14 #include <types.h>
15 #include <irx.h>
16 
17 #include <dev9.h>
18 
19 #include <aifregs.h>
20 
21 // AIF management functions
22 typedef int (*aif_intr_cb_t)(void);
23 
24 extern int aifIsDetected(void);
25 
26 extern void aifIntrEnable(int mask);
27 extern void aifIntrDisable(int mask);
28 
29 extern void aifRegisterIntrCb(int intr, aif_intr_cb_t cb);
30 extern int aifRegisterShutdownCb(int idx, dev9_shutdown_cb_t cb);
31 
32 extern unsigned char aifRTCReadData(unsigned short int address);
33 extern void aifRTCWriteData(unsigned char data, unsigned short int address);
34 
35 #define aifdev9_IMPORTS_start DECLARE_IMPORT_TABLE(aifdev9, 1, 1)
36 #define aifdev9_IMPORTS_end END_IMPORT_TABLE
37 
38 #define I_aifIsDetected DECLARE_IMPORT(4, aifIsDetected)
39 #define I_aifIntrEnable DECLARE_IMPORT(5, aifIntrEnable)
40 #define I_aifIntrDisable DECLARE_IMPORT(6, aifIntrDisable)
41 #define I_aifRegisterIntrCb DECLARE_IMPORT(7, aifRegisterIntrCb)
42 #define I_aifRegisterShutdownCb DECLARE_IMPORT(8, aifRegisterShutdownCb)
43 #define I_aifRTCReadData DECLARE_IMPORT(9, aifRTCReadData)
44 #define I_aifRTCWriteData DECLARE_IMPORT(10, aifRTCWriteData)
45 
46 #endif
aifregs.h
irx.h
dev9.h