PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
siftoo.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
16#ifndef __SIFTOO_H__
17#define __SIFTOO_H__
18
19#include <types.h>
20#include <irx.h>
21
25
27 SIF2_E_INIT = 0xd700,
28};
29
30typedef int (*sif2_pipe_handler_t)(u32, void *, u32);
31
32extern int sif2_init(void);
33extern int sif2_exit(void);
34
35extern int sif2_mem_read(u32 addr, void *buf, u32 size);
36extern int sif2_mem_write(u32 addr, void *buf, u32 size);
37
38/* Pipe API. */
39extern int sif2_pipe_create(u32 id, void *buf, u32 size, u32 flags,
40 sif2_pipe_handler_t phandler);
41extern int sif2_pipe_open(u32 id);
42extern int sif2_pipe_close(int pd);
43
44extern int sif2_pipe_read(int pd, void *buf, u32 size);
45extern int sif2_pipe_write(int pd, void *buf, u32 size);
46
47#define siftoo_IMPORTS_start DECLARE_IMPORT_TABLE(siftoo, 1, 1)
48#define siftoo_IMPORTS_end END_IMPORT_TABLE
49
50#define I_sif2_init DECLARE_IMPORT(4, sif2_init)
51#define I_sif2_exit DECLARE_IMPORT(5, sif2_exit)
52#define I_sif2_mem_read DECLARE_IMPORT(6, sif2_mem_read)
53#define I_sif2_mem_write DECLARE_IMPORT(7, sif2_mem_write)
54#define I_sif2_pipe_create DECLARE_IMPORT(10, sif2_pipe_create)
55#define I_sif2_pipe_open DECLARE_IMPORT(11, sif2_pipe_open)
56#define I_sif2_pipe_close DECLARE_IMPORT(12, sif2_pipe_close)
57#define I_sif2_pipe_read DECLARE_IMPORT(13, sif2_pipe_read)
58#define I_sif2_pipe_write DECLARE_IMPORT(14, sif2_pipe_write)
59
60#endif /* __SIFTOO_H__ */
sif2_errors
Definition siftoo.h:22
@ SIF2_E_INIT
Definition siftoo.h:27
@ SIF2_E_OK
Definition siftoo.h:24