RetroArch
Classes | Macros | Typedefs | Functions
pad.h File Reference
#include <gctypes.h>
Include dependency graph for pad.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _padstatus
 

Macros

#define PAD_CHAN0   0
 
#define PAD_CHAN1   1
 
#define PAD_CHAN2   2
 
#define PAD_CHAN3   3
 
#define PAD_CHANMAX   4
 
#define PAD_MOTOR_STOP   0
 
#define PAD_MOTOR_RUMBLE   1
 
#define PAD_MOTOR_STOP_HARD   2
 
#define PAD_ERR_NONE   0
 
#define PAD_ERR_NO_CONTROLLER   -1
 
#define PAD_ERR_NOT_READY   -2
 
#define PAD_ERR_TRANSFER   -3
 
#define PAD_BUTTON_LEFT   0x0001
 
#define PAD_BUTTON_RIGHT   0x0002
 
#define PAD_BUTTON_DOWN   0x0004
 
#define PAD_BUTTON_UP   0x0008
 
#define PAD_TRIGGER_Z   0x0010
 
#define PAD_TRIGGER_R   0x0020
 
#define PAD_TRIGGER_L   0x0040
 
#define PAD_BUTTON_A   0x0100
 
#define PAD_BUTTON_B   0x0200
 
#define PAD_BUTTON_X   0x0400
 
#define PAD_BUTTON_Y   0x0800
 
#define PAD_BUTTON_MENU   0x1000
 
#define PAD_BUTTON_START   0x1000
 
#define PAD_CHAN0_BIT   0x80000000
 
#define PAD_CHAN1_BIT   0x40000000
 
#define PAD_CHAN2_BIT   0x20000000
 
#define PAD_CHAN3_BIT   0x10000000
 

Typedefs

typedef struct _padstatus PADStatus
 
typedef void(* sampling_callback) (void)
 

Functions

u32 PAD_Init ()
 
u32 PAD_Sync ()
 
u32 PAD_Read (PADStatus *status)
 
u32 PAD_Reset (u32 mask)
 
u32 PAD_Recalibrate (u32 mask)
 
void PAD_Clamp (PADStatus *status)
 
void PAD_ControlMotor (s32 chan, u32 cmd)
 
void PAD_SetSpec (u32 spec)
 
u32 PAD_ScanPads ()
 
u16 PAD_ButtonsUp (int pad)
 
u16 PAD_ButtonsDown (int pad)
 
u16 PAD_ButtonsHeld (int pad)
 
s8 PAD_SubStickX (int pad)
 
s8 PAD_SubStickY (int pad)
 
s8 PAD_StickX (int pad)
 
s8 PAD_StickY (int pad)
 
u8 PAD_TriggerL (int pad)
 
u8 PAD_TriggerR (int pad)
 
sampling_callback PAD_SetSamplingCallback (sampling_callback cb)
 

Macro Definition Documentation

◆ PAD_BUTTON_A

#define PAD_BUTTON_A   0x0100

◆ PAD_BUTTON_B

#define PAD_BUTTON_B   0x0200

◆ PAD_BUTTON_DOWN

#define PAD_BUTTON_DOWN   0x0004

◆ PAD_BUTTON_LEFT

#define PAD_BUTTON_LEFT   0x0001

◆ PAD_BUTTON_MENU

#define PAD_BUTTON_MENU   0x1000

◆ PAD_BUTTON_RIGHT

#define PAD_BUTTON_RIGHT   0x0002

◆ PAD_BUTTON_START

#define PAD_BUTTON_START   0x1000

◆ PAD_BUTTON_UP

#define PAD_BUTTON_UP   0x0008

◆ PAD_BUTTON_X

#define PAD_BUTTON_X   0x0400

◆ PAD_BUTTON_Y

#define PAD_BUTTON_Y   0x0800

◆ PAD_CHAN0

#define PAD_CHAN0   0

◆ PAD_CHAN0_BIT

#define PAD_CHAN0_BIT   0x80000000

◆ PAD_CHAN1

#define PAD_CHAN1   1

◆ PAD_CHAN1_BIT

#define PAD_CHAN1_BIT   0x40000000

◆ PAD_CHAN2

#define PAD_CHAN2   2

◆ PAD_CHAN2_BIT

#define PAD_CHAN2_BIT   0x20000000

◆ PAD_CHAN3

#define PAD_CHAN3   3

◆ PAD_CHAN3_BIT

#define PAD_CHAN3_BIT   0x10000000

◆ PAD_CHANMAX

#define PAD_CHANMAX   4

◆ PAD_ERR_NO_CONTROLLER

#define PAD_ERR_NO_CONTROLLER   -1

◆ PAD_ERR_NONE

#define PAD_ERR_NONE   0

◆ PAD_ERR_NOT_READY

#define PAD_ERR_NOT_READY   -2

◆ PAD_ERR_TRANSFER

#define PAD_ERR_TRANSFER   -3

◆ PAD_MOTOR_RUMBLE

#define PAD_MOTOR_RUMBLE   1

◆ PAD_MOTOR_STOP

#define PAD_MOTOR_STOP   0

◆ PAD_MOTOR_STOP_HARD

#define PAD_MOTOR_STOP_HARD   2

◆ PAD_TRIGGER_L

#define PAD_TRIGGER_L   0x0040

◆ PAD_TRIGGER_R

#define PAD_TRIGGER_R   0x0020

◆ PAD_TRIGGER_Z

#define PAD_TRIGGER_Z   0x0010

Typedef Documentation

◆ PADStatus

typedef struct _padstatus PADStatus

◆ sampling_callback

typedef void(* sampling_callback) (void)

Function Documentation

◆ PAD_ButtonsDown()

u16 PAD_ButtonsDown ( int  pad)
Here is the caller graph for this function:

◆ PAD_ButtonsHeld()

u16 PAD_ButtonsHeld ( int  pad)
Here is the caller graph for this function:

◆ PAD_ButtonsUp()

u16 PAD_ButtonsUp ( int  pad)

◆ PAD_Clamp()

void PAD_Clamp ( PADStatus status)
Here is the call graph for this function:

◆ PAD_ControlMotor()

void PAD_ControlMotor ( s32  chan,
u32  cmd 
)
Here is the call graph for this function:

◆ PAD_Init()

u32 PAD_Init ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PAD_Read()

u32 PAD_Read ( PADStatus status)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PAD_Recalibrate()

u32 PAD_Recalibrate ( u32  mask)
Here is the caller graph for this function:

◆ PAD_Reset()

u32 PAD_Reset ( u32  mask)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PAD_ScanPads()

u32 PAD_ScanPads ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PAD_SetSamplingCallback()

sampling_callback PAD_SetSamplingCallback ( sampling_callback  cb)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PAD_SetSpec()

void PAD_SetSpec ( u32  spec)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PAD_StickX()

s8 PAD_StickX ( int  pad)
Here is the caller graph for this function:

◆ PAD_StickY()

s8 PAD_StickY ( int  pad)
Here is the caller graph for this function:

◆ PAD_SubStickX()

s8 PAD_SubStickX ( int  pad)
Here is the caller graph for this function:

◆ PAD_SubStickY()

s8 PAD_SubStickY ( int  pad)
Here is the caller graph for this function:

◆ PAD_Sync()

u32 PAD_Sync ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PAD_TriggerL()

u8 PAD_TriggerL ( int  pad)
Here is the caller graph for this function:

◆ PAD_TriggerR()

u8 PAD_TriggerR ( int  pad)
Here is the caller graph for this function: