WPADGetDataFormat

Syntax

#include <cafe/pads/wpad/wpad.h>
#include <cafe/pads/wpad/wpadBalance.h>
#include <cafe/pads/wpad/wpadGuitar.h>
#include <cafe/pads/wpad/wpadDrum.h>
#include <cafe/pads/wpad/wpadTaiko.h>
#include <cafe/pads/wpad/wpadTrain.h>

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

#define WPAD_FMT_CORE                  0
#define WPAD_FMT_CORE_ACC              1
#define WPAD_FMT_CORE_ACC_DPD          2
#define WPAD_FMT_FREESTYLE             3
#define WPAD_FMT_FREESTYLE_ACC         4
#define WPAD_FMT_FREESTYLE_ACC_DPD     5
#define WPAD_FMT_CLASSIC               6
#define WPAD_FMT_CLASSIC_ACC           7
#define WPAD_FMT_CLASSIC_ACC_DPD       8
#define WPAD_FMT_CORE_ACC_DPD_FULL     9
#define WPAD_FMT_TRAIN                10
#define WPAD_FMT_GUITAR               11
#define WPAD_FMT_BALANCE_CHECKER      12
#define WPAD_FMT_DRUM                 15
#define WPAD_FMT_MPLS                 16
#define WPAD_FMT_TAIKO                17

u32 WPADGetDataFormat( s32 chan );

Parameters

chan One of the WPAD_CHANn values.

Return Values

One of the WPAD_FMT_* values.

Received data formats are defined with the macro constants shown below.

WPAD_FMT_CORE Wii remote data format (WPADStatus structure). Only button information is valid.
NOTE:
Wii remote default.
WPAD_FMT_CORE_ACC Wii remote data format (WPADStatus structure). The button and motion sensor information is valid.
WPAD_FMT_CORE_ACC_DPD Wii remote data format (WPADStatus structure). The button, motion sensor, and pointer information is valid. The pointer has valid size and coordinate data.
WPAD_FMT_FREESTYLE Nunchuk Style data format (WPADFSStatus structure). Only the button information is valid for the Wii remote.
WPAD_FMT_FREESTYLE_ACC Nunchuk Style data format (WPADFSStatus structure). The button and Motion Sensor information is valid for the Wii remote.
WPAD_FMT_FREESTYLE_ACC_DPD Nunchuk Style data format (WPADFSStatus structure). The Wii remote button, Motion Sensor, and Pointer information is valid. However, only the coordinate data is valid for the Pointer.
WPAD_FMT_CLASSIC Classic Style data format (WPADCLStatus structure). Only the button information is valid for the Wii remote.
WPAD_FMT_CLASSIC_ACC Classic Style data format (WPADCLStatus structure). The button and Motion Sensor information is valid for the Wii remote.
WPAD_FMT_CLASSIC_ACC_DPD Classic Style data format (WPADCLStatus structure). The Wii remote button, Motion Sensor, and Pointer information is valid. However, only the coordinate data is valid for the Pointer.
WPAD_FMT_CORE_ACC_DPD_FULL Wii remote extended data format (WPADStatusEx structure). The Wii remote button, Motion Sensor, and Pointer information is valid. For the pointer, the coordinates data, size, object radius, pixel value, and range are valid. However, the data rate is half that of normal (roughly 100 samples per second).
WPAD_FMT_TRAIN Wii remote + Master Controller data format (WPADTRStatus structure). Only Wii remote buttons are enabled.
WPAD_FMT_GUITAR Wii remote + Guitar controller data format (WPADCLStatus structure). For the Wii remote, the button, Motion Sensor, and Pointer information is valid. However, only the coordinate data is valid for the pointer.
WPAD_FMT_DRUM Wii remote + Drum Controller data format (WPADCLStatus structure). The Wii remote button, Motion Sensor, and Pointer information is valid. However, the coordinate data is only valid for the Pointer.
WPAD_FMT_TAIKO Wii remote + Taiko Drum Controller data format (WPADCLStatus structure). The Wii remote button, Motion Sensor, and Pointer information is valid. However, the coordinate data is only valid for the Pointer.
WPAD_FMT_BALANCE_CHECKER Wii Balance Board data format (WPADBLStatus structure).
NOTE:
Wii Balance Board default.
WPAD_FMT_MPLS Wii MotionPlus data format (WPADMPStatus structure). The Wii remote button, Motion Sensor, and Pointer information is valid. However, the coordinate data is only valid for the Pointer. Use this format when the format is either the MotionPlus Style or the Nunchuk/MotionPlus Style. When the format is the Nunchuk/MotionPlus Style, the sampling rates for the Wii MotionPlus and the Nunchuk are half the normal rates.

Description

Obtains the data format of the received data on the specified channel. By default, the Wii remote data format (WPAD_FMT_CORE) is used for the Wii remote, and the Wii Balance Board data format (WPAD_FMT_BALANCE_CHECKER) is used for the Wii Balance Board.

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

WPADSetDataFormat
WPADStatus

Revision History

2014/03/06 Fixed incorrect links.
2013/05/08 Automated cleanup pass.
2008/12/26 Added WPAD_FMT_TAIKO.
2008/12/19 Added WPAD_FMT_DRUM.
2008/09/30 Explained the Wii MotionPlus.
2008/04/16 Added to the description of the master controller, guitar controller, and Wii Balance Board. Deleted the WPADFSStatus, WPADCLStatus, and WPADStatusEx structures from See Also.
2006/08/15 Added the extended data format.
2006/06/19 Renamed the external extension controller and added a data format.
2005/10/27 Changed layout.
2005/10/20 Initial version.


CONFIDENTIAL