|
ps2sdk
1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
|
#include <tamtypes.h>#include <kernel.h>#include <sifrpc.h>#include <stdio.h>#include <string.h>#include "../include/ps2cam_rpc.h"
Include dependency graph for ps2cam_rpc.c:Go to the source code of this file.
Macros | |
| #define | PS2_CAM_RPC_ID 0x00FD000 +2 |
Functions | |
| int | PS2CamInit (int mode) |
| int | PS2CamGetIRXVersion (void) |
| int | PS2CamGetDeviceCount (void) |
| int | PS2CamOpenDevice (int device_index) |
| int | PS2CamCloseDevice (int handle) |
| int | PS2CamGetDeviceStatus (int handle) |
| int | PS2CamGetDeviceInfo (int handle, PS2CAM_DEVICE_INFO *info) |
| int | PS2CamSetDeviceBandwidth (int handle, char bandwidth) |
| int | PS2CamReadPacket (int handle) |
| int | PS2CamSetLEDMode (int handle, int mode) |
| int | PS2CamSetDeviceConfig (int handle, PS2CAM_DEVICE_CONFIG *cfg) |
| int | PS2CamExtractFrame (int handle, char *buffer, int bufsize) |
Variables | |
| static int | CamInited = 0 |
| static SifRpcClientData_t | cdata |
| static char | data [1024] |
| static char | campacket [896] |
| ee_sema_t | compSema |
| int | sem |
PS2CAM.irx rpc client
Definition in file ps2cam_rpc.c.
| #define PS2_CAM_RPC_ID 0x00FD000 +2 |
Definition at line 21 of file ps2cam_rpc.c.
| int PS2CamCloseDevice | ( | int | handle | ) |
Definition at line 134 of file ps2cam_rpc.c.
References cdata, data, PS2CAM_RPC_CLOSEDEVICE, and SifCallRpc().
| int PS2CamExtractFrame | ( | int | handle, |
| char * | buffer, | ||
| int | bufsize | ||
| ) |
Definition at line 284 of file ps2cam_rpc.c.
References buffer, campacket, EYETOY_FRAME_HEAD::frame, EYETOY_FRAME_HEAD::Hi, EYETOY_FRAME_HEAD::Lo, EYETOY_FRAME_HEAD::magic2, EYETOY_FRAME_HEAD::magic3, pos, PS2CamReadPacket(), and EYETOY_FRAME_HEAD::type.
Referenced by main().
| int PS2CamGetDeviceCount | ( | void | ) |
Definition at line 102 of file ps2cam_rpc.c.
References cdata, data, nopdelay(), PS2CAM_RPC_GETDEVCOUNT, and SifCallRpc().
Referenced by main().
| int PS2CamGetDeviceInfo | ( | int | handle, |
| PS2CAM_DEVICE_INFO * | info | ||
| ) |
Definition at line 170 of file ps2cam_rpc.c.
References cdata, data, info, nopdelay(), PS2CAM_RPC_GETDEVINFO, SifCallRpc(), and PS2CAM_DEVICE_INFO::ssize.
Referenced by main().
| int PS2CamGetDeviceStatus | ( | int | handle | ) |
Definition at line 151 of file ps2cam_rpc.c.
References cdata, data, nopdelay(), PS2CAM_RPC_GETDEVSTATUS, and SifCallRpc().
Referenced by main().
| int PS2CamGetIRXVersion | ( | void | ) |
Definition at line 86 of file ps2cam_rpc.c.
References cdata, data, nopdelay(), PS2CAM_RPC_GETIRXVERSION, and SifCallRpc().
| int PS2CamInit | ( | int | mode | ) |
Definition at line 37 of file ps2cam_rpc.c.
References CamInited, cdata, compSema, CreateSema(), data, ee_sema_t::init_count, ee_sema_t::max_count, mode, nopdelay(), NULL, ee_sema_t::option, PS2_CAM_RPC_ID, PS2CAM_RPC_INITIALIZE, sem, SifRpcClientData_t::server, SifBindRpc(), SifCallRpc(), and SifInitRpc().
Referenced by main().
| int PS2CamOpenDevice | ( | int | device_index | ) |
Definition at line 118 of file ps2cam_rpc.c.
References cdata, data, PS2CAM_RPC_OPENDEVICE, and SifCallRpc().
Referenced by main().
| int PS2CamReadPacket | ( | int | handle | ) |
Definition at line 216 of file ps2cam_rpc.c.
References campacket, cdata, data, DI, ee_kmode_enter(), ee_kmode_exit(), EI, PS2CAM_RPC_READPACKET, sem, SifCallRpc(), SignalSema(), and WaitSema().
Referenced by PS2CamExtractFrame().
| int PS2CamSetDeviceBandwidth | ( | int | handle, |
| char | bandwidth | ||
| ) |
Definition at line 194 of file ps2cam_rpc.c.
References cdata, data, nopdelay(), PS2CAM_RPC_SETDEVBANDWIDTH, and SifCallRpc().
Referenced by main().
| int PS2CamSetDeviceConfig | ( | int | handle, |
| PS2CAM_DEVICE_CONFIG * | cfg | ||
| ) |
Definition at line 267 of file ps2cam_rpc.c.
References cdata, cfg, data, PS2CAM_RPC_SETDEVCONFIG, SifCallRpc(), and PS2CAM_DEVICE_CONFIG::ssize.
Referenced by main().
| int PS2CamSetLEDMode | ( | int | handle, |
| int | mode | ||
| ) |
Definition at line 251 of file ps2cam_rpc.c.
References cdata, data, mode, PS2CAM_RPC_SETLEDMODE, and SifCallRpc().
|
static |
Definition at line 25 of file ps2cam_rpc.c.
Referenced by PS2CamInit().
|
static |
Definition at line 28 of file ps2cam_rpc.c.
Referenced by PS2CamExtractFrame(), and PS2CamReadPacket().
|
static |
Definition at line 26 of file ps2cam_rpc.c.
Referenced by PS2CamCloseDevice(), PS2CamGetDeviceCount(), PS2CamGetDeviceInfo(), PS2CamGetDeviceStatus(), PS2CamGetIRXVersion(), PS2CamInit(), PS2CamOpenDevice(), PS2CamReadPacket(), PS2CamSetDeviceBandwidth(), PS2CamSetDeviceConfig(), and PS2CamSetLEDMode().
| ee_sema_t compSema |
Definition at line 30 of file ps2cam_rpc.c.
Referenced by audsrv_init(), and PS2CamInit().
|
static |
Definition at line 27 of file ps2cam_rpc.c.
Referenced by PS2CamCloseDevice(), PS2CamGetDeviceCount(), PS2CamGetDeviceInfo(), PS2CamGetDeviceStatus(), PS2CamGetIRXVersion(), PS2CamInit(), PS2CamOpenDevice(), PS2CamReadPacket(), PS2CamSetDeviceBandwidth(), PS2CamSetDeviceConfig(), and PS2CamSetLEDMode().
| int sem |
Definition at line 32 of file ps2cam_rpc.c.
Referenced by PS2CamInit(), PS2CamReadPacket(), sys_sem_new(), sys_sem_set_invalid(), and sys_sem_valid().