251 WUT_PADDING_BYTES(4);
257WUT_CHECK_OFFSET(
KPADStatus, 0x18, accMagnitude);
258WUT_CHECK_OFFSET(
KPADStatus, 0x1C, accVariation);
261WUT_CHECK_OFFSET(
KPADStatus, 0x30, posDiffMagnitude);
264WUT_CHECK_OFFSET(
KPADStatus, 0x44, angleDiffMagnitude);
267WUT_CHECK_OFFSET(
KPADStatus, 0x50, distDiffMagnitude);
269WUT_CHECK_OFFSET(
KPADStatus, 0x5C, extensionType);
274WUT_CHECK_OFFSET(
KPADStatus, 0x60, nunchuk.stick);
285WUT_CHECK_OFFSET(
KPADStatus, 0x6C, classic.leftStick);
286WUT_CHECK_OFFSET(
KPADStatus, 0x74, classic.rightStick);
287WUT_CHECK_OFFSET(
KPADStatus, 0x7C, classic.leftTrigger);
288WUT_CHECK_OFFSET(
KPADStatus, 0x80, classic.rightTrigger);
293WUT_CHECK_OFFSET(
KPADStatus, 0x6C, pro.leftStick);
294WUT_CHECK_OFFSET(
KPADStatus, 0x74, pro.rightStick);
295WUT_CHECK_OFFSET(
KPADStatus, 0x7C, pro.charging);
298WUT_CHECK_OFFSET(
KPADStatus, 0x60, balance.avgTGCWeight);
299WUT_CHECK_OFFSET(
KPADStatus, 0x68, balance.weights);
300WUT_CHECK_OFFSET(
KPADStatus, 0x88, balance.avgWeights);
302WUT_CHECK_OFFSET(
KPADStatus, 0xAC, balance.calibration);
305WUT_CHECK_OFFSET(
KPADStatus, 0xBC, mplus.angles);
306WUT_CHECK_OFFSET(
KPADStatus, 0xC8, mplus.dirX);
307WUT_CHECK_OFFSET(
KPADStatus, 0xD4, mplus.dirY);
308WUT_CHECK_OFFSET(
KPADStatus, 0xE0, mplus.dirZ);
329 WUT_PADDING_BYTES(3);
uint8_t extensionType
Value from KPADExtensionType.
KPADVec2D angleDiff
Difference from previous angle.
KPADVec3D acc
Indicates the value of the acceleration sensor.
float dist
Distance to the sensor bar, in meters.
struct KPADStatus::@47 mplus
Structure to use when MotionPlus is enabled.
KPADVec2D posDiff
Difference from previous pos.
uint32_t hold
Indicates what KPADButtons are held down.
int8_t posValid
Validity of the pos field.
KPADVec2D angle
Angle: horizon vector (+x is right, +y is down.)
uint8_t format
Value from KPADDataFormat.
float angleDiffMagnitude
Magnitude of angleDiff.
KPADVec2D down
The "down" vector from accelerometer: when down.y is negative, wiimote is facing down.
uint32_t release
Indicates what KPADButtons have been released since last sample.
float distDiff
Difference from previous dist.
int8_t error
Value from KPADError.
float distDiffMagnitude
Absolute value of distDiff.
uint32_t trigger
Indicates what KPADButtons have been pressed since last sample.
float accVariation
Indicates the variation in acceleration.
float posDiffMagnitude
Magnitude of posDiff.
float accMagnitude
Indicates the magnitude of acceleration.
KPADVec2D pos
Indicates the position where the Wii Remote is pointing; positive for right and down.
WPADConnectCallback KPADConnectCallback
KPADControlMplsStatus
Status codes for KPADControlMplsCallback.
void KPADShutdown(void)
Cleans up and frees the KPAD library.
enum WPADExtensionType KPADExtensionType
Extension type.
enum WPADDataFormat KPADDataFormat
Data format.
KPADSamplingCallback KPADSetSamplingCallback(KPADChan channel, KPADSamplingCallback callback)
Same usage as , except compatible with other KPAD functions.
uint32_t KPADReadEx(KPADChan chan, KPADStatus *data, uint32_t size, KPADError *error)
Read data from the desired controller.
void KPADDisableDPD(KPADChan chan)
Disable IR pointing.
void KPADResetWbcTgcWeight(void)
Recalculate the Balance Board's TGC coefficients and zero.
KPADConnectCallback KPADSetConnectCallback(KPADChan chan, KPADConnectCallback callback)
Set a callback for when a controller connection status changes.
uint32_t KPADGetGameMaxControllers(void)
Get the maximum amount of controllers which can be connected, as reported by IOS-PAD.
enum WPADMplsMode KPADMplsMode
MotionPlus Mode.
uint32_t KPADRead(KPADChan chan, KPADStatus *data, uint32_t size)
Read data from the desired controller.
void(* KPADControlMplsCallback)(KPADChan chan, KPADControlMplsStatus status)
Callback used for KPADSetControlMplsCallback().
void KPADResetWbcZeroPoint(void)
Resets the Balance Board's zero.
uint32_t KPADGetMaxControllers(void)
Get the maximum amount of controllers which can be connected to the system.
void KPADDisableMpls(KPADChan channel)
Disables MotionPlus for the controller.
void KPADSetControlMplsCallback(KPADChan chan, KPADControlMplsCallback callback)
Set a callback for when the MotionPlus extension is configured.
enum WPADChan KPADChan
Wii Remote channel.
void KPADSetMplsWorkarea(void *buf)
Sets the extra memory KPAD will use to process MotionPlus data.
void KPADGetUnifiedWpadStatus(KPADChan chan, KPADUnifiedWpadStatus *buffer, uint32_t count)
Read a number of entries from the internal buffer.
KPADMplsMode KPADGetMplsStatus(KPADChan chan)
Get MotionPlus mode.
void KPADInit(void)
Initialises the KPAD library for use.
WPADSamplingCallback KPADSamplingCallback
void KPADInitEx(KPADUnifiedWpadStatus *buffer, uint32_t count)
Initializes the KPAD library with extra buffers.
void KPADResetMpls(KPADChan chan)
Resets the MotionPlus state.
void KPADEnableMpls(KPADChan channel, KPADMplsMode mode)
Sets MotionPlus for the controller in specified mode.
void KPADEnableDPD(KPADChan chan)
Enable IR pointing.
uint32_t KPADGetMplsWorkSize(void)
Returns the amount of memory needed for KPADSetMplsWorkarea().
int32_t KPADSetMaxControllers(uint32_t maxControllers)
Set the maximum amount of controllers which can be connected to the system.
@ KPAD_CONTROL_MPLS_STATUS_FAILED_MPLS_CLASSIC
When KPADEnableMpls(chan, WPAD_MPLS_MODE_MPLS_CLASSIC) failed.
@ KPAD_CONTROL_MPLS_STATUS_FINISHED
When MotionPlus mode was set correctly, or wiimote disconnected prematurely.
@ KPAD_CONTROL_MPLS_STATUS_FAILED_MPLS_NUNCHUK
When KPADEnableMpls(chan, WPAD_MPLS_MODE_MPLS_NUNCHUK) failed.
@ KPAD_CONTROL_MPLS_STATUS_FAILED_MPLS_ONLY
When KPADEnableMpls(chan, WPAD_MPLS_MODE_MPLS_ONLY) failed.
@ KPAD_CONTROL_MPLS_STATUS_STARTED
When KPADEnableMpls() is called.
@ KPAD_ERROR_OK
No error occurred, and data was written to the buffers.
@ KPAD_ERROR_WPAD_UNINIT
WPAD is uninitialized, shouldn't happen unless WPADShutdown() is manually called.
@ KPAD_ERROR_BUSY
KPAD channel is busy, perhaps being accessed by another thread.
@ KPAD_ERROR_NO_SAMPLES
There was no sample new data available to write.
@ KPAD_ERROR_INVALID_CONTROLLER
The requested controller or channel was invalid.
@ KPAD_ERROR_UNINITIALIZED
KPAD is uninitialized, need to call KPADInit()
A structure containing the Wii Remote data.
Storage type for the internal KPAD ring buffer.
WPADCallback WPADConnectCallback
WPADDataFormat
Data format.
WPADChan
Wii Remote channel.
void(* WPADSamplingCallback)(WPADChan channel)
WPADExtensionType
Extension type.
WPADMplsMode
MotionPlus Mode.
#define WPAD_MAX_PRESSURE_SENSORS
Classic Controller and Classic Controller Pro status.
Wii Remote + Nunchuk status.
Bullet Train controller status.