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.
10 # $Id: dev9.h 1454 2007-11-04 23:19:57Z roman_ps2dev $
11 # DEV9 Device Driver definitions and imports.
20 typedef int (*dev9_intr_cb_t
)(int flag
);
21 typedef void (*dev9_shutdown_cb_t
)(void);
22 typedef void (*dev9_dma_cb_t
)(int bcr
, int dir
);
24 #define dev9_IMPORTS_start DECLARE_IMPORT_TABLE(dev9, 1, 1)
25 #define dev9_IMPORTS_end END_IMPORT_TABLE
27 void dev9RegisterIntrCb(int intr
, dev9_intr_cb_t cb
);
28 #define I_dev9RegisterIntrCb DECLARE_IMPORT(4, dev9RegisterIntrCb)
30 int dev9DmaTransfer(int ctrl
, void *buf
, int bcr
, int dir
);
31 #define I_dev9DmaTransfer DECLARE_IMPORT(5, dev9DmaTransfer)
33 void dev9Shutdown(void);
34 #define I_dev9Shutdown DECLARE_IMPORT(6, dev9Shutdown)
35 void dev9IntrEnable(int mask
);
36 #define I_dev9IntrEnable DECLARE_IMPORT(7, dev9IntrEnable)
37 void dev9IntrDisable(int mask
);
38 #define I_dev9IntrDisable DECLARE_IMPORT(8, dev9IntrDisable)
40 int dev9GetEEPROM(u16
*buf
);
41 #define I_dev9GetEEPROM DECLARE_IMPORT(9, dev9GetEEPROM)
43 void dev9LEDCtl(int ctl
);
44 #define I_dev9LEDCtl DECLARE_IMPORT(10, dev9LEDCtl)
46 int dev9RegisterShutdownCb(int idx
, dev9_shutdown_cb_t cb
);
47 #define I_dev9RegisterShutdownCb DECLARE_IMPORT(11, dev9RegisterShutdownCb)
49 void dev9RegisterPreDmaCb(int ctrl
, dev9_dma_cb_t cb
);
50 #define I_dev9RegisterPreDmaCb DECLARE_IMPORT(12, dev9RegisterPreDmaCb)
52 void dev9RegisterPostDmaCb(int ctrl
, dev9_dma_cb_t cb
);
53 #define I_dev9RegisterPostDmaCb DECLARE_IMPORT(13, dev9RegisterPostDmaCb)
55 #endif /* IOP_PS2DEV9_H */