336 WUT_UNKNOWN_BYTES(0x28);
342 WUT_PADDING_BYTES(2);
346 WUT_UNKNOWN_BYTES(8);
370 WUT_CHECK_OFFSET(
WPADInfo, 0x00, irEnabled);
371 WUT_CHECK_OFFSET(
WPADInfo, 0x04, speakerEnabled);
372 WUT_CHECK_OFFSET(
WPADInfo, 0x08, extensionAttached);
373 WUT_CHECK_OFFSET(
WPADInfo, 0x0c, batteryLow);
374 WUT_CHECK_OFFSET(
WPADInfo, 0x10, batteryNearEmpty);
375 WUT_CHECK_OFFSET(
WPADInfo, 0x14, batteryLevel);
376 WUT_CHECK_OFFSET(
WPADInfo, 0x15, led);
377 WUT_CHECK_OFFSET(
WPADInfo, 0x16, protocol);
378 WUT_CHECK_OFFSET(
WPADInfo, 0x17, firmware);
393 WUT_PADDING_BYTES(2);
397 WUT_CHECK_OFFSET(
WPADiQueue, 0x00, frontIndex);
398 WUT_CHECK_OFFSET(
WPADiQueue, 0x01, backIndex);
408 WUT_CHECK_OFFSET(
WPADAddress, 0x00, btDeviceAddress);
788 const char* deviceName);
993 uint16_t** outTitle);
uint8_t extensionType
A value from WPADExtensionType.
uint32_t extensionAttached
uint8_t btDeviceAddress[6]
uint32_t batteryNearEmpty
WPADDataFormat dataFormat
WPADiQueueElement * elements
BOOL WPADiSendWriteDataCmd(WPADiQueue *cmdQueue, uint8_t byte, uint32_t address, WPADiSendCallback callback)
Queues HID Report for a single-byte memory write.
int32_t WPADControlLed(WPADChan channel, WPADLed led, WPADControlLedCallback callback)
Controls the associated WPADChan's LEDs.
void WPADGetAddress(WPADChan chan, WPADAddress *outAddress)
Retrieves the bluetooth address of the controller.
BOOL WPADIsSpeakerEnabled(WPADChan chan)
Returns whether the wiimote's speaker is enabled.
int32_t WPADiWriteGameData(WPADChan channel, void *source, uint16_t size, uint32_t offset, WPADWriteMemoryCallback callback)
Write custom game data to the controller's EEPROM.
BOOL WPADIsEnableWBC()
Returns whether Wii Balance Boards are supported.
void(* WPADiSendCallback)(WPADChan chan, int32_t status)
WPADButton
Wii Remote buttons.
WPADDataFormat
Data format.
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.
void(* WPADiWriteGameDataCallback)(WPADChan chan, int32_t status)
Callback called when WPADiWriteGameData completes,.
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.
WUT_ENUM_BITMASK_TYPE(WPADLed)
BOOL WPADStartSyncDeviceEx(WPADAddress *deviceAddress, const char *deviceName)
Starts attempts to sync with a WPAD with the specified properties, if unable to do so,...
int32_t WPADGetInfoAsync(WPADChan channel, WPADInfo *outInfo, WPADGetInfoCallback)
Retrieves status info from the controller asynchronously.
BOOL WPADIsEnabledURC()
Returns whether Wii U Pro Controllers are supported.
void WPADControlMotor(WPADChan chan, BOOL motorEnabled)
Controls the associated WPADChan's rumble motor.
WPADExtensionCallback WPADSetExtensionCallback(WPADChan chan, WPADExtensionCallback callback)
Set the function to be run upon extension connect and motion plus activation.
BOOL WPADiSendGetContStat(WPADiQueue *cmdQueue, WPADInfo *outInfo, WPADiSendCallback callback)
Queues HID report for a controller status request used internally by WPADGetInfoAsync and several oth...
void WPADRead(WPADChan chan, void *data)
int32_t WPADReadMemoryAsync(WPADChan channel, void *destination, uint16_t size, uint32_t address, WPADReadMemoryCallback callback)
Reads from the device's memory.
WPADChan
Wii Remote channel.
void WPADSetPowerSaveMode(WPADChan chan, BOOL powerSave)
Sets power save mode, this makes the controller only report input data when it changes.
uint8_t WPADGetSpeakerVolume()
Returns the global Wii Remote speaker volume.
BOOL WPADiSendSetPort(WPADiQueue *cmdQueue, WPADLed led, WPADiSendCallback callback)
Queues HID Report for setting LEDs used internally by WPADControlLed.
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...
BOOL WPADiSendEnableDPD(WPADiQueue *cmdQueue, BOOL enable, WPADiSendCallback callback)
Queues HID Report for enabling the IR Camera clock used internally by WPADControlDpd.
void WPADDisconnect(WPADChan chan)
Immediately disconnects the associated controller.
BOOL WPADiSendEnableDPDCSB(WPADiQueue *cmdQueue, BOOL enable, WPADiSendCallback callback)
Queues HID Report for enabling IR Camera used internally by WPADControlDpd.
BOOL WPADIsMotorEnabled()
Returns whether motors are disabled globally.
WPADPeripheralSpace
WPAD Peripheral Memory Space Prefixes.
int32_t WPADWriteMemoryAsync(WPADChan channel, void *source, uint32_t size, uint32_t address, WPADWriteMemoryCallback callback)
Writes to the device's memory.
void(* WPADGetInfoCallback)(WPADChan chan, int32_t status)
int32_t WPADGetGameDataTimestamp(WPADChan chan, OSTime *timestamp)
Get the time that game data was written.
int32_t WPADIsMplsAttached(WPADChan channel, BOOL *enabled, WPADIsMplsAttachedCallback callback)
Gets whether MotionPlus is enabled for the WPAD.
uint32_t * WPADiGetGameCode()
Game code (identifier), which may be saved to the EEPROM of connected controllers.
void WPADShutdown()
Cleans up and frees the WPAD library.
int32_t WPADiReadGameData(WPADChan channel, void *destination, uint16_t size, uint32_t offset, WPADReadMemoryCallback callback)
Read custom game data from the controller's EEPROM.
int32_t WPADGetGameTitleUtf16(WPADChan chan, uint16_t **outTitle)
Gets game title stored on specified controller.
bool WPADiIsAvailableCmdQueue(WPADiQueue *queue, uint32_t count)
Checks if there is enough space in the queue.
void WPADEnableWiiRemote(BOOL enable)
Enables/disables Wii Remote support.
WPADClassicButton
Classic Controller buttons.
void WPADInit()
Initialises the WPAD library for use.
BOOL WPADStartSyncDevice()
Starts searching for a WPAD controller in pairing mode and syncs with it.
void WPADEnableMotor(BOOL enable)
Enables/disables motors globally.
WPADDpdFormat WPADGetDpdFormat(WPADChan chan)
Returns the associated controller's IR mode.
int32_t WPADGetBLCalibration(WPADChan channel, void *destination, uint32_t address, uint32_t size, WPADReadMemoryCallback callback)
Read Balance Board calibration.
void(* WPADControlLedCallback)(WPADChan chan, int32_t status)
int32_t WPADControlDpd(WPADChan channel, WPADDpdFormat mode, WPADControlDpdCallback callback)
Controls the WPADChan's IR sensor.
BOOL WPADiSendMuteSpeaker(WPADiQueue *cmdQueue, BOOL mute, WPADiSendCallback callback)
Queues HID Report for muting speakers used internally by .
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.
WPADDataFormat WPADGetDataFormat(WPADChan chan)
Gets the data format in use by the controller.
int32_t WPADIsMplsIntegrated(WPADChan channel)
Returns whether the WPADChan has MotionPlus integrated.
BOOL WPADiSendEnableSpeaker(WPADiQueue *cmdQueue, BOOL enable, WPADiSendCallback callback)
Queues HID Report for enabling speakers used internally by .
int32_t WPADProbe(WPADChan chan, WPADExtensionType *outExtensionType)
Identifies the extension connected to the associated controller.
void(* WPADIsMplsAttachedCallback)(WPADChan chan, int32_t status)
WPADSamplingCallback WPADSetSamplingCallback(WPADChan chan, WPADSamplingCallback callback)
BOOL WPADCanSendStreamData(WPADChan chan)
Returns whether it is possible to send data to the wiimote's speaker at this moment May return false ...
void WPADSetAutoSleepTime(uint8_t time)
WPADExtensionType
Extension type.
WPADSpeakerCmd
WPAD Speaker Command.
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 initia...
WPADMplsMode
MotionPlus Mode.
int32_t WPADGetInfo(WPADChan channel, WPADInfo *outInfo)
Retrieves status info from the controller.
BOOL WPADiSendSetVibrator(WPADiQueue *cmdQueue)
Queues HID Report for Rumble Update.
void(* WPADExtensionCallback)(WPADChan chan, WPADExtensionType ext)
Callback called when the active extension changes.
void(* WPADSamplingCallback)(WPADChan chan)
BOOL WPADiSendStreamData(WPADiQueue *cmdQueue, void *source, uint32_t size)
Queues HID Report for sending speaker stream data used internally by WPADSendStreamData.
WPADMplsMode WPADiGetMplsStatus()
Get MotionPlus mode.
int32_t WPADControlSpeaker(WPADChan chan, WPADSpeakerCmd mode, WPADControlSpeakerCallback)
Sets the wiimote speaker mode.
void(* WPADReadMemoryCallback)(WPADChan chan, int32_t status)
Callback called when data is attempted to be read from controller memory.
BOOL WPADiSendSetReportType(WPADiQueue *cmdQueue, WPADDataFormat dataFormat, BOOL powerSave, WPADiSendCallback callback)
Queues HID Report for setting data reporting mode used internally by WPADSetPowerSaveMode.
void WPADSetSpeakerVolume(uint8_t volume)
Sets the global Wii Remote speaker volume only applies to later initialized Wii Remote speakers.
void WPADEnableWBC(BOOL enable)
Enables/disables Wii Balance Board support.
WPADConnectCallback WPADSetConnectCallback(WPADChan chan, WPADConnectCallback callback)
Set function to be run upon controller connect/disconnect.
void(* WPADControlDpdCallback)(WPADChan chan, int32_t status)
void(* WPADConnectCallback)(WPADChan chan, int32_t status)
Callback called when a controller connects or disconnects.
WPADNunchukButton
Nunchuk buttons.
uint8_t WPADiGetGameType()
Game type, which may be saved to the EEPROM of connected controllers.
WPADDpdFormat
WPAD Infrared Format. For more information see IR Data Formats
void(* WPADControlSpeakerCallback)(WPADChan chan, int32_t status)
void(* WPADWriteMemoryCallback)(WPADChan chan, int32_t status)
Callback called when data is attempted to be written to controller memory.
void WPADiClearQueue(WPADiQueue *queue)
Clears all elements from queue.
void WPADSetGameTitleUtf16(uint16_t *title)
Sets game title for all connected controllers.
void WPADEnableURCC(BOOL enable)
Enables/disables Wii U Pro Controller support.
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.
int32_t WPADiHIDParser(WPADChan channel, uint8_t *hidData)
Parses incoming HID report data for a controller.
WPADProButton
Pro Controller buttons.
BOOL WPADGetPowerSaveMode(WPADChan chan)
@ WPAD_BUTTON_DOWN
The down button of the D-pad.
@ WPAD_BUTTON_A
The A button.
@ WPAD_BUTTON_C
The C button on the Nunchuk extension.
@ WPAD_BUTTON_LEFT
The left button of the D-pad.
@ WPAD_BUTTON_2
The 2 button.
@ WPAD_BUTTON_MINUS
The - button.
@ WPAD_BUTTON_Z
The Z button on the Nunchuk extension.
@ WPAD_BUTTON_UP
The up button of the D-pad.
@ WPAD_BUTTON_PLUS
The + button.
@ WPAD_BUTTON_1
The 1 button.
@ WPAD_BUTTON_RIGHT
The right button of the D-pad.
@ WPAD_BUTTON_HOME
The HOME button.
@ WPAD_BUTTON_B
The B button.
@ WPAD_FMT_DRUM
Guitar Hero World Tour Drums.
@ WPAD_FMT_TAIKO
Wii Remote, Taiko no Testsujin TaTaCon.
@ WPAD_FMT_CLASSIC
Wii Remote buttons, Classic Controller.
@ WPAD_FMT_CORE_ACC
Wii Remote buttons and accelerometer.
@ WPAD_FMT_CORE
Wii Remote buttons.
@ WPAD_FMT_NUNCHUK
Wii Remote buttons, Nunchuk.
@ WPAD_FMT_CLASSIC_ACC
Wii Remote buttons, accelerometer, Classic Controller.
@ WPAD_FMT_CORE_ACC_DPD_FULL
Wii Remote buttons, accelerometer and IR pos with bounds.
@ WPAD_FMT_PRO_CONTROLLER
Wii U Pro Controller.
@ WPAD_FMT_BALANCE_BOARD
Wii Balance Board.
@ WPAD_FMT_NUNCHUK_ACC
Wii Remote buttons, accelerometer, Nunchuk.
@ WPAD_FMT_CORE_ACC_DPD
Wii Remote buttons, accelerometer and IR pos.
@ WPAD_FMT_MPLUS
Wii Remote buttons, accelerometer, IR pos, Motion Plus gyroscope.
@ WPAD_FMT_GUITAR
Guitar Hero Guitar.
@ WPAD_FMT_TRAIN
Wii Remote, Densha De GO! Shinkansen Controller.
@ WPAD_FMT_CLASSIC_ACC_DPD
Wii Remote buttons, accelerometer, IR pos, Classic Controller.
@ WPAD_FMT_NUNCHUK_ACC_DPD
Wii Remote buttons, accelerometer, IR pos, Nunchuk.
@ WPAD_PERIPHERAL_SPACE_EXTENSION
Any extension other than Motion Plus.
@ WPAD_PERIPHERAL_SPACE_SPEAKER
@ WPAD_PERIPHERAL_SPACE_DPD
Infrared.
@ WPAD_PERIPHERAL_SPACE_MOTIONPLUS
@ WPAD_CLASSIC_BUTTON_UP
The up button of the D-pad.
@ WPAD_CLASSIC_BUTTON_R
The R button.
@ WPAD_CLASSIC_BUTTON_ZL
The ZL button.
@ WPAD_CLASSIC_STICK_R_EMULATION_DOWN
The emulated down button on the right stick.
@ WPAD_CLASSIC_BUTTON_DOWN
The down button of the D-pad.
@ WPAD_CLASSIC_BUTTON_A
The A button.
@ WPAD_CLASSIC_BUTTON_ZR
The ZR button.
@ WPAD_CLASSIC_STICK_R_EMULATION_UP
The emulated up button on the right stick.
@ WPAD_CLASSIC_STICK_L_EMULATION_UP
The emulated up button on the left stick.
@ WPAD_CLASSIC_BUTTON_B
The B button.
@ WPAD_CLASSIC_BUTTON_Y
The Y button.
@ WPAD_CLASSIC_STICK_L_EMULATION_LEFT
The emulated left button on the left stick.
@ WPAD_CLASSIC_STICK_R_EMULATION_RIGHT
The emulated right button on the right stick.
@ WPAD_CLASSIC_STICK_L_EMULATION_RIGHT
The emulated right button on the left stick.
@ WPAD_CLASSIC_BUTTON_PLUS
The + button.
@ WPAD_CLASSIC_BUTTON_RIGHT
The right button of the D-pad.
@ WPAD_CLASSIC_STICK_R_EMULATION_LEFT
The emulated left button on the right stick.
@ WPAD_CLASSIC_BUTTON_LEFT
The left button of the D-pad.
@ WPAD_CLASSIC_BUTTON_L
The L button.
@ WPAD_CLASSIC_BUTTON_MINUS
The - button.
@ WPAD_CLASSIC_BUTTON_X
The X button.
@ WPAD_CLASSIC_STICK_L_EMULATION_DOWN
The emulated down button on the left stick.
@ WPAD_CLASSIC_BUTTON_HOME
The HOME button.
@ WPAD_EXT_MPLUS_CLASSIC
Motion Plus with Classic Controller.
@ WPAD_EXT_MPLUS_NUNCHUK
Motion Plus with Nunchuk.
@ WPAD_EXT_DEV_NOT_FOUND
No controller found.
@ WPAD_EXT_MPLUS
Motion Plus.
@ WPAD_EXT_UNKNOWN
Extension unknown.
@ WPAD_EXT_NUNCHUK
Nunchuk.
@ WPAD_EXT_CLASSIC
Classic Controller.
@ WPAD_EXT_PRO_CONTROLLER
Pro Controller.
@ WPAD_EXT_CORE
Wii Remote with no extension.
@ WPAD_SPEAKER_CMD_MUTE
Mutes speaker.
@ WPAD_SPEAKER_CMD_ON_ALT
Does the same as WPAD_SPEAKER_CMD_ON.
@ WPAD_SPEAKER_CMD_UNMUTE
Unmutes speaker.
@ WPAD_SPEAKER_CMD_OFF
Deinitializes and turns off speaker.
@ WPAD_SPEAKER_CMD_PLAY
Allows sound to play.
@ WPAD_SPEAKER_CMD_ON
Turns on and initializes speaker to use 4-bit Yamaha ADPCM data format at 3000 Hz.
@ WPAD_MPLS_MODE_MPLS_CLASSIC
Classic passthrough mode.
@ WPAD_MPLS_MODE_MPLS_ONLY
MotionPlus exclusive mode.
@ WPAD_MPLS_MODE_MPLS_NUNCHUK
Nunchuk passthrough mode.
@ 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_UP
The emulated up button on the Nunchuk stick or the up 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_BUTTON_Z
The Z button.
@ WPAD_NUNCHUK_BUTTON_C
The C button.
@ 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_DPD_FMT_NONE
Disable IR.
@ WPAD_PRO_BUTTON_PLUS
The + button.
@ WPAD_PRO_BUTTON_B
The B button.
@ WPAD_PRO_RESERVED
Reserved.
@ WPAD_PRO_BUTTON_DOWN
The down button of the D-pad.
@ WPAD_PRO_BUTTON_X
The X button.
@ WPAD_PRO_BUTTON_HOME
The HOME button.
@ WPAD_PRO_BUTTON_Y
The Y button.
@ WPAD_PRO_STICK_R_EMULATION_UP
The emulated up button on the right stick.
@ WPAD_PRO_STICK_L_EMULATION_UP
The emulated up button on the left stick.
@ WPAD_PRO_BUTTON_LEFT
The left button of the D-pad.
@ WPAD_PRO_STICK_L_EMULATION_DOWN
The emulated down button on the left stick.
@ WPAD_PRO_BUTTON_MINUS
The - button.
@ WPAD_PRO_STICK_R_EMULATION_DOWN
The emulated down button on the right stick.
@ WPAD_PRO_TRIGGER_R
The right trigger button.
@ WPAD_PRO_STICK_R_EMULATION_LEFT
The emulated left button on the right stick.
@ WPAD_PRO_STICK_L_EMULATION_RIGHT
The emulated right button on the left stick.
@ WPAD_PRO_BUTTON_STICK_L
The left stick button.
@ WPAD_PRO_STICK_L_EMULATION_LEFT
The emulated left button on the left stick.
@ WPAD_PRO_TRIGGER_L
The left trigger button.
@ WPAD_PRO_BUTTON_STICK_R
The right stick button.
@ WPAD_PRO_TRIGGER_ZL
The ZL button.
@ WPAD_PRO_TRIGGER_ZR
The ZR button.
@ WPAD_PRO_BUTTON_UP
The up button of the D-pad.
@ WPAD_PRO_STICK_R_EMULATION_RIGHT
The emulated right button on the right stick.
@ WPAD_PRO_BUTTON_A
The A button.
@ WPAD_PRO_BUTTON_RIGHT
The right button of the D-pad.
Bluetooth device address.