wut  v1.7.0
Wii U Toolchain
Data Structures | Typedefs | Enumerations | Functions

WPAD is a low-level library under KPAD. More...

Collaboration diagram for WPAD:

Data Structures

struct  WPADVec2D
 2D vector. More...
 
struct  WPADStatusProController
 
struct  WPADInfo
 Controller status info. More...
 
struct  WPADiQueueElement
 
struct  WPADiQueue
 
struct  WPADAddress
 Bluetooth device address. More...
 

Typedefs

typedef struct WPADStatusProController WPADStatusProController
 
typedef struct WPADVec2D WPADVec2D
 
typedef struct WPADInfo WPADInfo
 
typedef struct WPADAddress WPADAddress
 
typedef struct WPADiQueueElement WPADiQueueElement
 
typedef struct WPADiQueue WPADiQueue
 
typedef enum WPADChan WPADChan
 Wii Remote channel. More...
 
typedef enum WPADDataFormat WPADDataFormat
 Data format. More...
 
typedef enum WPADExtensionType WPADExtensionType
 Extension type. More...
 
typedef enum WPADButton WPADButton
 Wii Remote buttons. More...
 
typedef enum WPADNunchukButton WPADNunchukButton
 Nunchuk buttons. More...
 
typedef enum WPADClassicButton WPADClassicButton
 Classic Controller buttons. More...
 
typedef enum WPADProButton WPADProButton
 Pro Controller buttons. More...
 
typedef enum WPADLed WPADLed
 WPAD Led flags. More...
 
typedef enum WPADDpdFormat WPADDpdFormat
 WPAD Infrared Format. For more information see IR Data Formats More...
 
typedef enum WPADSpeakerCmd WPADSpeakerCmd
 WPAD Speaker Command. More...
 
typedef enum WPADMplsMode WPADMplsMode
 MotionPlus Mode. More...
 
typedef enum WPADPeripheralSpace WPADPeripheralSpace
 WPAD Peripheral Memory Space Prefixes. More...
 
typedef void(* WPADIsMplsAttachedCallback) (WPADChan chan, int32_t status)
 
typedef void(* WPADControlLedCallback) (WPADChan chan, int32_t status)
 
typedef void(* WPADControlDpdCallback) (WPADChan chan, int32_t status)
 
typedef void(* WPADControlSpeakerCallback) (WPADChan chan, int32_t status)
 
typedef void(* WPADGetInfoCallback) (WPADChan chan, int32_t status)
 
typedef void(* WPADReadMemoryCallback) (WPADChan chan, int32_t status)
 Callback called when data is attempted to be read from controller memory. More...
 
typedef void(* WPADWriteMemoryCallback) (WPADChan chan, int32_t status)
 Callback called when data is attempted to be written to controller memory. More...
 
typedef void(* WPADSamplingCallback) (WPADChan chan)
 
typedef void(* WPADExtensionCallback) (WPADChan chan, WPADExtensionType ext)
 Callback called when the active extension changes. More...
 
typedef void(* WPADConnectCallback) (WPADChan chan, int32_t status)
 Callback called when a controller connects or disconnects. More...
 
typedef void(* WPADiSendCallback) (WPADChan chan, int32_t status)
 
typedef void(* WPADiWriteGameDataCallback) (WPADChan chan, int32_t status)
 Callback called when WPADiWriteGameData completes,. More...
 

Enumerations

enum  WPADChan {
  WPAD_CHAN_0 = 0 ,
  WPAD_CHAN_1 = 1 ,
  WPAD_CHAN_2 = 2 ,
  WPAD_CHAN_3 = 3 ,
  WPAD_CHAN_4 = 4 ,
  WPAD_CHAN_5 = 5 ,
  WPAD_CHAN_6 = 6
}
 Wii Remote channel. More...
 
enum  WPADDataFormat {
  WPAD_FMT_CORE = 0 ,
  WPAD_FMT_CORE_ACC = 1 ,
  WPAD_FMT_CORE_ACC_DPD = 2 ,
  WPAD_FMT_NUNCHUK = 3 ,
  WPAD_FMT_NUNCHUK_ACC = 4 ,
  WPAD_FMT_NUNCHUK_ACC_DPD = 5 ,
  WPAD_FMT_CLASSIC = 6 ,
  WPAD_FMT_CLASSIC_ACC = 7 ,
  WPAD_FMT_CLASSIC_ACC_DPD = 8 ,
  WPAD_FMT_CORE_ACC_DPD_FULL = 9 ,
  WPAD_FMT_TRAIN = 10 ,
  WPAD_FMT_GUITAR = 11 ,
  WPAD_FMT_BALANCE_BOARD = 12 ,
  WPAD_FMT_DRUM = 15 ,
  WPAD_FMT_MPLUS = 16 ,
  WPAD_FMT_TAIKO = 17 ,
  WPAD_FMT_PRO_CONTROLLER = 22
}
 Data format. More...
 
enum  WPADExtensionType {
  WPAD_EXT_CORE = 0 ,
  WPAD_EXT_NUNCHUK = 1 ,
  WPAD_EXT_CLASSIC = 2 ,
  WPAD_EXT_MPLUS = 5 ,
  WPAD_EXT_MPLUS_NUNCHUK = 6 ,
  WPAD_EXT_MPLUS_CLASSIC = 7 ,
  WPAD_EXT_PRO_CONTROLLER = 31 ,
  WPAD_EXT_DEV_NOT_FOUND = 253 ,
  WPAD_EXT_UNKNOWN = 255
}
 Extension type. More...
 
enum  WPADButton {
  WPAD_BUTTON_LEFT = 0x0001 ,
  WPAD_BUTTON_RIGHT = 0x0002 ,
  WPAD_BUTTON_DOWN = 0x0004 ,
  WPAD_BUTTON_UP = 0x0008 ,
  WPAD_BUTTON_PLUS = 0x0010 ,
  WPAD_BUTTON_2 = 0x0100 ,
  WPAD_BUTTON_1 = 0x0200 ,
  WPAD_BUTTON_B = 0x0400 ,
  WPAD_BUTTON_A = 0x0800 ,
  WPAD_BUTTON_MINUS = 0x1000 ,
  WPAD_BUTTON_Z = 0x2000 ,
  WPAD_BUTTON_C = 0x4000 ,
  WPAD_BUTTON_HOME = 0x8000
}
 Wii Remote buttons. More...
 
enum  WPADNunchukButton {
  WPAD_NUNCHUK_STICK_EMULATION_LEFT = 0x0001 ,
  WPAD_NUNCHUK_STICK_EMULATION_RIGHT = 0x0002 ,
  WPAD_NUNCHUK_STICK_EMULATION_DOWN = 0x0004 ,
  WPAD_NUNCHUK_STICK_EMULATION_UP = 0x0008 ,
  WPAD_NUNCHUK_BUTTON_Z = 0x2000 ,
  WPAD_NUNCHUK_BUTTON_C = 0x4000
}
 Nunchuk buttons. More...
 
enum  WPADClassicButton {
  WPAD_CLASSIC_BUTTON_UP = 0x00000001 ,
  WPAD_CLASSIC_BUTTON_LEFT = 0x00000002 ,
  WPAD_CLASSIC_BUTTON_ZR = 0x00000004 ,
  WPAD_CLASSIC_BUTTON_X = 0x00000008 ,
  WPAD_CLASSIC_BUTTON_A = 0x00000010 ,
  WPAD_CLASSIC_BUTTON_Y = 0x00000020 ,
  WPAD_CLASSIC_BUTTON_B = 0x00000040 ,
  WPAD_CLASSIC_BUTTON_ZL = 0x00000080 ,
  WPAD_CLASSIC_BUTTON_R = 0x00000200 ,
  WPAD_CLASSIC_BUTTON_PLUS = 0x00000400 ,
  WPAD_CLASSIC_BUTTON_HOME = 0x00000800 ,
  WPAD_CLASSIC_BUTTON_MINUS = 0x00001000 ,
  WPAD_CLASSIC_BUTTON_L = 0x00002000 ,
  WPAD_CLASSIC_BUTTON_DOWN = 0x00004000 ,
  WPAD_CLASSIC_BUTTON_RIGHT = 0x00008000 ,
  WPAD_CLASSIC_STICK_L_EMULATION_LEFT = 0x00010000 ,
  WPAD_CLASSIC_STICK_L_EMULATION_RIGHT = 0x00020000 ,
  WPAD_CLASSIC_STICK_L_EMULATION_DOWN = 0x00040000 ,
  WPAD_CLASSIC_STICK_L_EMULATION_UP = 0x00080000 ,
  WPAD_CLASSIC_STICK_R_EMULATION_LEFT = 0x00100000 ,
  WPAD_CLASSIC_STICK_R_EMULATION_RIGHT = 0x00200000 ,
  WPAD_CLASSIC_STICK_R_EMULATION_DOWN = 0x00400000 ,
  WPAD_CLASSIC_STICK_R_EMULATION_UP = 0x00800000
}
 Classic Controller buttons. More...
 
enum  WPADProButton {
  WPAD_PRO_BUTTON_UP = 0x00000001 ,
  WPAD_PRO_BUTTON_LEFT = 0x00000002 ,
  WPAD_PRO_TRIGGER_ZR = 0x00000004 ,
  WPAD_PRO_BUTTON_X = 0x00000008 ,
  WPAD_PRO_BUTTON_A = 0x00000010 ,
  WPAD_PRO_BUTTON_Y = 0x00000020 ,
  WPAD_PRO_BUTTON_B = 0x00000040 ,
  WPAD_PRO_TRIGGER_ZL = 0x00000080 ,
  WPAD_PRO_RESERVED = 0x00000100 ,
  WPAD_PRO_TRIGGER_R = 0x00000200 ,
  WPAD_PRO_BUTTON_PLUS = 0x00000400 ,
  WPAD_PRO_BUTTON_HOME = 0x00000800 ,
  WPAD_PRO_BUTTON_MINUS = 0x00001000 ,
  WPAD_PRO_TRIGGER_L = 0x00002000 ,
  WPAD_PRO_BUTTON_DOWN = 0x00004000 ,
  WPAD_PRO_BUTTON_RIGHT = 0x00008000 ,
  WPAD_PRO_BUTTON_STICK_R = 0x00010000 ,
  WPAD_PRO_BUTTON_STICK_L = 0x00020000 ,
  WPAD_PRO_STICK_L_EMULATION_UP = 0x00200000 ,
  WPAD_PRO_STICK_L_EMULATION_DOWN = 0x00100000 ,
  WPAD_PRO_STICK_L_EMULATION_LEFT = 0x00040000 ,
  WPAD_PRO_STICK_L_EMULATION_RIGHT = 0x00080000 ,
  WPAD_PRO_STICK_R_EMULATION_UP = 0x02000000 ,
  WPAD_PRO_STICK_R_EMULATION_DOWN = 0x01000000 ,
  WPAD_PRO_STICK_R_EMULATION_LEFT = 0x00400000 ,
  WPAD_PRO_STICK_R_EMULATION_RIGHT = 0x00800000
}
 Pro Controller buttons. More...
 
enum  WPADLed {
  WPAD_LED_ONE = 0x01 ,
  WPAD_LED_TWO = 0x02 ,
  WPAD_LED_THREE = 0x04 ,
  WPAD_LED_FOUR = 0x08
}
 WPAD Led flags. More...
 
enum  WPADDpdFormat {
  WPAD_DPD_FMT_NONE = 0 ,
  WPAD_DPD_FMT_BASIC = 1 ,
  WPAD_DPD_FMT_EXTENDED = 3 ,
  WPAD_DPD_FMT_FULL = 5
}
 WPAD Infrared Format. For more information see IR Data Formats More...
 
enum  WPADSpeakerCmd {
  WPAD_SPEAKER_CMD_OFF = 0 ,
  WPAD_SPEAKER_CMD_ON = 1 ,
  WPAD_SPEAKER_CMD_MUTE = 2 ,
  WPAD_SPEAKER_CMD_UNMUTE = 3 ,
  WPAD_SPEAKER_CMD_PLAY = 4 ,
  WPAD_SPEAKER_CMD_ON_ALT = 5
}
 WPAD Speaker Command. More...
 
enum  WPADMplsMode {
  WPAD_MPLS_MODE_DISABLE = 0 ,
  WPAD_MPLS_MODE_MPLS_ONLY = 4 ,
  WPAD_MPLS_MODE_MPLS_NUNCHUK = 5 ,
  WPAD_MPLS_MODE_MPLS_CLASSIC = 7
}
 MotionPlus Mode. More...
 
enum  WPADPeripheralSpace {
  WPAD_PERIPHERAL_SPACE_SPEAKER = 0xA2 ,
  WPAD_PERIPHERAL_SPACE_EXTENSION = 0xA4 ,
  WPAD_PERIPHERAL_SPACE_MOTIONPLUS = 0xA6 ,
  WPAD_PERIPHERAL_SPACE_DPD = 0xB0
}
 WPAD Peripheral Memory Space Prefixes. More...
 

Functions

 WUT_ENUM_BITMASK_TYPE (WPADLed)
 
void WPADInit ()
 Initialises the WPAD library for use. More...
 
void WPADShutdown ()
 Cleans up and frees the WPAD library. More...
 
void WPADDisconnect (WPADChan chan)
 Immediately disconnects the associated controller. More...
 
int32_t WPADProbe (WPADChan chan, WPADExtensionType *outExtensionType)
 Identifies the extension connected to the associated controller. More...
 
int32_t WPADSetDataFormat (WPADChan chan, WPADDataFormat format)
 Sets the data format of the controller, can be used to reduce or increase the amount of data received. More...
 
WPADDataFormat WPADGetDataFormat (WPADChan chan)
 Gets the data format in use by the controller. More...
 
void WPADRead (WPADChan chan, void *data)
 
int32_t WPADControlLed (WPADChan channel, WPADLed led, WPADControlLedCallback callback)
 Controls the associated WPADChan's LEDs. More...
 
int32_t WPADControlDpd (WPADChan channel, WPADDpdFormat mode, WPADControlDpdCallback callback)
 Controls the WPADChan's IR sensor. More...
 
WPADDpdFormat WPADGetDpdFormat (WPADChan chan)
 Returns the associated controller's IR mode. More...
 
void WPADControlMotor (WPADChan chan, BOOL motorEnabled)
 Controls the associated WPADChan's rumble motor. More...
 
int32_t WPADControlSpeaker (WPADChan chan, WPADSpeakerCmd mode, WPADControlSpeakerCallback)
 Sets the wiimote speaker mode. More...
 
BOOL WPADIsSpeakerEnabled (WPADChan chan)
 Returns whether the wiimote's speaker is enabled. More...
 
BOOL WPADCanSendStreamData (WPADChan chan)
 Returns whether it is possible to send data to the wiimote's speaker at this moment May return false if device type is unknown, or the device is too busy. More...
 
int32_t WPADSendStreamData (WPADChan chan, void *data, uint32_t size)
 Sends data to be played by wiimote speaker make sure the data is in the format the speaker was initialized for, (4-bit Yamaha ADPCM by default) More...
 
uint8_t WPADGetSpeakerVolume ()
 Returns the global Wii Remote speaker volume. More...
 
void WPADSetSpeakerVolume (uint8_t volume)
 Sets the global Wii Remote speaker volume only applies to later initialized Wii Remote speakers. More...
 
int32_t WPADIsMplsAttached (WPADChan channel, BOOL *enabled, WPADIsMplsAttachedCallback callback)
 Gets whether MotionPlus is enabled for the WPAD. More...
 
int32_t WPADIsMplsIntegrated (WPADChan channel)
 Returns whether the WPADChan has MotionPlus integrated. More...
 
int32_t WPADGetInfo (WPADChan channel, WPADInfo *outInfo)
 Retrieves status info from the controller. More...
 
int32_t WPADGetInfoAsync (WPADChan channel, WPADInfo *outInfo, WPADGetInfoCallback)
 Retrieves status info from the controller asynchronously. More...
 
int32_t WPADReadMemoryAsync (WPADChan channel, void *destination, uint16_t size, uint32_t address, WPADReadMemoryCallback callback)
 Reads from the device's memory. More...
 
int32_t WPADWriteMemoryAsync (WPADChan channel, void *source, uint32_t size, uint32_t address, WPADWriteMemoryCallback callback)
 Writes to the device's memory. More...
 
int32_t WPADReadExtReg (WPADChan channel, void *destination, uint16_t size, WPADPeripheralSpace peripheral, uint32_t address, WPADReadMemoryCallback callback)
 Reads from the registers of the Wii Remote's peripherals. More...
 
int32_t WPADWriteExtReg (WPADChan channel, void *source, uint32_t size, WPADPeripheralSpace peripheral, uint32_t address, WPADWriteMemoryCallback callback)
 Writes to the registers of the Wii Remote's peripherals. More...
 
int32_t WPADGetBLCalibration (WPADChan channel, void *destination, uint32_t address, uint32_t size, WPADReadMemoryCallback callback)
 Read Balance Board calibration. More...
 
void WPADSetPowerSaveMode (WPADChan chan, BOOL powerSave)
 Sets power save mode, this makes the controller only report input data when it changes. More...
 
BOOL WPADGetPowerSaveMode (WPADChan chan)
 
void WPADGetAddress (WPADChan chan, WPADAddress *outAddress)
 Retrieves the bluetooth address of the controller. More...
 
void WPADEnableMotor (BOOL enable)
 Enables/disables motors globally. More...
 
BOOL WPADIsMotorEnabled ()
 Returns whether motors are disabled globally. More...
 
void WPADEnableURCC (BOOL enable)
 Enables/disables Wii U Pro Controller support. More...
 
BOOL WPADIsEnabledURC ()
 Returns whether Wii U Pro Controllers are supported. More...
 
void WPADEnableWBC (BOOL enable)
 Enables/disables Wii Balance Board support. More...
 
BOOL WPADIsEnableWBC ()
 Returns whether Wii Balance Boards are supported. More...
 
void WPADEnableWiiRemote (BOOL enable)
 Enables/disables Wii Remote support. More...
 
void WPADSetAutoSleepTime (uint8_t time)
 
BOOL WPADStartSyncDevice ()
 Starts searching for a WPAD controller in pairing mode and syncs with it. More...
 
BOOL WPADStartSyncDeviceEx (WPADAddress *deviceAddress, const char *deviceName)
 Starts attempts to sync with a WPAD with the specified properties, if unable to do so, starts a normal sync as with WPADStartSyncDevice. More...
 
WPADConnectCallback WPADSetConnectCallback (WPADChan chan, WPADConnectCallback callback)
 Set function to be run upon controller connect/disconnect. More...
 
WPADExtensionCallback WPADSetExtensionCallback (WPADChan chan, WPADExtensionCallback callback)
 Set the function to be run upon extension connect and motion plus activation. More...
 
WPADSamplingCallback WPADSetSamplingCallback (WPADChan chan, WPADSamplingCallback callback)
 
void WPADiShutdown ()
 
void WPADiClearQueue (WPADiQueue *queue)
 Clears all elements from queue. More...
 
bool WPADiIsAvailableCmdQueue (WPADiQueue *queue, uint32_t count)
 Checks if there is enough space in the queue. More...
 
int32_t WPADiHIDParser (WPADChan channel, uint8_t *hidData)
 Parses incoming HID report data for a controller. More...
 
BOOL WPADiSendSetVibrator (WPADiQueue *cmdQueue)
 Queues HID Report for Rumble Update. More...
 
BOOL WPADiSendSetPort (WPADiQueue *cmdQueue, WPADLed led, WPADiSendCallback callback)
 Queues HID Report for setting LEDs used internally by WPADControlLed. More...
 
BOOL WPADiSendSetReportType (WPADiQueue *cmdQueue, WPADDataFormat dataFormat, BOOL powerSave, WPADiSendCallback callback)
 Queues HID Report for setting data reporting mode used internally by WPADSetPowerSaveMode. More...
 
BOOL WPADiSendGetContStat (WPADiQueue *cmdQueue, WPADInfo *outInfo, WPADiSendCallback callback)
 Queues HID report for a controller status request used internally by WPADGetInfoAsync and several other functions. More...
 
BOOL WPADiSendEnableDPD (WPADiQueue *cmdQueue, BOOL enable, WPADiSendCallback callback)
 Queues HID Report for enabling the IR Camera clock used internally by WPADControlDpd. More...
 
BOOL WPADiSendEnableDPDCSB (WPADiQueue *cmdQueue, BOOL enable, WPADiSendCallback callback)
 Queues HID Report for enabling IR Camera used internally by WPADControlDpd. More...
 
BOOL WPADiSendEnableSpeaker (WPADiQueue *cmdQueue, BOOL enable, WPADiSendCallback callback)
 Queues HID Report for enabling speakers used internally by . More...
 
BOOL WPADiSendMuteSpeaker (WPADiQueue *cmdQueue, BOOL mute, WPADiSendCallback callback)
 Queues HID Report for muting speakers used internally by . More...
 
BOOL WPADiSendStreamData (WPADiQueue *cmdQueue, void *source, uint32_t size)
 Queues HID Report for sending speaker stream data used internally by WPADSendStreamData. More...
 
BOOL WPADiSendWriteDataCmd (WPADiQueue *cmdQueue, uint8_t byte, uint32_t address, WPADiSendCallback callback)
 Queues HID Report for a single-byte memory write. More...
 
BOOL WPADiSendWriteData (WPADiQueue *cmdQueue, void *source, uint32_t size, uint32_t address, WPADiSendCallback callback)
 Queues HID Report for a multi-byte memory write used internally by WPADWriteMemory. More...
 
BOOL WPADiSendReadData (WPADiQueue *cmdQueue, void *destination, uint16_t size, uint32_t address, WPADiSendCallback callback)
 Queues HID Report for a memory read used internally by WPADReadMemory. More...
 
uint32_t * WPADiGetGameCode ()
 Game code (identifier), which may be saved to the EEPROM of connected controllers. More...
 
uint8_t WPADiGetGameType ()
 Game type, which may be saved to the EEPROM of connected controllers. More...
 
void WPADSetGameTitleUtf16 (uint16_t *title)
 Sets game title for all connected controllers. More...
 
int32_t WPADGetGameTitleUtf16 (WPADChan chan, uint16_t **outTitle)
 Gets game title stored on specified controller. More...
 
int32_t WPADGetGameDataTimestamp (WPADChan chan, OSTime *timestamp)
 Get the time that game data was written. More...
 
int32_t WPADiWriteGameData (WPADChan channel, void *source, uint16_t size, uint32_t offset, WPADWriteMemoryCallback callback)
 Write custom game data to the controller's EEPROM. More...
 
int32_t WPADiReadGameData (WPADChan channel, void *destination, uint16_t size, uint32_t offset, WPADReadMemoryCallback callback)
 Read custom game data from the controller's EEPROM. More...
 
WPADMplsMode WPADiGetMplsStatus ()
 Get MotionPlus mode. More...
 

Detailed Description

WPAD is a low-level library under KPAD.


Data Structure Documentation

◆ WPADVec2D

struct WPADVec2D

2D vector.

Definition at line 323 of file wpad.h.

Data Fields
int16_t x x.
int16_t y y.

◆ WPADStatusProController

struct WPADStatusProController

Definition at line 334 of file wpad.h.

Data Fields
uint8_t extensionType A value from WPADExtensionType.
uint8_t err
uint32_t buttons
WPADVec2D leftStick
WPADVec2D rightStick
WPADDataFormat dataFormat

◆ WPADInfo

struct WPADInfo

Controller status info.

Definition at line 358 of file wpad.h.

Data Fields
uint32_t irEnabled
uint32_t speakerEnabled
uint32_t extensionAttached
uint32_t batteryLow
uint32_t batteryNearEmpty
uint8_t batteryLevel
uint8_t led
uint8_t protocol
uint8_t firmware

◆ WPADiQueueElement

struct WPADiQueueElement

Definition at line 382 of file wpad.h.

Data Fields
uint8_t data[0x30]

◆ WPADiQueue

struct WPADiQueue

Definition at line 389 of file wpad.h.

Data Fields
uint8_t frontIndex
uint8_t backIndex
WPADiQueueElement * elements
uint32_t capacity

◆ WPADAddress

struct WPADAddress

Bluetooth device address.

Definition at line 404 of file wpad.h.

Data Fields
uint8_t btDeviceAddress[6]

Typedef Documentation

◆ WPADStatusProController

Definition at line 1 of file wpad.h.

◆ WPADVec2D

typedef struct WPADVec2D WPADVec2D

Definition at line 1 of file wpad.h.

◆ WPADInfo

typedef struct WPADInfo WPADInfo

Definition at line 1 of file wpad.h.

◆ WPADAddress

typedef struct WPADAddress WPADAddress

Definition at line 1 of file wpad.h.

◆ WPADiQueueElement

Definition at line 1 of file wpad.h.

◆ WPADiQueue

typedef struct WPADiQueue WPADiQueue

Definition at line 1 of file wpad.h.

◆ WPADChan

typedef enum WPADChan WPADChan

Wii Remote channel.

◆ WPADDataFormat

Data format.

◆ WPADExtensionType

Extension type.

◆ WPADButton

typedef enum WPADButton WPADButton

Wii Remote buttons.

◆ WPADNunchukButton

Nunchuk buttons.

◆ WPADClassicButton

Classic Controller buttons.

◆ WPADProButton

Pro Controller buttons.

◆ WPADLed

typedef enum WPADLed WPADLed

WPAD Led flags.

◆ WPADDpdFormat

WPAD Infrared Format. For more information see IR Data Formats

◆ WPADSpeakerCmd

WPAD Speaker Command.

◆ WPADMplsMode

typedef enum WPADMplsMode WPADMplsMode

MotionPlus Mode.

◆ WPADPeripheralSpace

WPAD Peripheral Memory Space Prefixes.

◆ WPADIsMplsAttachedCallback

typedef void(* WPADIsMplsAttachedCallback) (WPADChan chan, int32_t status)

Definition at line 411 of file wpad.h.

◆ WPADControlLedCallback

typedef void(* WPADControlLedCallback) (WPADChan chan, int32_t status)

Definition at line 412 of file wpad.h.

◆ WPADControlDpdCallback

typedef void(* WPADControlDpdCallback) (WPADChan chan, int32_t status)

Definition at line 413 of file wpad.h.

◆ WPADControlSpeakerCallback

typedef void(* WPADControlSpeakerCallback) (WPADChan chan, int32_t status)

Definition at line 414 of file wpad.h.

◆ WPADGetInfoCallback

typedef void(* WPADGetInfoCallback) (WPADChan chan, int32_t status)

Definition at line 416 of file wpad.h.

◆ WPADReadMemoryCallback

typedef void(* WPADReadMemoryCallback) (WPADChan chan, int32_t status)

Callback called when data is attempted to be read from controller memory.

Definition at line 421 of file wpad.h.

◆ WPADWriteMemoryCallback

typedef void(* WPADWriteMemoryCallback) (WPADChan chan, int32_t status)

Callback called when data is attempted to be written to controller memory.

Definition at line 426 of file wpad.h.

◆ WPADSamplingCallback

typedef void(* WPADSamplingCallback) (WPADChan chan)

Definition at line 428 of file wpad.h.

◆ WPADExtensionCallback

typedef void(* WPADExtensionCallback) (WPADChan chan, WPADExtensionType ext)

Callback called when the active extension changes.

Definition at line 433 of file wpad.h.

◆ WPADConnectCallback

typedef void(* WPADConnectCallback) (WPADChan chan, int32_t status)

Callback called when a controller connects or disconnects.

Parameters
status0 on connect, -1 on disconnect

Definition at line 439 of file wpad.h.

◆ WPADiSendCallback

typedef void(* WPADiSendCallback) (WPADChan chan, int32_t status)

Definition at line 441 of file wpad.h.

◆ WPADiWriteGameDataCallback

typedef void(* WPADiWriteGameDataCallback) (WPADChan chan, int32_t status)

Callback called when WPADiWriteGameData completes,.

Parameters
status0 on success, -3 on failure

Definition at line 447 of file wpad.h.

Enumeration Type Documentation

◆ WPADChan

enum WPADChan

Wii Remote channel.

Enumerator
WPAD_CHAN_0 

Channel 0.

WPAD_CHAN_1 

Channel 1.

WPAD_CHAN_2 

Channel 2.

WPAD_CHAN_3 

Channel 3.

WPAD_CHAN_4 

Channel 4.

WPAD_CHAN_5 

Channel 5.

WPAD_CHAN_6 

Channel 6.

Definition at line 25 of file wpad.h.

◆ WPADDataFormat

Data format.

Enumerator
WPAD_FMT_CORE 

Wii Remote buttons.

WPAD_FMT_CORE_ACC 

Wii Remote buttons and accelerometer.

WPAD_FMT_CORE_ACC_DPD 

Wii Remote buttons, accelerometer and IR pos.

WPAD_FMT_NUNCHUK 

Wii Remote buttons, Nunchuk.

WPAD_FMT_NUNCHUK_ACC 

Wii Remote buttons, accelerometer, Nunchuk.

WPAD_FMT_NUNCHUK_ACC_DPD 

Wii Remote buttons, accelerometer, IR pos, Nunchuk.

WPAD_FMT_CLASSIC 

Wii Remote buttons, Classic Controller.

WPAD_FMT_CLASSIC_ACC 

Wii Remote buttons, accelerometer, Classic Controller.

WPAD_FMT_CLASSIC_ACC_DPD 

Wii Remote buttons, accelerometer, IR pos, Classic Controller.

WPAD_FMT_CORE_ACC_DPD_FULL 

Wii Remote buttons, accelerometer and IR pos with bounds.

WPAD_FMT_TRAIN 

Wii Remote, Densha De GO! Shinkansen Controller.

WPAD_FMT_GUITAR 

Guitar Hero Guitar.

WPAD_FMT_BALANCE_BOARD 

Wii Balance Board.

WPAD_FMT_DRUM 

Guitar Hero World Tour Drums.

WPAD_FMT_MPLUS 

Wii Remote buttons, accelerometer, IR pos, Motion Plus gyroscope.

WPAD_FMT_TAIKO 

Wii Remote, Taiko no Testsujin TaTaCon.

WPAD_FMT_PRO_CONTROLLER 

Wii U Pro Controller.

Definition at line 44 of file wpad.h.

◆ WPADExtensionType

Extension type.

Enumerator
WPAD_EXT_CORE 

Wii Remote with no extension.

WPAD_EXT_NUNCHUK 

Nunchuk.

WPAD_EXT_CLASSIC 

Classic Controller.

WPAD_EXT_MPLUS 

Motion Plus.

WPAD_EXT_MPLUS_NUNCHUK 

Motion Plus with Nunchuk.

WPAD_EXT_MPLUS_CLASSIC 

Motion Plus with Classic Controller.

WPAD_EXT_PRO_CONTROLLER 

Pro Controller.

WPAD_EXT_DEV_NOT_FOUND 

No controller found.

WPAD_EXT_UNKNOWN 

Extension unknown.

Definition at line 83 of file wpad.h.

◆ WPADButton

enum WPADButton

Wii Remote buttons.

Enumerator
WPAD_BUTTON_LEFT 

The left button of the D-pad.

WPAD_BUTTON_RIGHT 

The right button of the D-pad.

WPAD_BUTTON_DOWN 

The down button of the D-pad.

WPAD_BUTTON_UP 

The up button of the D-pad.

WPAD_BUTTON_PLUS 

The + button.

WPAD_BUTTON_2 

The 2 button.

WPAD_BUTTON_1 

The 1 button.

WPAD_BUTTON_B 

The B button.

WPAD_BUTTON_A 

The A button.

WPAD_BUTTON_MINUS 

The - button.

WPAD_BUTTON_Z 

The Z button on the Nunchuk extension.

WPAD_BUTTON_C 

The C button on the Nunchuk extension.

WPAD_BUTTON_HOME 

The HOME button.

Definition at line 106 of file wpad.h.

◆ WPADNunchukButton

Nunchuk buttons.

Enumerator
WPAD_NUNCHUK_STICK_EMULATION_LEFT 

The emulated left button on the Nunchuk stick or the left button of the D-pad on the Wii Remote.

WPAD_NUNCHUK_STICK_EMULATION_RIGHT 

The emulated right button on the Nunchuk stick or the right button of the D-pad on the Wii Remote.

WPAD_NUNCHUK_STICK_EMULATION_DOWN 

The emulated down button on the Nunchuk stick or the down button of the D-pad on the Wii Remote.

WPAD_NUNCHUK_STICK_EMULATION_UP 

The emulated up button on the Nunchuk stick or the up button of the D-pad on the Wii Remote.

WPAD_NUNCHUK_BUTTON_Z 

The Z button.

WPAD_NUNCHUK_BUTTON_C 

The C button.

Definition at line 137 of file wpad.h.

◆ WPADClassicButton

Classic Controller buttons.

Enumerator
WPAD_CLASSIC_BUTTON_UP 

The up button of the D-pad.

WPAD_CLASSIC_BUTTON_LEFT 

The left button of the D-pad.

WPAD_CLASSIC_BUTTON_ZR 

The ZR button.

WPAD_CLASSIC_BUTTON_X 

The X button.

WPAD_CLASSIC_BUTTON_A 

The A button.

WPAD_CLASSIC_BUTTON_Y 

The Y button.

WPAD_CLASSIC_BUTTON_B 

The B button.

WPAD_CLASSIC_BUTTON_ZL 

The ZL button.

WPAD_CLASSIC_BUTTON_R 

The R button.

WPAD_CLASSIC_BUTTON_PLUS 

The + button.

WPAD_CLASSIC_BUTTON_HOME 

The HOME button.

WPAD_CLASSIC_BUTTON_MINUS 

The - button.

WPAD_CLASSIC_BUTTON_L 

The L button.

WPAD_CLASSIC_BUTTON_DOWN 

The down button of the D-pad.

WPAD_CLASSIC_BUTTON_RIGHT 

The right button of the D-pad.

WPAD_CLASSIC_STICK_L_EMULATION_LEFT 

The emulated left button on the left stick.

WPAD_CLASSIC_STICK_L_EMULATION_RIGHT 

The emulated right button on the left stick.

WPAD_CLASSIC_STICK_L_EMULATION_DOWN 

The emulated down button on the left stick.

WPAD_CLASSIC_STICK_L_EMULATION_UP 

The emulated up button on the left stick.

WPAD_CLASSIC_STICK_R_EMULATION_LEFT 

The emulated left button on the right stick.

WPAD_CLASSIC_STICK_R_EMULATION_RIGHT 

The emulated right button on the right stick.

WPAD_CLASSIC_STICK_R_EMULATION_DOWN 

The emulated down button on the right stick.

WPAD_CLASSIC_STICK_R_EMULATION_UP 

The emulated up button on the right stick.

Definition at line 154 of file wpad.h.

◆ WPADProButton

Pro Controller buttons.

Enumerator
WPAD_PRO_BUTTON_UP 

The up button of the D-pad.

WPAD_PRO_BUTTON_LEFT 

The left button of the D-pad.

WPAD_PRO_TRIGGER_ZR 

The ZR button.

WPAD_PRO_BUTTON_X 

The X button.

WPAD_PRO_BUTTON_A 

The A button.

WPAD_PRO_BUTTON_Y 

The Y button.

WPAD_PRO_BUTTON_B 

The B button.

WPAD_PRO_TRIGGER_ZL 

The ZL button.

WPAD_PRO_RESERVED 

Reserved.

WPAD_PRO_TRIGGER_R 

The right trigger button.

WPAD_PRO_BUTTON_PLUS 

The + button.

WPAD_PRO_BUTTON_HOME 

The HOME button.

WPAD_PRO_BUTTON_MINUS 

The - button.

WPAD_PRO_TRIGGER_L 

The left trigger button.

WPAD_PRO_BUTTON_DOWN 

The down button of the D-pad.

WPAD_PRO_BUTTON_RIGHT 

The right button of the D-pad.

WPAD_PRO_BUTTON_STICK_R 

The right stick button.

WPAD_PRO_BUTTON_STICK_L 

The left stick button.

WPAD_PRO_STICK_L_EMULATION_UP 

The emulated up button on the left stick.

WPAD_PRO_STICK_L_EMULATION_DOWN 

The emulated down button on the left stick.

WPAD_PRO_STICK_L_EMULATION_LEFT 

The emulated left button on the left stick.

WPAD_PRO_STICK_L_EMULATION_RIGHT 

The emulated right button on the left stick.

WPAD_PRO_STICK_R_EMULATION_UP 

The emulated up button on the right stick.

WPAD_PRO_STICK_R_EMULATION_DOWN 

The emulated down button on the right stick.

WPAD_PRO_STICK_R_EMULATION_LEFT 

The emulated left button on the right stick.

WPAD_PRO_STICK_R_EMULATION_RIGHT 

The emulated right button on the right stick.

Definition at line 205 of file wpad.h.

◆ WPADLed

enum WPADLed

WPAD Led flags.

Enumerator
WPAD_LED_ONE 
WPAD_LED_TWO 
WPAD_LED_THREE 
WPAD_LED_FOUR 

Definition at line 262 of file wpad.h.

◆ WPADDpdFormat

WPAD Infrared Format. For more information see IR Data Formats

Enumerator
WPAD_DPD_FMT_NONE 

Disable IR.

WPAD_DPD_FMT_BASIC 
WPAD_DPD_FMT_EXTENDED 
WPAD_DPD_FMT_FULL 

Definition at line 272 of file wpad.h.

◆ WPADSpeakerCmd

WPAD Speaker Command.

Enumerator
WPAD_SPEAKER_CMD_OFF 

Deinitializes and turns off speaker.

WPAD_SPEAKER_CMD_ON 

Turns on and initializes speaker to use 4-bit Yamaha ADPCM data format at 3000 Hz.

WPAD_SPEAKER_CMD_MUTE 

Mutes speaker.

WPAD_SPEAKER_CMD_UNMUTE 

Unmutes speaker.

WPAD_SPEAKER_CMD_PLAY 

Allows sound to play.

WPAD_SPEAKER_CMD_ON_ALT 

Does the same as WPAD_SPEAKER_CMD_ON.

Definition at line 282 of file wpad.h.

◆ WPADMplsMode

MotionPlus Mode.

Enumerator
WPAD_MPLS_MODE_DISABLE 
WPAD_MPLS_MODE_MPLS_ONLY 

MotionPlus exclusive mode.

WPAD_MPLS_MODE_MPLS_NUNCHUK 

Nunchuk passthrough mode.

WPAD_MPLS_MODE_MPLS_CLASSIC 

Classic passthrough mode.

Definition at line 299 of file wpad.h.

◆ WPADPeripheralSpace

WPAD Peripheral Memory Space Prefixes.

Enumerator
WPAD_PERIPHERAL_SPACE_SPEAKER 
WPAD_PERIPHERAL_SPACE_EXTENSION 

Any extension other than Motion Plus.

WPAD_PERIPHERAL_SPACE_MOTIONPLUS 
WPAD_PERIPHERAL_SPACE_DPD 

Infrared.

Definition at line 312 of file wpad.h.

Function Documentation

◆ WUT_ENUM_BITMASK_TYPE()

WUT_ENUM_BITMASK_TYPE ( WPADLed  )

◆ WPADInit()

void WPADInit ( )

Initialises the WPAD library for use.

◆ WPADShutdown()

void WPADShutdown ( )

Cleans up and frees the WPAD library.

◆ WPADDisconnect()

void WPADDisconnect ( WPADChan  chan)

Immediately disconnects the associated controller.

◆ WPADProbe()

int32_t WPADProbe ( WPADChan  chan,
WPADExtensionType outExtensionType 
)

Identifies the extension connected to the associated controller.

Returns
-1, if controller is not connected,
-2, if busy

◆ WPADSetDataFormat()

int32_t WPADSetDataFormat ( WPADChan  chan,
WPADDataFormat  format 
)

Sets the data format of the controller, can be used to reduce or increase the amount of data received.

Parameters
chan
formatdata format
Returns
0, on success
-2, if busy or data
-4, if format is for a disabled device type

◆ WPADGetDataFormat()

WPADDataFormat WPADGetDataFormat ( WPADChan  chan)

Gets the data format in use by the controller.

Returns
the current data format

◆ WPADRead()

void WPADRead ( WPADChan  chan,
void *  data 
)

◆ WPADControlLed()

int32_t WPADControlLed ( WPADChan  channel,
WPADLed  led,
WPADControlLedCallback  callback 
)

Controls the associated WPADChan's LEDs.

◆ WPADControlDpd()

int32_t WPADControlDpd ( WPADChan  channel,
WPADDpdFormat  mode,
WPADControlDpdCallback  callback 
)

Controls the WPADChan's IR sensor.

◆ WPADGetDpdFormat()

WPADDpdFormat WPADGetDpdFormat ( WPADChan  chan)

Returns the associated controller's IR mode.

◆ WPADControlMotor()

void WPADControlMotor ( WPADChan  chan,
BOOL  motorEnabled 
)

Controls the associated WPADChan's rumble motor.

◆ WPADControlSpeaker()

int32_t WPADControlSpeaker ( WPADChan  chan,
WPADSpeakerCmd  mode,
WPADControlSpeakerCallback   
)

Sets the wiimote speaker mode.

◆ WPADIsSpeakerEnabled()

BOOL WPADIsSpeakerEnabled ( WPADChan  chan)

Returns whether the wiimote's speaker is enabled.

◆ WPADCanSendStreamData()

BOOL WPADCanSendStreamData ( WPADChan  chan)

Returns whether it is possible to send data to the wiimote's speaker at this moment May return false if device type is unknown, or the device is too busy.

◆ WPADSendStreamData()

int32_t WPADSendStreamData ( WPADChan  chan,
void *  data,
uint32_t  size 
)

Sends data to be played by wiimote speaker make sure the data is in the format the speaker was initialized for, (4-bit Yamaha ADPCM by default)

Parameters
dataaudio encoded in initialized format
sizenumber of bytes to send
Returns
-2, if not possible to send data at this moment
-1, if chan is invalid, data is null or size is more than 20

◆ WPADGetSpeakerVolume()

uint8_t WPADGetSpeakerVolume ( )

Returns the global Wii Remote speaker volume.

◆ WPADSetSpeakerVolume()

void WPADSetSpeakerVolume ( uint8_t  volume)

Sets the global Wii Remote speaker volume only applies to later initialized Wii Remote speakers.

◆ WPADIsMplsAttached()

int32_t WPADIsMplsAttached ( WPADChan  channel,
BOOL enabled,
WPADIsMplsAttachedCallback  callback 
)

Gets whether MotionPlus is enabled for the WPAD.

Parameters
enabledis set if MotionPlus is enabled

◆ WPADIsMplsIntegrated()

int32_t WPADIsMplsIntegrated ( WPADChan  channel)

Returns whether the WPADChan has MotionPlus integrated.

Returns
-1 if controller is not connected, 1 if MotionPlus integrated, 0 if not

◆ WPADGetInfo()

int32_t WPADGetInfo ( WPADChan  channel,
WPADInfo outInfo 
)

Retrieves status info from the controller.

◆ WPADGetInfoAsync()

int32_t WPADGetInfoAsync ( WPADChan  channel,
WPADInfo outInfo,
WPADGetInfoCallback   
)

Retrieves status info from the controller asynchronously.

◆ WPADReadMemoryAsync()

int32_t WPADReadMemoryAsync ( WPADChan  channel,
void *  destination,
uint16_t  size,
uint32_t  address,
WPADReadMemoryCallback  callback 
)

Reads from the device's memory.

Parameters
destinationwhere the received data will be stored
sizenumber of bytes to read
addressdevice memory address, see EEPROM Memory and Control Registers
completionCallbackfunction to be called upon completion
See also

◆ WPADWriteMemoryAsync()

int32_t WPADWriteMemoryAsync ( WPADChan  channel,
void *  source,
uint32_t  size,
uint32_t  address,
WPADWriteMemoryCallback  callback 
)

Writes to the device's memory.

Parameters
sourcedata to be written to the controller
sizenumber of bytes to write
addressdevice memory address, see EEPROM Memory and Control Registers
callbackfunction to be called upon completion
See also

◆ WPADReadExtReg()

int32_t WPADReadExtReg ( WPADChan  channel,
void *  destination,
uint16_t  size,
WPADPeripheralSpace  peripheral,
uint32_t  address,
WPADReadMemoryCallback  callback 
)

Reads from the registers of the Wii Remote's peripherals.

Parameters
addressaddress within the peripheral's memory space
See also

◆ WPADWriteExtReg()

int32_t WPADWriteExtReg ( WPADChan  channel,
void *  source,
uint32_t  size,
WPADPeripheralSpace  peripheral,
uint32_t  address,
WPADWriteMemoryCallback  callback 
)

Writes to the registers of the Wii Remote's peripherals.

Parameters
addressaddress within the peripheral's memory space
See also

Usage:

// Setting speaker volume on specific controller
uint8_t volume;
volume = 0x40;
int32_t WPADWriteExtReg(WPADChan channel, void *source, uint32_t size, WPADPeripheralSpace peripheral, uint32_t address, WPADWriteMemoryCallback callback)
Writes to the registers of the Wii Remote's peripherals.
@ WPAD_CHAN_0
Channel 0.
Definition: wpad.h:28
@ WPAD_PERIPHERAL_SPACE_SPEAKER
Definition: wpad.h:314

◆ WPADGetBLCalibration()

int32_t WPADGetBLCalibration ( WPADChan  channel,
void *  destination,
uint32_t  address,
uint32_t  size,
WPADReadMemoryCallback  callback 
)

Read Balance Board calibration.

Parameters
addressmay only be in the ranges [0x24,0x40) and [0x50, 0x70)
See also

◆ WPADSetPowerSaveMode()

void WPADSetPowerSaveMode ( WPADChan  chan,
BOOL  powerSave 
)

Sets power save mode, this makes the controller only report input data when it changes.

◆ WPADGetPowerSaveMode()

BOOL WPADGetPowerSaveMode ( WPADChan  chan)
Returns
FALSE, if power save mode is off

◆ WPADGetAddress()

void WPADGetAddress ( WPADChan  chan,
WPADAddress outAddress 
)

Retrieves the bluetooth address of the controller.

◆ WPADEnableMotor()

void WPADEnableMotor ( BOOL  enable)

Enables/disables motors globally.

◆ WPADIsMotorEnabled()

BOOL WPADIsMotorEnabled ( )

Returns whether motors are disabled globally.

◆ WPADEnableURCC()

void WPADEnableURCC ( BOOL  enable)

Enables/disables Wii U Pro Controller support.

◆ WPADIsEnabledURC()

BOOL WPADIsEnabledURC ( )

Returns whether Wii U Pro Controllers are supported.

◆ WPADEnableWBC()

void WPADEnableWBC ( BOOL  enable)

Enables/disables Wii Balance Board support.

◆ WPADIsEnableWBC()

BOOL WPADIsEnableWBC ( )

Returns whether Wii Balance Boards are supported.

◆ WPADEnableWiiRemote()

void WPADEnableWiiRemote ( BOOL  enable)

Enables/disables Wii Remote support.

◆ WPADSetAutoSleepTime()

void WPADSetAutoSleepTime ( uint8_t  time)

◆ WPADStartSyncDevice()

BOOL WPADStartSyncDevice ( )

Starts searching for a WPAD controller in pairing mode and syncs with it.

Returns
TRUE if sync started

◆ WPADStartSyncDeviceEx()

BOOL WPADStartSyncDeviceEx ( WPADAddress deviceAddress,
const char *  deviceName 
)

Starts attempts to sync with a WPAD with the specified properties, if unable to do so, starts a normal sync as with WPADStartSyncDevice.

Parameters
deviceAddressBluetooth address of the device to connect to.
deviceNameBluetooth name of the device to connect to (up to 24 characters)
Returns
TRUE if sync started

Usage:

memset(&addr, 0x10, 6);
// Initially searches for device with address 10:10:10:10:10:10 and name "Nintendo"
WPADStartSyncDeviceEx(&addr, "Nintendo");
BOOL WPADStartSyncDeviceEx(WPADAddress *deviceAddress, const char *deviceName)
Starts attempts to sync with a WPAD with the specified properties, if unable to do so,...
Bluetooth device address.
Definition: wpad.h:405

◆ WPADSetConnectCallback()

WPADConnectCallback WPADSetConnectCallback ( WPADChan  chan,
WPADConnectCallback  callback 
)

Set function to be run upon controller connect/disconnect.

Returns
the previously used callback

◆ WPADSetExtensionCallback()

WPADExtensionCallback WPADSetExtensionCallback ( WPADChan  chan,
WPADExtensionCallback  callback 
)

Set the function to be run upon extension connect and motion plus activation.

Returns
the previously used callback

◆ WPADSetSamplingCallback()

WPADSamplingCallback WPADSetSamplingCallback ( WPADChan  chan,
WPADSamplingCallback  callback 
)

◆ WPADiShutdown()

void WPADiShutdown ( )

◆ WPADiClearQueue()

void WPADiClearQueue ( WPADiQueue queue)

Clears all elements from queue.

◆ WPADiIsAvailableCmdQueue()

bool WPADiIsAvailableCmdQueue ( WPADiQueue queue,
uint32_t  count 
)

Checks if there is enough space in the queue.

◆ WPADiHIDParser()

int32_t WPADiHIDParser ( WPADChan  channel,
uint8_t *  hidData 
)

Parses incoming HID report data for a controller.

Returns
-1 if first byte is outside the valid input report range (0x20 to 0x3f)

◆ WPADiSendSetVibrator()

BOOL WPADiSendSetVibrator ( WPADiQueue cmdQueue)

Queues HID Report for Rumble Update.

Rumble must be set before this

Returns
TRUE if successfully added to queue

◆ WPADiSendSetPort()

BOOL WPADiSendSetPort ( WPADiQueue cmdQueue,
WPADLed  led,
WPADiSendCallback  callback 
)

Queues HID Report for setting LEDs used internally by WPADControlLed.

Returns
TRUE if successfully added to queue

◆ WPADiSendSetReportType()

BOOL WPADiSendSetReportType ( WPADiQueue cmdQueue,
WPADDataFormat  dataFormat,
BOOL  powerSave,
WPADiSendCallback  callback 
)

Queues HID Report for setting data reporting mode used internally by WPADSetPowerSaveMode.

Returns
TRUE if successfully added to queue

◆ WPADiSendGetContStat()

BOOL WPADiSendGetContStat ( WPADiQueue cmdQueue,
WPADInfo outInfo,
WPADiSendCallback  callback 
)

Queues HID report for a controller status request used internally by WPADGetInfoAsync and several other functions.

Returns
TRUE if successfully added to queue

◆ WPADiSendEnableDPD()

BOOL WPADiSendEnableDPD ( WPADiQueue cmdQueue,
BOOL  enable,
WPADiSendCallback  callback 
)

Queues HID Report for enabling the IR Camera clock used internally by WPADControlDpd.

Returns
TRUE if successfully added to queue

◆ WPADiSendEnableDPDCSB()

BOOL WPADiSendEnableDPDCSB ( WPADiQueue cmdQueue,
BOOL  enable,
WPADiSendCallback  callback 
)

Queues HID Report for enabling IR Camera used internally by WPADControlDpd.

Returns
TRUE if successfully added to queue

◆ WPADiSendEnableSpeaker()

BOOL WPADiSendEnableSpeaker ( WPADiQueue cmdQueue,
BOOL  enable,
WPADiSendCallback  callback 
)

Queues HID Report for enabling speakers used internally by .

Returns
TRUE if successfully added to queue

◆ WPADiSendMuteSpeaker()

BOOL WPADiSendMuteSpeaker ( WPADiQueue cmdQueue,
BOOL  mute,
WPADiSendCallback  callback 
)

Queues HID Report for muting speakers used internally by .

Returns
TRUE if successfully added to queue

◆ WPADiSendStreamData()

BOOL WPADiSendStreamData ( WPADiQueue cmdQueue,
void *  source,
uint32_t  size 
)

Queues HID Report for sending speaker stream data used internally by WPADSendStreamData.

Returns
TRUE if successfully added to queue

◆ WPADiSendWriteDataCmd()

BOOL WPADiSendWriteDataCmd ( WPADiQueue cmdQueue,
uint8_t  byte,
uint32_t  address,
WPADiSendCallback  callback 
)

Queues HID Report for a single-byte memory write.

Returns
TRUE if successfully added to queue

◆ WPADiSendWriteData()

BOOL WPADiSendWriteData ( WPADiQueue cmdQueue,
void *  source,
uint32_t  size,
uint32_t  address,
WPADiSendCallback  callback 
)

Queues HID Report for a multi-byte memory write used internally by WPADWriteMemory.

Returns
TRUE if successfully added to queue

◆ WPADiSendReadData()

BOOL WPADiSendReadData ( WPADiQueue cmdQueue,
void *  destination,
uint16_t  size,
uint32_t  address,
WPADiSendCallback  callback 
)

Queues HID Report for a memory read used internally by WPADReadMemory.

Returns
TRUE if successfully added to queue

◆ WPADiGetGameCode()

uint32_t* WPADiGetGameCode ( )

Game code (identifier), which may be saved to the EEPROM of connected controllers.

Returns
pointer to the game code

◆ WPADiGetGameType()

uint8_t WPADiGetGameType ( )

Game type, which may be saved to the EEPROM of connected controllers.

Returns
0x80

◆ WPADSetGameTitleUtf16()

void WPADSetGameTitleUtf16 ( uint16_t *  title)

Sets game title for all connected controllers.

Parameters
titleup to 17 UTF-16 characters including null terminator title will be copied onto the controller EEPROM
See also

◆ WPADGetGameTitleUtf16()

int32_t WPADGetGameTitleUtf16 ( WPADChan  chan,
uint16_t **  outTitle 
)

Gets game title stored on specified controller.

Parameters
outTitlepointer to where the title will be output
Returns
-4, if game data previously failed to write
See also

◆ WPADGetGameDataTimestamp()

int32_t WPADGetGameDataTimestamp ( WPADChan  chan,
OSTime timestamp 
)

Get the time that game data was written.

Returns
-4, if game data previously failed to write

◆ WPADiWriteGameData()

int32_t WPADiWriteGameData ( WPADChan  channel,
void *  source,
uint16_t  size,
uint32_t  offset,
WPADWriteMemoryCallback  callback 
)

Write custom game data to the controller's EEPROM.

Parameters
offsetstart address within custom data region

also stores the current game type and game code and commits the game title set by WPADSetGameTitleUtf16

Returns
0, if the write request was sent
-2, if the controller is busy, or game data is in the process of being read or written
See also

◆ WPADiReadGameData()

int32_t WPADiReadGameData ( WPADChan  channel,
void *  destination,
uint16_t  size,
uint32_t  offset,
WPADReadMemoryCallback  callback 
)

Read custom game data from the controller's EEPROM.

Parameters
offsetstart address within custom data region
Returns
0, if the read request was sent
-2, if the controller's game data is in the process of being read or written
-5, if the WPAD's GameCode does not match the global Game Code
-6, if game data previously failed to write
See also

◆ WPADiGetMplsStatus()

WPADMplsMode WPADiGetMplsStatus ( )

Get MotionPlus mode.

identical to KPADGetMplsStatus