PS2SDK
PS2 Homebrew Libraries
acram.h
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
9 */
10 
11 #ifndef _ACRAM_H
12 #define _ACRAM_H
13 
14 #include <accore.h>
15 
16 typedef acUint32 acRamAddr;
17 
18 typedef struct ac_ram acRamData;
19 typedef acRamData *acRamT;
20 typedef void (*acRamDone)(acRamT ram, void *arg, int ret);
21 
22 struct ac_ram
23 {
24  acQueueChainData r_chain;
25  acRamDone r_done;
26  void *r_arg;
27  void *r_buf;
28  acUint32 r_count;
29  acRamAddr r_addr;
30  acInt32 r_tmout;
31 };
32 
33 extern int acRamModuleRestart(int argc, char **argv);
34 extern int acRamModuleStart(int argc, char **argv);
35 extern int acRamModuleStatus();
36 extern int acRamModuleStop();
37 extern acRamT acRamSetup(acRamData *ram, acRamDone done, void *arg, int tmout);
38 extern int acRamRead(acRamT ram, acRamAddr addr, void *buf, int count);
39 extern int acRamReadI(acRamT ram, acRamAddr addr, void *buf, int count);
40 extern int acRamWrite(acRamT ram, acRamAddr addr, void *buf, int count);
41 extern int acRamWriteI(acRamT ram, acRamAddr addr, void *buf, int count);
42 
43 #define acram_IMPORTS_start DECLARE_IMPORT_TABLE(acram, 1, 1)
44 #define acram_IMPORTS_end END_IMPORT_TABLE
45 
46 #define I_acRamModuleRestart DECLARE_IMPORT(4, acRamModuleRestart)
47 #define I_acRamModuleStart DECLARE_IMPORT(5, acRamModuleStart)
48 #define I_acRamModuleStatus DECLARE_IMPORT(6, acRamModuleStatus)
49 #define I_acRamModuleStop DECLARE_IMPORT(7, acRamModuleStop)
50 #define I_acRamSetup DECLARE_IMPORT(8, acRamSetup)
51 #define I_acRamRead DECLARE_IMPORT(9, acRamRead)
52 #define I_acRamReadI DECLARE_IMPORT(10, acRamReadI)
53 #define I_acRamWrite DECLARE_IMPORT(11, acRamWrite)
54 #define I_acRamWriteI DECLARE_IMPORT(12, acRamWriteI)
55 
56 #endif
ac_ram
Definition: acram.h:22
ac_queue
Definition: accore.h:52
count
u32 count
start sector of fragmented bd/file
Definition: usbhdfsd-common.h:3