PADReset

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
BOOL PADReset(u32 mask);

Arguments

mask OR bit mask for the controller to be reset.

Return Values

TRUE if reset sequence is successfully started. Otherwise, FALSE.

PADReset may return FALSE if the controller port interface was busy performing other processes. In that case, PADReset should be called repeatedly until PADRead detects a return other than an error. Note that if PADRead is called immediately after the PADRecalibrate succeeds, the returned PADStatus of the specified ports may contain an error code, either PAD_ERR_NOT_READY or PAD_ERR_TRANSFER.

Description

This function resets a specific controller. This function returns FALSE if the controller port interface is busy carrying out another process. If this happens, PADReset must be called again until PADRead detects something other than the PAD_ERR_NO_CONTROLLER error code.

See Also

Controller Functions, PADButtonDown, PADButtonUp, PADInit, PADRead, PADStatus

Revision History

03/01/2006 Initial version.