psl1ght
A free SDK for Sony's PS3 console
|
PS3 pad/controller management. More...
#include <ppu-types.h>
Go to the source code of this file.
Data Structures | |
struct | _pad_info |
Pad info data structure (old format). More... | |
struct | _pad_info2 |
Pad info data structure (new format). More... | |
struct | _pad_data |
Pad data data structure. All 1-bit button fields are zero when inctive, and 1 when active. More... | |
struct | _pad_capability_info |
Pad capability information data structure. All 1-bit values are 1 when the capability is present, 0 otherwise. More... | |
struct | _pad_act_param |
Pad action parameters data structure. More... | |
struct | _pad_periph_info |
Pad peripheral information data structure. More... | |
struct | _pad_periph_data |
Pad peripheral data data structure. More... | |
Macros | |
#define | MAX_PADS (127) |
#define | MAX_PAD_CODES (64) |
#define | MAX_PORT_NUM (7) |
#define | MAX_PAD_CAPABILITY_INFO (32) |
#define | MAX_PAD_ACTUATOR (2) |
#define | PAD_TYPE_STANDARD (0) |
#define | PAD_TYPE_REMOTE (4) |
#define | PAD_TYPE_LDD (5) |
Typedefs | |
typedef struct _pad_info | padInfo |
Pad info data structure (old format). | |
typedef struct _pad_info2 | padInfo2 |
Pad info data structure (new format). | |
typedef struct _pad_data | padData |
Pad data data structure. All 1-bit button fields are zero when inctive, and 1 when active. | |
typedef struct _pad_capability_info | padCapabilityInfo |
Pad capability information data structure. All 1-bit values are 1 when the capability is present, 0 otherwise. | |
typedef struct _pad_act_param | padActParam |
Pad action parameters data structure. | |
typedef struct _pad_periph_info | padPeriphInfo |
Pad peripheral information data structure. | |
typedef struct _pad_periph_data | padPeriphData |
Pad peripheral data data structure. | |
typedef enum _io_pad_bd_code | ioPadBdCode |
BD remote button codes. | |
Enumerations | |
enum | _io_pad_bd_code { BTN_BD_KEY_1 = 0x00, BTN_BD_KEY_2 = 0x01, BTN_BD_KEY_3 = 0x02, BTN_BD_KEY_4 = 0x03, BTN_BD_KEY_5 = 0x04, BTN_BD_KEY_6 = 0x05, BTN_BD_KEY_7 = 0x06, BTN_BD_KEY_8 = 0x07, BTN_BD_KEY_9 = 0x08, BTN_BD_KEY_0 = 0x09, BTN_BD_ENTER = 0x0b, BTN_BD_RETURN = 0x0e, BTN_BD_CLEAR = 0x0f, BTN_BD_EJECT = 0x16, BTN_BD_TOPMENU = 0x1a, BTN_BD_TIME = 0x28, BTN_BD_PREV = 0x30, BTN_BD_NEXT = 0x31, BTN_BD_PLAY = 0x32, BTN_BD_SCAN_REV = 0x33, BTN_BD_SCAN_FWD = 0x34, BTN_BD_STOP = 0x38, BTN_BD_PAUSE = 0x39, BTN_BD_POPUP_MENU = 0x40, BTN_BD_SELECT = 0x50, BTN_BD_L3 = 0x51, BTN_BD_R3 = 0x52, BTN_BD_START = 0x53, BTN_BD_UP = 0x54, BTN_BD_RIGHT = 0x55, BTN_BD_DOWN = 0x56, BTN_BD_LEFT = 0x57, BTN_BD_L2 = 0x58, BTN_BD_R2 = 0x59, BTN_BD_L1 = 0x5a, BTN_BD_R1 = 0x5b, BTN_BD_TRIANGLE = 0x5c, BTN_BD_CIRCLE = 0x5d, BTN_BD_CROSS = 0x5e, BTN_BD_SQUARE = 0x5f, BTN_BD_SLOW_REV = 0x60, BTN_BD_SLOW_FWD = 0x61, BTN_BD_SUBTITLE = 0x63, BTN_BD_AUDIO = 0x64, BTN_BD_ANGLE = 0x65, BTN_BD_DISPLAY = 0x70, BTN_BD_BLUE = 0x80, BTN_BD_RED = 0x81, BTN_BD_GREEN = 0x82, BTN_BD_YELLOW = 0x83, BTN_BD_RELEASE = 0xff, BTN_BD_NUMBER_11 = 0x101e, BTN_BD_NUMBER_12 = 0x101f, BTN_BD_NUMBER_PERIOD = 0x102a, BTN_BD_PROGRAM_UP = 0x1030, BTN_BD_PROGRAM_DOWN = 0x1031, BTN_BD_PREV_CHANNEL = 0x1032, BTN_BD_PROGRAM_GUIDE = 0x1053 } |
BD remote button codes. | |
Functions | |
s32 | ioPadInit (u32 max) |
Initialize Pad IO management. More... | |
s32 | ioPadEnd () |
End of Pad IO management. More... | |
s32 | ioPadGetInfo (padInfo *info) |
Get pad information. More... | |
s32 | ioPadClearBuf (u32 port) |
Clear pad buffer. More... | |
s32 | ioPadGetCapabilityInfo (u32 port, padCapabilityInfo *capabilities) |
Get pad capability information. More... | |
s32 | ioPadGetData (u32 port, padData *data) |
Get pad data. More... | |
s32 | ioPadGetDataExtra (u32 port, u32 *type, padData *data) |
Get pad data. More... | |
s32 | ioPadInfoPressMode (u32 port) |
Get pad press mode. More... | |
s32 | ioPadSetPressMode (u32 port, u32 mode) |
Set pad press mode. More... | |
s32 | ioPadInfoSensorMode (u32 port) |
Get pad sensor mode. More... | |
s32 | ioPadSetSensorMode (u32 port, u32 mode) |
Set pad sensor mode. More... | |
u32 | ioPadSetActDirect (u32 port, padActParam *actParam) |
Set pad action (rumble) data. More... | |
u32 | ioPadLddDataInsert (s32 handle, padData *data) |
Insert pad data into virtual pad. More... | |
s32 | ioPadLddGetPortNo (s32 handle) |
Get port number from registered virtual pad handle. More... | |
s32 | ioPadLddRegisterController () |
Register a new virtual pad. More... | |
s32 | ioPadLddUnregisterController (s32 handle) |
Unregister a virtual pad. More... | |
s32 | ioPadGetInfo2 (padInfo2 *info) |
Get pad information (new format). More... | |
s32 | ioPadPeriphGetInfo (padPeriphInfo *periphInfo) |
Get pad peripheral information. More... | |
s32 | ioPadPeriphGetData (u32 port, padPeriphData *periphData) |
Get pad peripheral data. More... | |
s32 | ioPadSetPortSetting (u32 port, u32 setting) |
Set pad port setting. More... | |
PS3 pad/controller management.
#define MAX_PAD_ACTUATOR (2) |
controller vibrator actuator
#define MAX_PAD_CAPABILITY_INFO (32) |
controller capability information
#define MAX_PAD_CODES (64) |
maximum controller buttons
#define MAX_PADS (127) |
maximum controllers
#define MAX_PORT_NUM (7) |
controller port number
#define PAD_TYPE_LDD (5) |
Custom Controller
#define PAD_TYPE_REMOTE (4) |
BD Remote Controller
#define PAD_TYPE_STANDARD (0) |
standard controller
s32 ioPadClearBuf | ( | u32 | port | ) |
Clear pad buffer.
port | Pad port. |
s32 ioPadEnd | ( | ) |
End of Pad IO management.
s32 ioPadGetCapabilityInfo | ( | u32 | port, |
padCapabilityInfo * | capabilities | ||
) |
Get pad capability information.
port | Pad port. |
capabilities | Pointer to the pad capability information structure. |
s32 ioPadGetData | ( | u32 | port, |
padData * | data | ||
) |
Get pad data.
port | Pad port. |
data | Pointer to the pad data structure. |
s32 ioPadGetDataExtra | ( | u32 | port, |
u32 * | type, | ||
padData * | data | ||
) |
Get pad data.
port | Pad port. |
type | Pointer to the device type. |
data | Pointer to the pad data structure. |
s32 ioPadGetInfo | ( | padInfo * | info | ) |
Get pad information.
info | Pointer to the pad info structure. |
s32 ioPadGetInfo2 | ( | padInfo2 * | info | ) |
Get pad information (new format).
info | Pointer to the pad info structure. |
s32 ioPadInfoPressMode | ( | u32 | port | ) |
Get pad press mode.
port | Pad port. |
s32 ioPadInfoSensorMode | ( | u32 | port | ) |
Get pad sensor mode.
port | Pad port. |
s32 ioPadInit | ( | u32 | max | ) |
Initialize Pad IO management.
max | maximum number of supported pads. |
u32 ioPadLddDataInsert | ( | s32 | handle, |
padData * | data | ||
) |
Insert pad data into virtual pad.
handle | The registered handle for the virtual pad. |
padData | Pointer to the pad data value. |
s32 ioPadLddGetPortNo | ( | s32 | handle | ) |
Get port number from registered virtual pad handle.
handle | The registered handle for the virtual pad. |
s32 ioPadLddRegisterController | ( | ) |
Register a new virtual pad.
s32 ioPadLddUnregisterController | ( | s32 | handle | ) |
Unregister a virtual pad.
handle | The registered handle for the virtual pad. |
s32 ioPadPeriphGetData | ( | u32 | port, |
padPeriphData * | periphData | ||
) |
Get pad peripheral data.
port | Pad port. |
periphData | Pointer to the pad peripheral data structure. |
s32 ioPadPeriphGetInfo | ( | padPeriphInfo * | periphInfo | ) |
Get pad peripheral information.
periphInfo | Pointer to the pad peripheral info structure. |
u32 ioPadSetActDirect | ( | u32 | port, |
padActParam * | actParam | ||
) |
Set pad action (rumble) data.
port | Pad port. |
actParam | Pointer to the action data structure. |
s32 ioPadSetPortSetting | ( | u32 | port, |
u32 | setting | ||
) |
Set pad port setting.
port | Pad port. |
setting | Setting value. |
s32 ioPadSetPressMode | ( | u32 | port, |
u32 | mode | ||
) |
Set pad press mode.
port | Pad port. |
mode | The selected press mode. |
s32 ioPadSetSensorMode | ( | u32 | port, |
u32 | mode | ||
) |
Set pad sensor mode.
port | Pad port. |
mode | The selected sensor mode. |