Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Pad.c File Reference

Classes

struct  XY
 

Typedefs

typedef void(* SPECCallback) (s32, PADStatus *, u32 *)
 
typedef struct XY XY
 

Functions

static void PADTypeAndStatusCallback (s32 chan, u32 type)
 
static u16 GetWirelessID (s32 chan)
 
static void SetWirelessID (s32 chan, u16 id)
 
static void DoReset ()
 
static void PADEnable (s32 chan)
 
static void ProbeWireless (s32 chan)
 
static void PADProbeCallback (s32 chan, u32 error, OSContext *context)
 
static void PADDisable (s32 chan)
 
static void UpdateOrigin (s32 chan)
 
static void PADOriginCallback (s32 chan, u32 error, OSContext *context)
 
static void PADFixCallback (s32 unused, u32 error, struct OSContext *context)
 
static void PADResetCallback (s32 unused, u32 error, struct OSContext *context)
 
static void PADReceiveCheckCallback (s32 chan, u32 error)
 
static void SPEC0_MakeStatus (s32 chan, PADStatus *status, u32 data[2])
 
static void SPEC1_MakeStatus (s32 chan, PADStatus *status, u32 data[2])
 
static s8 ClampS8 (s8 var, s8 org)
 
static u8 ClampU8 (u8 var, u8 org)
 
static void SPEC2_MakeStatus (s32 chan, PADStatus *status, u32 data[2])
 
static BOOL OnReset (BOOL f)
 
void __PADDisableXPatch (void)
 
BOOL __PADDisableRumble (BOOL disable)
 
static void PADOriginUpdateCallback (s32 chan, u32 error, OSContext *context)
 
int PADReset (u32 mask)
 
BOOL PADRecalibrate (u32 mask)
 
BOOL PADInit ()
 
u32 PADRead (PADStatus *status)
 
void PADSetSamplingRate (u32 msec)
 
void __PADTestSamplingRate (u32 tvmode)
 
void PADControlAllMotors (const u32 *commandArray)
 
void PADControlMotor (s32 chan, u32 command)
 
void PADSetSpec (u32 spec)
 
u32 PADGetSpec (void)
 
int PADGetType (s32 chan, u32 *type)
 
BOOL PADSync (void)
 
void PADSetAnalogMode (u32 mode)
 
static void SamplingHandler (__OSInterrupt interrupt, OSContext *context)
 
PADSamplingCallback PADSetSamplingCallback (PADSamplingCallback callback)
 
BOOL __PADDisableRecalibration (BOOL disable)
 
BOOL PADIsBarrel (s32 chan)
 

Variables

const char * __PADVersion = "<< Dolphin SDK - PAD\tdebug build: Apr 5 2004 03:56:05 (0x2301) >>"
 
static s32 ResettingChan = 0x20
 
static u32 XPatchBits = PAD_CHAN0_BIT | PAD_CHAN1_BIT | PAD_CHAN2_BIT | PAD_CHAN3_BIT
 
static u32 AnalogMode = 0x300
 
static u32 Spec = PAD_SPEC_5
 
static BOOL Initialized
 
static u32 EnabledBits
 
static u32 ResettingBits
 
static u32 RecalibrateBits
 
static u32 WaitingBits
 
static u32 CheckingBits
 
static u32 PendingBits
 
static u32 BarrelBits
 
static u32 Type [4]
 
static PADStatus Origin [4]
 
u32 __PADSpec
 
static SPECCallback MakeStatus = SPEC2_MakeStatus
 
static u32 CmdTypeAndStatus
 
static u32 CmdReadOrigin = 0x41000000
 
static u32 CmdCalibrate = 0x42000000
 
static u32 CmdProbeDevice [4]
 
static OSResetFunctionInfo ResetFunctionInfo
 
static void(* SamplingCallback )()
 

Typedef Documentation

◆ SPECCallback

typedef void(* SPECCallback) (s32, PADStatus *, u32 *)

◆ XY

typedef struct XY XY

Function Documentation

◆ __PADDisableRecalibration()

BOOL __PADDisableRecalibration ( BOOL disable)

◆ __PADDisableRumble()

BOOL __PADDisableRumble ( BOOL disable)

◆ __PADDisableXPatch()

void __PADDisableXPatch ( void )

◆ __PADTestSamplingRate()

void __PADTestSamplingRate ( u32 tvmode)

◆ ClampS8()

static s8 ClampS8 ( s8 var,
s8 org )
static

◆ ClampU8()

static u8 ClampU8 ( u8 var,
u8 org )
static

◆ DoReset()

static void DoReset ( )
static

◆ GetWirelessID()

static u16 GetWirelessID ( s32 chan)
static

◆ OnReset()

static BOOL OnReset ( BOOL f)
static

◆ PADControlAllMotors()

void PADControlAllMotors ( const u32 * commandArray)

◆ PADControlMotor()

void PADControlMotor ( s32 chan,
u32 command )

◆ PADDisable()

static void PADDisable ( s32 chan)
static

◆ PADEnable()

static void PADEnable ( s32 chan)
static

◆ PADFixCallback()

static void PADFixCallback ( s32 unused,
u32 error,
struct OSContext * context )
static

◆ PADGetSpec()

u32 PADGetSpec ( void )

◆ PADGetType()

int PADGetType ( s32 chan,
u32 * type )

◆ PADInit()

BOOL PADInit ( )

◆ PADIsBarrel()

BOOL PADIsBarrel ( s32 chan)

◆ PADOriginCallback()

static void PADOriginCallback ( s32 chan,
u32 error,
OSContext * context )
static

◆ PADOriginUpdateCallback()

static void PADOriginUpdateCallback ( s32 chan,
u32 error,
OSContext * context )
static

◆ PADProbeCallback()

static void PADProbeCallback ( s32 chan,
u32 error,
OSContext * context )
static

◆ PADRead()

u32 PADRead ( PADStatus * status)

◆ PADRecalibrate()

BOOL PADRecalibrate ( u32 mask)

◆ PADReceiveCheckCallback()

static void PADReceiveCheckCallback ( s32 chan,
u32 error )
static

◆ PADReset()

int PADReset ( u32 mask)

◆ PADResetCallback()

static void PADResetCallback ( s32 unused,
u32 error,
struct OSContext * context )
static

◆ PADSetAnalogMode()

void PADSetAnalogMode ( u32 mode)

◆ PADSetSamplingCallback()

PADSamplingCallback PADSetSamplingCallback ( PADSamplingCallback callback)

◆ PADSetSamplingRate()

void PADSetSamplingRate ( u32 msec)

◆ PADSetSpec()

void PADSetSpec ( u32 spec)

◆ PADSync()

BOOL PADSync ( void )

◆ PADTypeAndStatusCallback()

static void PADTypeAndStatusCallback ( s32 chan,
u32 type )
static

◆ ProbeWireless()

static void ProbeWireless ( s32 chan)
static

◆ SamplingHandler()

static void SamplingHandler ( __OSInterrupt interrupt,
OSContext * context )
static

◆ SetWirelessID()

static void SetWirelessID ( s32 chan,
u16 id )
static

◆ SPEC0_MakeStatus()

static void SPEC0_MakeStatus ( s32 chan,
PADStatus * status,
u32 data[2] )
static

◆ SPEC1_MakeStatus()

static void SPEC1_MakeStatus ( s32 chan,
PADStatus * status,
u32 data[2] )
static

◆ SPEC2_MakeStatus()

static void SPEC2_MakeStatus ( s32 chan,
PADStatus * status,
u32 data[2] )
static

◆ UpdateOrigin()

static void UpdateOrigin ( s32 chan)
static

Variable Documentation

◆ __PADSpec

u32 __PADSpec

◆ __PADVersion

const char * __PADVersion = "<< Dolphin SDK - PAD\tdebug build: Apr 5 2004 03:56:05 (0x2301) >>"

◆ AnalogMode

u32 AnalogMode = 0x300
static

◆ BarrelBits

u32 BarrelBits
static

◆ CheckingBits

u32 CheckingBits
static

◆ CmdCalibrate

u32 CmdCalibrate = 0x42000000
static

◆ CmdProbeDevice

u32 CmdProbeDevice[4]
static

◆ CmdReadOrigin

u32 CmdReadOrigin = 0x41000000
static

◆ CmdTypeAndStatus

u32 CmdTypeAndStatus
static

◆ EnabledBits

u32 EnabledBits
static

◆ Initialized

BOOL Initialized
static

◆ MakeStatus

SPECCallback MakeStatus = SPEC2_MakeStatus
static

◆ Origin

PADStatus Origin[4]
static

◆ PendingBits

u32 PendingBits
static

◆ RecalibrateBits

u32 RecalibrateBits
static

◆ ResetFunctionInfo

OSResetFunctionInfo ResetFunctionInfo
static
Initial value:
= {
127,
NULL,
NULL,
}
static BOOL OnReset(BOOL f)
Definition Pad.c:752

◆ ResettingBits

u32 ResettingBits
static

◆ ResettingChan

s32 ResettingChan = 0x20
static

◆ SamplingCallback

void(* SamplingCallback) () ( )
static

◆ Spec

u32 Spec = PAD_SPEC_5
static

◆ Type

u32 Type[4]
static

◆ WaitingBits

u32 WaitingBits
static

◆ XPatchBits

u32 XPatchBits = PAD_CHAN0_BIT | PAD_CHAN1_BIT | PAD_CHAN2_BIT | PAD_CHAN3_BIT
static