|
PS2SDK
PS2 Homebrew Libraries
|
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | padButtonStatus |
Functions | |
| struct padButtonStatus | __attribute__ ((packed)) |
| 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) |
Pad externals
Definition in file libpad.h.
| struct padButtonStatus |
| int padInit | ( | int | mode | ) |
| 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 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 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. |
| int padPortClose | ( | int | port, |
| int | slot | ||
| ) |
| unsigned char padRead | ( | int | port, |
| int | slot, | ||
| struct padButtonStatus * | data | ||
| ) |
Read pad data
| port | Port number of the pad to get the status for. |
| slot | Slot number of the pad to get the status for. |
| data | A pointer to a 32 byte array where the result is stored |
Definition at line 612 of file libpad.c.
Referenced by pad_get_buttons().
| int padGetState | ( | int | port, |
| int | slot | ||
| ) |
Get current pad state Wait until state == 6 (Ready) before trying to access the pad
Definition at line 645 of file libpad.c.
Referenced by pad_get_state().
| unsigned char padGetReqState | ( | int | port, |
| int | slot | ||
| ) |
| int padSetReqState | ( | int | port, |
| int | slot, | ||
| int | state | ||
| ) |
| int padGetPortMax | ( | void | ) |
| int padGetSlotMax | ( | int | port | ) |
| int padGetModVersion | ( | ) |
| int padInfoMode | ( | int | port, |
| int | slot, | ||
| int | infoMode, | ||
| int | index | ||
| ) |
Get pad info (digital (4), dualshock (7), etc..)
Definition at line 805 of file libpad.c.
Referenced by pad_get_num_modes(), and pad_get_type().
| int padSetMainMode | ( | int | port, |
| int | slot, | ||
| int | mode, | ||
| int | lock | ||
| ) |
| int padInfoPressMode | ( | int | port, |
| int | slot | ||
| ) |
Check if the pad has pressure sensitive buttons
Definition at line 897 of file libpad.c.
Referenced by pad_set_sensitivity().
| int padEnterPressMode | ( | int | port, |
| int | slot | ||
| ) |
Pressure sensitive mode ON
Definition at line 903 of file libpad.c.
Referenced by pad_set_sensitivity().
| int padExitPressMode | ( | int | port, |
| int | slot | ||
| ) |
Check for newer version Pressure sensitive mode OFF
Definition at line 909 of file libpad.c.
Referenced by pad_set_sensitivity().
| 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] | ||
| ) |
Set actuator status on dual shock controller, act_align[0] = 0/1 turns off/on 'small' engine act_align[1] = 0-255 sets 'big' engine speed
Definition at line 1056 of file libpad.c.
Referenced by pad_set_actuators().
| int padGetConnection | ( | int | port, |
| int | slot | ||
| ) |