Controller Kernel Library


Data Structures

struct  SceCtrlData
 Returned controller data. More...
struct  SceCtrlLatch

Enumerations

enum  PspCtrlButtons {
  PSP_CTRL_SELECT = 0x000001, PSP_CTRL_START = 0x000008, PSP_CTRL_UP = 0x000010, PSP_CTRL_RIGHT = 0x000020,
  PSP_CTRL_DOWN = 0x000040, PSP_CTRL_LEFT = 0x000080, PSP_CTRL_LTRIGGER = 0x000100, PSP_CTRL_RTRIGGER = 0x000200,
  PSP_CTRL_TRIANGLE = 0x001000, PSP_CTRL_CIRCLE = 0x002000, PSP_CTRL_CROSS = 0x004000, PSP_CTRL_SQUARE = 0x008000,
  PSP_CTRL_HOME = 0x010000, PSP_CTRL_HOLD = 0x020000, PSP_CTRL_NOTE = 0x800000, PSP_CTRL_SCREEN = 0x400000,
  PSP_CTRL_VOLUP = 0x100000, PSP_CTRL_VOLDOWN = 0x200000, PSP_CTRL_WLAN_UP = 0x040000, PSP_CTRL_REMOTE = 0x080000,
  PSP_CTRL_DISC = 0x1000000, PSP_CTRL_MS = 0x2000000
}
 Enumeration for the digital controller buttons. More...
enum  PspCtrlMode { PSP_CTRL_MODE_DIGITAL = 0, PSP_CTRL_MODE_ANALOG }
 Controller mode. More...

Functions

int sceCtrlSetSamplingCycle (int cycle)
 Set the controller cycle setting.
int sceCtrlGetSamplingCycle (int *pcycle)
 Get the controller current cycle setting.
int sceCtrlSetSamplingMode (int mode)
 Set the controller mode.
int sceCtrlGetSamplingMode (int *pmode)
 Get the current controller mode.
int sceCtrlPeekBufferPositive (SceCtrlData *pad_data, int count)
int sceCtrlPeekBufferNegative (SceCtrlData *pad_data, int count)
int sceCtrlReadBufferPositive (SceCtrlData *pad_data, int count)
 Read buffer positive.
int sceCtrlReadBufferNegative (SceCtrlData *pad_data, int count)
int sceCtrlPeekLatch (SceCtrlLatch *latch_data)
int sceCtrlReadLatch (SceCtrlLatch *latch_data)


Enumeration Type Documentation

enum PspCtrlButtons

Enumeration for the digital controller buttons.

Note:
PSP_CTRL_NOTE, PSP_CTRL_SCREEN, PSP_CTRL_VOLUP, PSP_CTRL_VOLDOWN, PSP_CTRL_DISC, PSP_CTRL_WLAN_UP, PSP_CTRL_REMOTE, PSP_CTRL_MS can only be read in kernel mode
Enumerator:
PSP_CTRL_SELECT  Select button.

PSP_CTRL_START  Start button.

PSP_CTRL_UP  Up D-Pad button.

PSP_CTRL_RIGHT  Right D-Pad button.

PSP_CTRL_DOWN  Down D-Pad button.

PSP_CTRL_LEFT  Left D-Pad button.

PSP_CTRL_LTRIGGER  Left trigger.

PSP_CTRL_RTRIGGER  Right trigger.

PSP_CTRL_TRIANGLE  Triangle button.

PSP_CTRL_CIRCLE  Circle button.

PSP_CTRL_CROSS  Cross button.

PSP_CTRL_SQUARE  Square button.

PSP_CTRL_HOME  Home button.

PSP_CTRL_HOLD  Hold button.

PSP_CTRL_NOTE  Music Note button.

PSP_CTRL_SCREEN  Screen button.

PSP_CTRL_VOLUP  Volume up button.

PSP_CTRL_VOLDOWN  Volume down button.

PSP_CTRL_WLAN_UP  Wlan switch up.

PSP_CTRL_REMOTE  Remote hold position.

PSP_CTRL_DISC  Disc present.

PSP_CTRL_MS  Memory stick present.

enum PspCtrlMode

Controller mode.

Enumerator:
PSP_CTRL_MODE_DIGITAL 
PSP_CTRL_MODE_ANALOG 


Function Documentation

int sceCtrlGetSamplingCycle ( int *  pcycle  ) 

Get the controller current cycle setting.

Parameters:
pcycle - Return value.
Returns:
0.

int sceCtrlGetSamplingMode ( int *  pmode  ) 

Get the current controller mode.

Parameters:
pmode - Return value.
Returns:
0.

int sceCtrlPeekBufferNegative ( SceCtrlData pad_data,
int  count 
)

int sceCtrlPeekBufferPositive ( SceCtrlData pad_data,
int  count 
)

int sceCtrlPeekLatch ( SceCtrlLatch latch_data  ) 

int sceCtrlReadBufferNegative ( SceCtrlData pad_data,
int  count 
)

int sceCtrlReadBufferPositive ( SceCtrlData pad_data,
int  count 
)

Read buffer positive.

Example:
 SceCtrlData pad;

 sceCtrlSetSamplingCycle(0);
 sceCtrlSetSamplingMode(1);
 sceCtrlReadBufferPositive(&pad, 1);
 // Do something with the read controller data
Parameters:
pad_data - Pointer to a SceCtrlData structure used hold the returned pad data.
count - Number of SceCtrlData buffers to read.

int sceCtrlReadLatch ( SceCtrlLatch latch_data  ) 

int sceCtrlSetSamplingCycle ( int  cycle  ) 

Set the controller cycle setting.

Parameters:
cycle - Cycle. Normally set to 0.
Returns:
The previous cycle setting.

int sceCtrlSetSamplingMode ( int  mode  ) 

Set the controller mode.

Parameters:
mode - One of PspCtrlMode.
Returns:
The previous mode.


Generated on Tue Jul 24 15:21:27 2007 for PSPSDK-Rev2272 by  doxygen 1.5.2