16 #define HPAD_STICK_AXIS_MIN -56
18 #define HPAD_STICK_AXIS_MAX 56
20 #define HPAD_SUBSTICK_AXIS_MIN -44
22 #define HPAD_SUBSTICK_AXIS_MAX 44
24 #define HPAD_TRIGGER_MIN 0
26 #define HPAD_TRIGGER_MAX 150
105 WUT_PADDING_BYTES(0x1);
114 WUT_CHECK_OFFSET(
HPADStatus, 0x0E, substickX);
115 WUT_CHECK_OFFSET(
HPADStatus, 0x0F, substickY);
199 static inline int32_t
uint8_t triggerR
Position of the right analog trigger.
uint8_t triggerL
Position of the left analog trigger.
BOOL active
TRUE if the adapter is active/is sending samples
int8_t substickX
X-Position of the analog substick/C-Stick.
int32_t error
Read error, 0 for success.
int32_t trigger
Indicates what HPADButtons have been pressed since last sample.
int32_t release
Indicates what HPADButtons have been released since last sample.
BOOL powerSupplyConnected
TRUE if the power supply is connected
int8_t substickY
Y-Position of the analog substick/C-Stick.
BOOL connected
TRUE if the adapeter is connected
int8_t stickX
X-Position of the analog stick.
int32_t hold
Indicates what HPADButtons are held down.
int8_t stickY
Y-Position of the analog stick.
uint8_t status
Status of the controller.
int32_t HPADShutdown(void)
Shuts down the HPAD library.
int32_t HPADResetDevice(HPADGGGGChan chan, HPADResetCallback callback)
Resets the specified GGGG Adapter.
int32_t HPADControlMotor(HPADChan chan, HPADMotorCommand command)
Sends a motor/rumble command to the specified HPAD channel.
HPADConnectCallback HPADSetConnectCallback(HPADChan chan, HPADConnectCallback callback)
Sets a callback for once the specified HPAD channel is connected.
int32_t HPADGetGGGGStatus(HPADGGGGChan chan, HPADGGGGStatus *status)
Get the status of the specified GGGG channel (GC Adapter).
HPADPowerSupplyCallback HPADSetPowerSupplyCallback(HPADGGGGChan chan, HPADPowerSupplyCallback callback)
Sets a callback for once the power supply of the specified GGGG Adapter is connected.
HPADGGGGConnectCallback HPADSetGgggConnectCallback(HPADGGGGChan chan, HPADGGGGConnectCallback callback)
Sets a callback for once the specified GGGG Adapter is connected.
void(* HPADPowerSupplyCallback)(HPADGGGGChan chan, BOOL connected)
int32_t HPADInit(void)
Initializes the HPAD library.
void(* HPADResetCallback)(HPADGGGGChan chan, int32_t status)
int32_t RPLWRAP() HPADRead(HPADChan chan, HPADStatus *buffers, int32_t count)
Reads status buffers from a specified HPAD channel.
HPADSamplingCallback HPADSetSamplingCallback(HPADGGGGChan chan, HPADSamplingCallback callback)
Sets a callback for once a sample is received from the specified GGGG Adapter.
void(* HPADConnectCallback)(HPADChan chan, int32_t status)
void(* HPADSamplingCallback)(HPADGGGGChan chan)
int32_t HPADRecalibrate(HPADChan chan)
Invalidates calibration data of the specified HPAD channel.
void(* HPADGGGGConnectCallback)(HPADGGGGChan chan, BOOL connected)
@ HPAD_MOTOR_COMMAND_STOP_HARD
@ HPAD_MOTOR_COMMAND_RUMBLE
@ HPAD_MOTOR_COMMAND_STOP
@ HPAD_STICK_EMULATION_LEFT
@ HPAD_SUBSTICK_EMULATION_LEFT
@ HPAD_STICK_EMULATION_RIGHT
@ HPAD_SUBSTICK_EMULATION_UP
@ HPAD_SUBSTICK_EMULATION_RIGHT
@ HPAD_SUBSTICK_EMULATION_DOWN
@ HPAD_STICK_EMULATION_UP
@ HPAD_STICK_EMULATION_DOWN
@ HPAD_GGGG_CHAN_1
Adapter Channel 1.
@ HPAD_GGGG_CHAN_0
Adapter Channel 0.