PSPSDK 2024-10-31
Loading...
Searching...
No Matches
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

◆ sceCtrlGetButtonMask

#define sceCtrlGetButtonMask   sceCtrl_driver_5E77BC8A

◆ sceCtrlRegisterButtonCallback

#define sceCtrlRegisterButtonCallback   sceCtrl_driver_5C56C779

◆ sceCtrlSetButtonMasks

#define sceCtrlSetButtonMasks   sceCtrl_driver_7CA723DC

Function Documentation

◆ sceCtrl_driver_5C56C779()

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

◆ sceCtrl_driver_5E77BC8A()

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

◆ sceCtrl_driver_7CA723DC()

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
void sceCtrl_driver_7CA723DC(unsigned int mask, unsigned type)
Set the controller button masks.