PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
librm.c File Reference
#include <stdio.h>
#include <tamtypes.h>
#include <sifrpc.h>
#include <kernel.h>
#include <string.h>
#include "librm.h"
+ Include dependency graph for librm.c:

Go to the source code of this file.

Data Structures

struct  port_state
 

Functions

static SifRpcClientData_t rmmanif __attribute__ ((aligned(64)))
 
static struct rmEEDatarmGetDmaStr (int port, int slot)
 
int RMMan_Init (void)
 Initialise librm.
 
u32 RMMan_GetModuleVersion (void)
 Returns the rmman.irx version.
 
int RMMan_Open (int port, int slot, void *pData)
 
int RMMan_End (void)
 Ends all remote communication.
 
int RMMan_Close (int port, int slot)
 Closes an opened port.
 
void RMMan_Read (int port, int slot, struct remote_data *data)
 Read remote data.
 

Variables

static int rmman_type = 0
 
static struct port_state ports [2]
 

Detailed Description

RPC Interface for PS2 Remote Control Driver (RMMAN)

Definition in file librm.c.


Data Structure Documentation

◆ port_state

struct port_state

Definition at line 27 of file librm.c.

+ Collaboration diagram for port_state:
Data Fields
int opened
struct rmEEData * rmData

Function Documentation

◆ rmGetDmaStr()

static struct rmEEData * rmGetDmaStr ( int port,
int slot )
static

Definition at line 35 of file librm.c.

◆ RMMan_Init()

int RMMan_Init ( void )

Initialise librm.

Returns
== 1 => OK

Definition at line 54 of file librm.c.

References __attribute__.

◆ RMMan_GetModuleVersion()

u32 RMMan_GetModuleVersion ( void )

Returns the rmman.irx version.

Definition at line 148 of file librm.c.

◆ RMMan_Open()

int RMMan_Open ( int port,
int slot,
void * pData )
Parameters
[in]portPort number to open (0 or 1)
[in]slotSlot to open (0 or 1: multitap not supported)
[out]pDataThe address of the buffer for storing the pad status. Must be a 256-byte region (2xsizeof(struct pad_data). Must be a 64-byte aligned address.
Returns
!= 0 => OK

Definition at line 168 of file librm.c.

◆ RMMan_End()

int RMMan_End ( void )

Ends all remote communication.

Returns
== 1 => OK

Definition at line 227 of file librm.c.

◆ RMMan_Close()

int RMMan_Close ( int port,
int slot )

Closes an opened port.

Parameters
portPort to close
slotSlot to close
Returns
!= 0 => OK

Definition at line 247 of file librm.c.

◆ RMMan_Read()

void RMMan_Read ( int port,
int slot,
struct remote_data * data )

Read remote data.

Parameters
[in]portPort number to get the status for.
[in]slotSlot number to get the status for.
[out]dataA pointer to a 32 byte array where the result is stored
Returns
!= 0 => OK

Definition at line 296 of file librm.c.

Variable Documentation

◆ rmman_type

int rmman_type = 0
static

Definition at line 25 of file librm.c.

◆ ports

struct port_state ports[2]
static

Definition at line 33 of file librm.c.