PADRead

C Specification

#include <revolution/pad.h>
#define PAD_CHAN0_BIT           0x80000000
#define PAD_CHAN1_BIT           0x40000000
#define PAD_CHAN2_BIT           0x20000000
#define PAD_CHAN3_BIT           0x10000000
u32 PADRead(PADStatus* status);

Arguments

status Array[PAD_MAX_CONTROLLERS] of PADStatus to be filled in.
Each err member will hold PAD_ERR_NONE if the pad status is valid. Otherwise it holds another error status. If PADRead is called at a rate faster than the rate specified by SISetSamplingRate, then only the first PADRead will return a valid input value. The following PADRead returns PAD_ERR_TRANSFER until the next break.

Return Values

An OR bit mask of the controllers that support rumble motors (PAD_CHANn_BIT).

Description

Checks the state of controllers. It takes an array of four PADStatus data as an argument. It gets the state of all pads at once.

See Also

Controller Functions, PADButtonDown, PADButtonUp, PADClamp, PADInit,  PADStatus

Revision History

03/01/2006 Initial version.