pspsdk-1.0+beta2
pspctrl_kernel.h File Reference

Go to the source code of this file.

Macros

#define sceCtrlSetButtonMasks   sceCtrl_driver_7CA723DC
#define sceCtrlGetButtonMask   sceCtrl_driver_5E77BC8A
#define sceCtrlRegisterButtonCallback   sceCtrl_driver_5C56C779

Functions

void sceCtrl_driver_7CA723DC (unsigned int mask, unsigned type)
 Set the controller button masks.
int sceCtrl_driver_5E77BC8A (unsigned int mask)
 Get button mask mode.
int sceCtrl_driver_5C56C779 (int no, unsigned int mask, void(*cb)(int, int, void *), void *arg)
 Setup a controller callback.

Macro Definition Documentation

#define sceCtrlGetButtonMask   sceCtrl_driver_5E77BC8A
#define sceCtrlRegisterButtonCallback   sceCtrl_driver_5C56C779
#define sceCtrlSetButtonMasks   sceCtrl_driver_7CA723DC

Function Documentation

int sceCtrl_driver_5C56C779 ( int  no,
unsigned int  mask,
void(*)(int, int, void *)  cb,
void *  arg 
)

Setup a controller callback.

Parameters
no- The number of the callback (0-3)
mask- The bits to check for
cb- The callback function (int curr_but, int last_but, void *arg)
arg- User defined argument passed
Returns
0 on success, < 0 on error
int sceCtrl_driver_5E77BC8A ( unsigned int  mask)

Get button mask mode.

Parameters
mask- The bitmask to check
Returns
0 no setting, 1 set in button mask, 2 set in button set
void sceCtrl_driver_7CA723DC ( unsigned int  mask,
unsigned  type 
)

Set the controller button masks.

Parameters
mask- The bits to setup
type- The type of operation (0 clear, 1 set mask, 2 set button)
Example:
sceCtrl_driver_7CA723DC(0xFFFF, 1); // Mask lower 16bits
sceCtrl_driver_7CA723DC(0x10000, 2); // Always return HOME key
// Do something
sceCtrl_driver_7CA723DC(0x10000, 0); // Unset HOME key
sceCtrl_driver_7CA723DC(0xFFFF, 0); // Unset mask