|
sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
|
#include <tamtypes.h>#include <kernel.h>#include <stdio.h>#include <string.h>#include <sifrpc.h>#include <sifcmd.h>#include <iopcontrol.h>#include "libpad.h"Go to the source code of this file.
Classes | |
| struct | pad_data_new |
| struct | pad_data_old |
| union | pad_data_u |
| struct | pad_state |
| struct | open_slot |
| struct | [struct].padInitArgs |
| struct | [struct].padOpenResult |
| struct | [struct].padResult |
| struct | [struct].padOpenArgs |
| struct | [struct].padCloseArgs |
| struct | [struct].padSlotMaxArgs |
| struct | [struct].padInfoModeArgs |
| struct | [struct].padSetMainModeArgs |
| struct | [struct].padModeResult |
| struct | [struct].padGetButtonMaskArgs |
| struct | [struct].padSetButtonInfoArgs |
| struct | [struct].padSetButtonInfoResult |
| struct | [struct].padInfoActArgs |
| struct | [struct].padActDirAlignArgs |
Functions | |
| int | padInit (int mode) |
| int | padPortInit (int mode) |
| int | padEnd (void) |
| int | padPortOpen (int port, int slot, void *padArea) |
| int | padPortClose (int port, int slot) |
| unsigned char | padRead (int port, int slot, struct padButtonStatus *data) |
| int | padGetState (int port, int slot) |
| unsigned char | padGetReqState (int port, int slot) |
| int | padSetReqState (int port, int slot, int state) |
| void | padStateInt2String (int state, char buf[16]) |
| void | padReqStateInt2String (int state, char buf[16]) |
| int | padGetPortMax (void) |
| int | padGetSlotMax (int port) |
| int | padGetModVersion () |
| int | padInfoMode (int port, int slot, int infoMode, int index) |
| int | padSetMainMode (int port, int slot, int mode, int lock) |
| int | padInfoPressMode (int port, int slot) |
| int | padEnterPressMode (int port, int slot) |
| int | padExitPressMode (int port, int slot) |
| int | padGetButtonMask (int port, int slot) |
| int | padSetButtonInfo (int port, int slot, int buttonInfo) |
| unsigned char | padInfoAct (int port, int slot, int actuator, int cmd) |
| int | padSetActAlign (int port, int slot, const char actAlign[6]) |
| int | padSetActDirect (int port, int slot, const char actAlign[6]) |
| int | padGetConnection (int port, int slot) |
Variables | |
| s32 | command |
| struct | padInitArgs |
| struct | padOpenResult |
| struct | padResult |
| struct | padOpenArgs |
| struct | padCloseArgs |
| struct | padSlotMaxArgs |
| struct | padInfoModeArgs |
| struct | padSetMainModeArgs |
| struct | padModeResult |
| struct | padGetButtonMaskArgs |
| struct | padSetButtonInfoArgs |
| struct | padSetButtonInfoResult |
| struct | padInfoActArgs |
| struct | padActDirAlignArgs |
| char | buffer [128] |
Pad library functions Quite easy rev engineered from util demos.. Find any bugs? Mail me: pukko.nosp@m.@hom.nosp@m.e.se
Definition in file libpad.c.
| int padEnd | ( | void | ) |
Ends all pad communication Note: PADMAN from release 1.3.4 does not have padPortInit implemented. As a result, it is impossible to reinitialize libpad after calling padEnd(). This was known as padClose in the really early official SDK releases.
| int padEnterPressMode | ( | int | port, |
| int | slot ) |
| int padExitPressMode | ( | int | port, |
| int | slot ) |
| int padGetConnection | ( | int | port, |
| int | slot ) |
| int padGetModVersion | ( | ) |
| int padGetPortMax | ( | void | ) |
| unsigned char padGetReqState | ( | int | port, |
| int | slot ) |
| int padGetSlotMax | ( | int | port | ) |
| int padGetState | ( | int | port, |
| int | slot ) |
| unsigned char padInfoAct | ( | int | port, |
| int | slot, | ||
| int | actuator, | ||
| int | cmd ) |
| int padInfoMode | ( | int | port, |
| int | slot, | ||
| int | infoMode, | ||
| int | index ) |
| int padInfoPressMode | ( | int | port, |
| int | slot ) |
| int padInit | ( | int | mode | ) |
| int padPortClose | ( | int | port, |
| int | slot ) |
| int padPortInit | ( | int | mode | ) |
Initialise pad ports. Automatically called by padInit(), there is no need to call this function directly.
| mode | Must be set to 0. |
Note: PADMAN from release 1.3.4 does not have this function implemented. As a result, it is impossible to reinitialize libpad after calling padEnd().
| int padPortOpen | ( | int | port, |
| int | slot, | ||
| void * | padArea ) |
| port | Port to open |
| slot | Slot to open |
| padArea | The 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. For the old libpad, at least 16-bytes alignment. |
| unsigned char padRead | ( | int | port, |
| int | slot, | ||
| struct padButtonStatus * | data ) |
| int padSetActAlign | ( | int | port, |
| int | slot, | ||
| const char | actAlign[6] ) |
| int padSetActDirect | ( | int | port, |
| int | slot, | ||
| const char | actAlign[6] ) |
| int padSetButtonInfo | ( | int | port, |
| int | slot, | ||
| int | buttonInfo ) |
| int padSetMainMode | ( | int | port, |
| int | slot, | ||
| int | mode, | ||
| int | lock ) |
| int padSetReqState | ( | int | port, |
| int | slot, | ||
| int | state ) |