PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
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
22typedef int (*aif_intr_cb_t)(void);
23
24extern int aifIsDetected(void);
25
26extern void aifIntrEnable(int mask);
27extern void aifIntrDisable(int mask);
28
29extern void aifRegisterIntrCb(int intr, aif_intr_cb_t cb);
30extern int aifRegisterShutdownCb(int idx, dev9_shutdown_cb_t cb);
31
32extern unsigned char aifRTCReadData(unsigned short int address);
33extern 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