96 WUT_UNKNOWN_BYTES(3 * 4);
101 WUT_UNKNOWN_BYTES(8 * 4);
175 WUT_UNKNOWN_BYTES(20 * 4);
178 WUT_UNKNOWN_BYTES(16 * 4);
184 WUT_CHECK_OFFSET(
KPADStatus, 0x18, accMagnitude);
185 WUT_CHECK_OFFSET(
KPADStatus, 0x1C, accVariation);
188 WUT_CHECK_OFFSET(
KPADStatus, 0x5C, extensionType);
193 WUT_CHECK_OFFSET(
KPADStatus, 0x60, nunchuck.stick);
204 WUT_CHECK_OFFSET(
KPADStatus, 0x6C, classic.leftStick);
205 WUT_CHECK_OFFSET(
KPADStatus, 0x74, classic.rightStick);
206 WUT_CHECK_OFFSET(
KPADStatus, 0x7C, classic.leftTrigger);
207 WUT_CHECK_OFFSET(
KPADStatus, 0x80, classic.rightTrigger);
212 WUT_CHECK_OFFSET(
KPADStatus, 0x6C, pro.leftStick);
213 WUT_CHECK_OFFSET(
KPADStatus, 0x74, pro.rightStick);
214 WUT_CHECK_OFFSET(
KPADStatus, 0x7C, pro.charging);
215 WUT_CHECK_OFFSET(
KPADStatus, 0x80, pro.wired);
uint8_t extensionType
Value from KPADExtensionType.
KPADVec3D acc
Indicates the value of the acceleration sensor.
uint32_t hold
Indicates what KPADButtons are held down.
int8_t posValid
Validity of the result.
uint8_t format
Value from KPADDataFormat.
uint32_t release
Indicates what KPADButtons have been released since last sample.
int8_t error
Value from KPADError.
uint32_t trigger
Indicates what KPADButtons have been pressed since last sample.
float accVariation
Indicates the variation in acceleration.
float accMagnitude
Indicates the magnitude of acceleration.
KPADVec2D pos
Indicates the position where the Wii Remote is pointing.
WPADConnectCallback KPADConnectCallback
void KPADShutdown()
Cleans up and frees the KPAD library.
enum WPADExtensionType KPADExtensionType
Extension type.
enum WPADDataFormat KPADDataFormat
Data format.
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.
void KPADInit()
Initialises the KPAD library for use.
uint32_t KPADGetMaxControllers(void)
Get the maximum amount of controllers which can be connected to the system.
enum WPADChan KPADChan
Wii Remote channel.
int32_t KPADRead(KPADChan chan, KPADStatus *data, uint32_t size)
Read data from the desired controller.
int32_t KPADReadEx(KPADChan chan, KPADStatus *data, uint32_t size, KPADError *error)
Read data from the desired controller.
int32_t KPADSetMaxControllers(uint32_t maxControllers)
Set the maximum amount of controllers which can be connected to the system.
@ 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 conataining the Wii Remote data.
WPADDataFormat
Data format.
WPADChan
Wii Remote channel.
WPADExtensionType
Extension type.
void(* WPADConnectCallback)(WPADChan chan, int32_t status)