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