WPADRead

Syntax

#include <cafe/pads/wpad/wpad.h>

#define WPAD_CHAN0               0
#define WPAD_CHAN1               1
#define WPAD_CHAN2               2
#define WPAD_CHAN3               3

void WPADRead( s32 chan, void *status );

Parameters

chan One of the WPAD_CHANn values.
status Pointer to the WPADStatus structure. This structure must correspond to the data format specified by the WPADSetDataFormat function. If the status of the Wii remote is valid, the err member holds WPAD_ERR_NONE; otherwise it holds another error status.

Return Values

None.

Description

Obtains the most recent status of the Wii remote on the specified channel. This can be used together with the WPADSetAutoSamplingBuf function. This function can be called when the WPADProbe function returns anything other than WPAD_ERR_NO_CONTROLLER.

Prohibition processing takes place in the WPAD library for the +Control Pad on both the Wii remote and the Classic Controller. If Left and Right are both input at the same time, the library recognizes it as Left, and if Up and Down are both input at the same time, the library recognizes it as Up.

Do Not Call From

Background Do not call this function from the background.
Interrupt handler Do not call this function from any interrupt handler.
Exception handler Do not call this function from any exception handler.
Multiple Cores Do not call this function from more than one Core.

See Also

WPADSetAutoSamplingBuf
WPADProbe
WPADStatus

Revision History

2013/05/08 Automated cleanup pass.
2008/05/29 Added a description of prohibition processing for the +Control Pad.
2008/04/16 Deleted the WPADFSStatus, WPADCLStatus, and WPADStatusEx structures from See Also.
2008/03/21 Added an explanation of WPADProbe.
2005/10/20 Changed API specs.
2005/08/01 Initial version.


CONFIDENTIAL