sdk-core
v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Toggle main menu visibility
Loading...
Searching...
No Matches
ps2cam_rpc.h
Go to the documentation of this file.
1
/*
2
PSX2 OpenSource Project
3
(C)2004-2005 Lion[PS2Dev]
4
(C)2004-2005 PS2Dev.org
5
*/
6
12
13
#ifndef __PS2CAM_RPC_H__
14
#define __PS2CAM_RPC_H__
15
17
#define PS2CAM_RPC_GETIRXVERSION 40
19
#define PS2CAM_RPC_INITIALIZE 41
21
#define PS2CAM_RPC_GETDEVCOUNT 42
22
#define PS2CAM_RPC_OPENDEVICE 43
23
#define PS2CAM_RPC_CLOSEDEVICE 44
25
#define PS2CAM_RPC_GETDEVSTATUS 45
27
#define PS2CAM_RPC_GETDEVINFO 46
29
#define PS2CAM_RPC_SETDEVBANDWIDTH 47
31
#define PS2CAM_RPC_READPACKET 48
33
#define PS2CAM_RPC_SETLEDMODE 49
34
35
#define PS2CAM_RPC_SETDEVCONFIG 50
36
37
/* led modes */
38
#define PS2CAM_LED_MODE_OFF 0
39
#define PS2CAM_LED_MODE_ON 1
40
//#define PS2CAM_LED_MODE_FLASH 2
41
42
/* device status */
44
#define CAM_STATUS_NOTCONNECTED 0
46
#define CAM_STATUS_CONNECTED 1
48
#define CAM_STATUS_CONNECTEDREADY 2
49
50
/* used with PS2CAM_DEVICE_CONFIG->mask */
51
#define CAM_CONFIG_MASK_DIMENSION 0x00000001
52
#define CAM_CONFIG_MASK_OFFSET 0x00000002
53
#define CAM_CONFIG_MASK_DIVIDER 0x00000004
54
#define CAM_CONFIG_MASK_FRAMERATE 0x00000008
55
56
/* error codes */
58
#define CAM_ERROR_NONE (00)
59
#define CAM_ERROR_NOTINIT -(20)
60
#define CAM_ERROR_INVALIDDEVICE -(21)
62
#define CAM_ERROR_COMMUNKNOWN -(22)
64
#define CAM_ERROR_DEVNOTREADY -(23)
66
#define CAM_ERROR_NODEVICE -(24)
68
#define CAM_ERROR_BADRANGE -(25)
70
#define CAM_ERROR_UNKNOWN -(26)
72
#define CAM_ERROR_MAXHANDLE -(27)
74
#define CAM_ERROR_BADHANDLE -(28)
76
#define CAM_ERROR_DISCONNECTED -(29)
77
78
typedef
struct
79
{
81
unsigned
char
magic1;
83
unsigned
char
magic2;
85
unsigned
char
magic3;
87
unsigned
char
type;
88
unsigned
char
uk1;
89
unsigned
char
uk2;
90
unsigned
char
uk3;
91
unsigned
char
uk4;
92
unsigned
char
uk5;
94
unsigned
char
frame;
95
unsigned
char
uk6;
96
unsigned
char
uk7;
97
unsigned
char
uk8;
98
unsigned
char
uk9;
100
unsigned
char
Lo;
102
unsigned
char
Hi;
103
}
EYETOY_FRAME_HEAD
;
104
105
typedef
struct
106
{
108
unsigned
int
ssize;
110
unsigned
short
vendor_id;
112
unsigned
short
product_id;
114
unsigned
char
vendor_name[32];
116
unsigned
char
product_name[32];
118
unsigned
char
model[16];
119
}
PS2CAM_DEVICE_INFO
;
120
121
122
typedef
struct
123
{
125
unsigned
int
ssize;
127
unsigned
int
mask;
129
unsigned
short
width;
131
unsigned
short
height;
133
unsigned
short
x_offset;
135
unsigned
short
y_offset;
137
unsigned
char
h_divider;
139
unsigned
char
v_divider;
141
unsigned
short
framerate;
142
}
PS2CAM_DEVICE_CONFIG
;
143
144
//extern char campacket[]; //data is stored here when PS2CamReadPacket(...) is called. Still not used anywhere
145
146
#ifdef __cplusplus
147
extern
"C"
{
148
#endif
149
150
extern
int
PS2CamInit
(
int
mode);
151
extern
int
PS2CamGetIRXVersion
(
void
);
152
extern
int
PS2CamGetDeviceCount
(
void
);
153
extern
int
PS2CamOpenDevice
(
int
device_index);
154
extern
int
PS2CamCloseDevice
(
int
handle);
155
extern
int
PS2CamGetDeviceStatus
(
int
handle);
156
extern
int
PS2CamGetDeviceInfo
(
int
handle,
PS2CAM_DEVICE_INFO
*info);
157
extern
int
PS2CamSetDeviceBandwidth
(
int
handle,
char
bandwidth);
158
extern
int
PS2CamReadPacket
(
int
handle);
159
extern
int
PS2CamSetLEDMode
(
int
handle,
int
mode);
160
extern
int
PS2CamSetDeviceConfig
(
int
handle,
PS2CAM_DEVICE_CONFIG
*cfg);
161
162
extern
int
PS2CamExtractFrame(
int
handle,
char
*buffer,
int
bufsize);
163
164
#ifdef __cplusplus
165
}
166
#endif
167
168
#endif
/* __PS2CAM_RPC_H__ */
PS2CamGetDeviceStatus
int PS2CamGetDeviceStatus(int device_id)
Definition
ps2cam.c:1090
PS2CamGetDeviceCount
int PS2CamGetDeviceCount(void)
Definition
ps2cam.c:967
PS2CamSetLEDMode
int PS2CamSetLEDMode(int device_id, int mode)
Definition
ps2cam.c:1309
PS2CamGetDeviceInfo
int PS2CamGetDeviceInfo(int handle, int *info)
Definition
ps2cam.c:1114
PS2CamInit
int PS2CamInit(int mode)
Definition
ps2cam.c:955
PS2CamCloseDevice
int PS2CamCloseDevice(int handle)
Definition
ps2cam.c:1060
PS2CamSetDeviceBandwidth
int PS2CamSetDeviceBandwidth(int device_id, char bandwidth)
Definition
ps2cam.c:1179
PS2CamGetIRXVersion
int PS2CamGetIRXVersion(void)
Definition
ps2cam.c:940
PS2CamSetDeviceConfig
int PS2CamSetDeviceConfig(int handle, void *config)
Definition
ps2cam.c:1354
PS2CamOpenDevice
int PS2CamOpenDevice(int device_index)
Definition
ps2cam.c:991
PS2CamReadPacket
int PS2CamReadPacket(int device_id)
Definition
ps2cam.c:1255
EYETOY_FRAME_HEAD
Definition
ps2cam.h:205
PS2CAM_DEVICE_CONFIG
Definition
ps2cam.h:183
PS2CAM_DEVICE_INFO
Definition
ps2cam.h:146
core
ps2cam
include
ps2cam_rpc.h
Generated by
1.18.0