ps2gamelite library
v0.1
Communicate with PlayStation 2 controller(s) and return buttonandjoystickdata.
|
Communicate with PlayStation 2 controller(s) and return button and joystick data. More...
#include "simpletools.h"
Go to the source code of this file.
Data Structures | |
struct | ps2game_st |
Typedefs | |
typedef struct ps2game_st | ps2game_t |
Functions | |
ps2game_t * | ps2game_open (int dat, int cmd, int att, int clk) |
Open a ps2game device. | |
void | ps2game_close (ps2game_t *device) |
Close a ps2game device, and recover cog, and memory. | |
int | ps2game_status (ps2game_t *device) |
Check connection status. | |
int | ps2game_square (ps2game_t *device) |
Check square button. | |
int | ps2game_cross (ps2game_t *device) |
Check cross button. | |
int | ps2game_circle (ps2game_t *device) |
Check circle button. | |
int | ps2game_triangle (ps2game_t *device) |
Check triangle button. | |
int | ps2game_1R (ps2game_t *device) |
Check upper-right-front button. | |
int | ps2game_1L (ps2game_t *device) |
Check upper-left-front button. | |
int | ps2game_2R (ps2game_t *device) |
Check lower-right-front button. | |
int | ps2game_2L (ps2game_t *device) |
Check lower-left-front button. | |
int | ps2game_left (ps2game_t *device) |
Check left arrow button. | |
int | ps2game_backward (ps2game_t *device) |
Check backward arrow button. | |
int | ps2game_right (ps2game_t *device) |
Check right arrow button. | |
int | ps2game_forward (ps2game_t *device) |
Check forward arrow button. | |
int | ps2game_start (ps2game_t *device) |
Check start button. | |
int | ps2game_select (ps2game_t *device) |
Check select button. | |
int | ps2game_joyPressL (ps2game_t *device) |
Check left joystick button. | |
int | ps2game_joyPressR (ps2game_t *device) |
Check right joystick button. | |
int | ps2game_joyLX (ps2game_t *device) |
Check left joystick x-axis. | |
int | ps2game_joyLY (ps2game_t *device) |
Check left joystick y-axis. | |
int | ps2game_joyRX (ps2game_t *device) |
Check right joystick x-axis. | |
int | ps2game_joyRY (ps2game_t *device) |
Check right joystick y-axis. |
Communicate with PlayStation 2 controller(s) and return button and joystick data.
int ps2game_1L | ( | ps2game_t * | device | ) |
Check upper-left-front button.
*device | process ID returned by ps2game_open. |
int ps2game_1R | ( | ps2game_t * | device | ) |
Check upper-right-front button.
*device | process ID returned by ps2game_open. |
int ps2game_2L | ( | ps2game_t * | device | ) |
Check lower-left-front button.
*device | process ID returned by ps2game_open. |
int ps2game_2R | ( | ps2game_t * | device | ) |
Check lower-right-front button.
*device | process ID returned by ps2game_open. |
int ps2game_backward | ( | ps2game_t * | device | ) |
Check backward arrow button.
*device | process ID returned by ps2game_open. |
int ps2game_circle | ( | ps2game_t * | device | ) |
Check circle button.
*device | process ID returned by ps2game_open. |
void ps2game_close | ( | ps2game_t * | device | ) |
Close a ps2game device, and recover cog, and memory.
*device | process ID returned by ps2game_open. |
int ps2game_cross | ( | ps2game_t * | device | ) |
Check cross button.
*device | process ID returned by ps2game_open. |
int ps2game_forward | ( | ps2game_t * | device | ) |
Check forward arrow button.
*device | process ID returned by ps2game_open. |
int ps2game_joyLX | ( | ps2game_t * | device | ) |
Check left joystick x-axis.
*device | process ID returned by ps2game_open. |
int ps2game_joyLY | ( | ps2game_t * | device | ) |
Check left joystick y-axis.
*device | process ID returned by ps2game_open. |
int ps2game_joyPressL | ( | ps2game_t * | device | ) |
Check left joystick button.
*device | process ID returned by ps2game_open. |
int ps2game_joyPressR | ( | ps2game_t * | device | ) |
Check right joystick button.
*device | process ID returned by ps2game_open. |
int ps2game_joyRX | ( | ps2game_t * | device | ) |
Check right joystick x-axis.
*device | process ID returned by ps2game_open. |
int ps2game_joyRY | ( | ps2game_t * | device | ) |
Check right joystick y-axis.
*device | process ID returned by ps2game_open. |
int ps2game_left | ( | ps2game_t * | device | ) |
Check left arrow button.
*device | process ID returned by ps2game_open. |
ps2game_t* ps2game_open | ( | int | dat, |
int | cmd, | ||
int | att, | ||
int | clk | ||
) |
Open a ps2game device.
dat | number of pin connected to dat line. |
cmd | number of pin connected to cmd line. |
att | number of pin connected to att line. |
clk | number of pin connected to clk line. |
int ps2game_right | ( | ps2game_t * | device | ) |
Check right arrow button.
*device | process ID returned by ps2game_open. |
int ps2game_select | ( | ps2game_t * | device | ) |
Check select button.
*device | process ID returned by ps2game_open. |
int ps2game_square | ( | ps2game_t * | device | ) |
Check square button.
*device | process ID returned by ps2game_open. |
int ps2game_start | ( | ps2game_t * | device | ) |
Check start button.
*device | process ID returned by ps2game_open. |
int ps2game_status | ( | ps2game_t * | device | ) |
Check connection status.
*device | process ID returned by ps2game_open. |
int ps2game_triangle | ( | ps2game_t * | device | ) |
Check triangle button.
*device | process ID returned by ps2game_open. |