SSBM Decomp
Loading...
Searching...
No Matches
pad.h File Reference
#include <dolphin/types.h>

Go to the source code of this file.

Data Structures

struct  PADStatus

Macros

#define PAD_SPEC_0   0
#define PAD_SPEC_1   1
#define PAD_SPEC_2   2
#define PAD_SPEC_3   3
#define PAD_SPEC_4   4
#define PAD_SPEC_5   5
#define PAD_MOTOR_STOP   0
#define PAD_MOTOR_RUMBLE   1
#define PAD_MOTOR_STOP_HARD   2
#define PAD_CHAN0_BIT   0x80000000
#define PAD_CHAN1_BIT   0x40000000
#define PAD_CHAN2_BIT   0x20000000
#define PAD_CHAN3_BIT   0x10000000
#define PAD_MAX_CONTROLLERS   4
#define PAD_BUTTON_LEFT   (1 << 0)
#define PAD_BUTTON_RIGHT   (1 << 1)
#define PAD_BUTTON_DOWN   (1 << 2)
#define PAD_BUTTON_UP   (1 << 3)
#define PAD_TRIGGER_Z   (1 << 4)
#define PAD_TRIGGER_R   (1 << 5)
#define PAD_TRIGGER_L   (1 << 6)
#define PAD_BUTTON_A   (1 << 8)
#define PAD_BUTTON_B   (1 << 9)
#define PAD_BUTTON_X   (1 << 10)
#define PAD_BUTTON_Y   (1 << 11)
#define PAD_BUTTON_MENU   (1 << 12)
#define PAD_BUTTON_START   (1 << 12)
#define PAD_STICK_UP   (1 << 16)
#define PAD_STICK_DOWN   (1 << 17)
#define PAD_STICK_LEFT   (1 << 18)
#define PAD_STICK_RIGHT   (1 << 19)
#define PAD_SUBSTICK_UP   (1 << 20)
#define PAD_SUBSTICK_DOWN   (1 << 21)
#define PAD_SUBSTICK_LEFT   (1 << 22)
#define PAD_SUBSTICK_RIGHT   (1 << 23)
#define PAD_TRIGGER_LR   (1 << 31)
#define PAD_CONFIRM   (1ULL << 32)
#define PAD_CANCEL   (1ULL << 33)
#define PAD_LR_START   (1ULL << 34)
#define PAD_LRA_START   (1ULL << 35)
#define PAD_ANY_UP   (1ULL << 36)
#define PAD_ANY_DOWN   (1ULL << 37)
#define PAD_ANY_LEFT   (1ULL << 38)
#define PAD_ANY_RIGHT   (1ULL << 39)
#define PAD_ERR_NONE   0
#define PAD_ERR_NO_CONTROLLER   -1
#define PAD_ERR_NOT_READY   -2
#define PAD_ERR_TRANSFER   -3
#define RES_WIRELESS_LITE   0x40000

Functions

int PADReset (unsigned long mask)
BOOL PADRecalibrate (u32 mask)
BOOL PADInit ()
u32 PADRead (struct PADStatus *status)
void PADSetSamplingRate (unsigned long msec)
void __PADTestSamplingRate (unsigned long tvmode)
void PADControlAllMotors (const u32 *commandArray)
void PADControlMotor (s32 chan, u32 command)
void PADSetSpec (u32 spec)
unsigned long PADGetSpec ()
int PADGetType (long chan, unsigned long *type)
BOOL PADSync (void)
void PADSetAnalogMode (u32 mode)
BOOL __PADDisableRecalibration (int arg0)
void SIRefreshSamplingRate (void)
void PADClamp (PADStatus *status)

Macro Definition Documentation

◆ PAD_SPEC_0

#define PAD_SPEC_0   0

◆ PAD_SPEC_1

#define PAD_SPEC_1   1

◆ PAD_SPEC_2

#define PAD_SPEC_2   2

◆ PAD_SPEC_3

#define PAD_SPEC_3   3

◆ PAD_SPEC_4

#define PAD_SPEC_4   4

◆ PAD_SPEC_5

#define PAD_SPEC_5   5

◆ PAD_MOTOR_STOP

#define PAD_MOTOR_STOP   0

◆ PAD_MOTOR_RUMBLE

#define PAD_MOTOR_RUMBLE   1

◆ PAD_MOTOR_STOP_HARD

#define PAD_MOTOR_STOP_HARD   2

◆ PAD_CHAN0_BIT

#define PAD_CHAN0_BIT   0x80000000

◆ PAD_CHAN1_BIT

#define PAD_CHAN1_BIT   0x40000000

◆ PAD_CHAN2_BIT

#define PAD_CHAN2_BIT   0x20000000

◆ PAD_CHAN3_BIT

#define PAD_CHAN3_BIT   0x10000000

◆ PAD_MAX_CONTROLLERS

#define PAD_MAX_CONTROLLERS   4

◆ PAD_BUTTON_LEFT

#define PAD_BUTTON_LEFT   (1 << 0)

◆ PAD_BUTTON_RIGHT

#define PAD_BUTTON_RIGHT   (1 << 1)

◆ PAD_BUTTON_DOWN

#define PAD_BUTTON_DOWN   (1 << 2)

◆ PAD_BUTTON_UP

#define PAD_BUTTON_UP   (1 << 3)

◆ PAD_TRIGGER_Z

#define PAD_TRIGGER_Z   (1 << 4)

◆ PAD_TRIGGER_R

#define PAD_TRIGGER_R   (1 << 5)

◆ PAD_TRIGGER_L

#define PAD_TRIGGER_L   (1 << 6)

◆ PAD_BUTTON_A

#define PAD_BUTTON_A   (1 << 8)

◆ PAD_BUTTON_B

#define PAD_BUTTON_B   (1 << 9)

◆ PAD_BUTTON_X

#define PAD_BUTTON_X   (1 << 10)

◆ PAD_BUTTON_Y

#define PAD_BUTTON_Y   (1 << 11)

◆ PAD_BUTTON_MENU

#define PAD_BUTTON_MENU   (1 << 12)

◆ PAD_BUTTON_START

#define PAD_BUTTON_START   (1 << 12)

◆ PAD_STICK_UP

#define PAD_STICK_UP   (1 << 16)

◆ PAD_STICK_DOWN

#define PAD_STICK_DOWN   (1 << 17)

◆ PAD_STICK_LEFT

#define PAD_STICK_LEFT   (1 << 18)

◆ PAD_STICK_RIGHT

#define PAD_STICK_RIGHT   (1 << 19)

◆ PAD_SUBSTICK_UP

#define PAD_SUBSTICK_UP   (1 << 20)

◆ PAD_SUBSTICK_DOWN

#define PAD_SUBSTICK_DOWN   (1 << 21)

◆ PAD_SUBSTICK_LEFT

#define PAD_SUBSTICK_LEFT   (1 << 22)

◆ PAD_SUBSTICK_RIGHT

#define PAD_SUBSTICK_RIGHT   (1 << 23)

◆ PAD_TRIGGER_LR

#define PAD_TRIGGER_LR   (1 << 31)

◆ PAD_CONFIRM

#define PAD_CONFIRM   (1ULL << 32)

◆ PAD_CANCEL

#define PAD_CANCEL   (1ULL << 33)

◆ PAD_LR_START

#define PAD_LR_START   (1ULL << 34)

◆ PAD_LRA_START

#define PAD_LRA_START   (1ULL << 35)

◆ PAD_ANY_UP

#define PAD_ANY_UP   (1ULL << 36)

◆ PAD_ANY_DOWN

#define PAD_ANY_DOWN   (1ULL << 37)

◆ PAD_ANY_LEFT

#define PAD_ANY_LEFT   (1ULL << 38)

◆ PAD_ANY_RIGHT

#define PAD_ANY_RIGHT   (1ULL << 39)

◆ PAD_ERR_NONE

#define PAD_ERR_NONE   0

◆ PAD_ERR_NO_CONTROLLER

#define PAD_ERR_NO_CONTROLLER   -1

◆ PAD_ERR_NOT_READY

#define PAD_ERR_NOT_READY   -2

◆ PAD_ERR_TRANSFER

#define PAD_ERR_TRANSFER   -3

◆ RES_WIRELESS_LITE

#define RES_WIRELESS_LITE   0x40000

Function Documentation

◆ PADReset()

int PADReset ( unsigned long mask)

◆ PADRecalibrate()

BOOL PADRecalibrate ( u32 mask)

◆ PADInit()

BOOL PADInit ( )

◆ PADRead()

u32 PADRead ( struct PADStatus * status)

◆ PADSetSamplingRate()

void PADSetSamplingRate ( unsigned long msec)

◆ __PADTestSamplingRate()

void __PADTestSamplingRate ( unsigned long tvmode)

◆ PADControlAllMotors()

void PADControlAllMotors ( const u32 * commandArray)

◆ PADControlMotor()

void PADControlMotor ( s32 chan,
u32 command )

◆ PADSetSpec()

void PADSetSpec ( u32 spec)

◆ PADGetSpec()

unsigned long PADGetSpec ( )

◆ PADGetType()

int PADGetType ( long chan,
unsigned long * type )

◆ PADSync()

BOOL PADSync ( void )

◆ PADSetAnalogMode()

void PADSetAnalogMode ( u32 mode)

◆ __PADDisableRecalibration()

BOOL __PADDisableRecalibration ( int arg0)

◆ SIRefreshSamplingRate()

void SIRefreshSamplingRate ( void )

◆ PADClamp()

void PADClamp ( PADStatus * status)