wut  v1.7.0
Wii U Toolchain
Data Structures | Macros | Typedefs | Enumerations | Functions
hpad.h File Reference
#include <wut.h>
Include dependency graph for hpad.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  HPADStatus
 
struct  HPADGGGGStatus
 

Macros

#define HPAD_STICK_AXIS_MIN   -56
 The minimum value of the stick axis. More...
 
#define HPAD_STICK_AXIS_MAX   56
 The maximum value of the stick axis. More...
 
#define HPAD_SUBSTICK_AXIS_MIN   -44
 The minimum value of the substick axis. More...
 
#define HPAD_SUBSTICK_AXIS_MAX   44
 The maximum value of the substick axis. More...
 
#define HPAD_TRIGGER_MIN   0
 The minimum value of the trigger. More...
 
#define HPAD_TRIGGER_MAX   150
 The maximum value of the trigger. More...
 

Typedefs

typedef struct HPADStatus HPADStatus
 
typedef struct HPADGGGGStatus HPADGGGGStatus
 
typedef enum HPADChan HPADChan
 
typedef enum HPADGGGGChan HPADGGGGChan
 
typedef enum HPADButtons HPADButtons
 
typedef enum HPADMotorCommand HPADMotorCommand
 
typedef void(* HPADConnectCallback) (HPADChan chan, int32_t status)
 
typedef void(* HPADGGGGConnectCallback) (HPADGGGGChan chan, BOOL connected)
 
typedef void(* HPADPowerSupplyCallback) (HPADGGGGChan chan, BOOL connected)
 
typedef void(* HPADSamplingCallback) (HPADGGGGChan chan)
 
typedef void(* HPADResetCallback) (HPADGGGGChan chan, int32_t status)
 

Enumerations

enum  HPADChan {
  HPAD_CHAN_0 = 0 ,
  HPAD_CHAN_1 = 1 ,
  HPAD_CHAN_2 = 2 ,
  HPAD_CHAN_3 = 3 ,
  HPAD_CHAN_4 = 4 ,
  HPAD_CHAN_5 = 5 ,
  HPAD_CHAN_6 = 6 ,
  HPAD_CHAN_7 = 7
}
 
enum  HPADGGGGChan {
  HPAD_GGGG_CHAN_0 = 0 ,
  HPAD_GGGG_CHAN_1 = 1
}
 
enum  HPADButtons {
  HPAD_BUTTON_A = 0x0001 ,
  HPAD_BUTTON_B = 0x0002 ,
  HPAD_BUTTON_X = 0x0004 ,
  HPAD_BUTTON_Y = 0x0008 ,
  HPAD_BUTTON_LEFT = 0x0010 ,
  HPAD_BUTTON_RIGHT = 0x0020 ,
  HPAD_BUTTON_DOWN = 0x0040 ,
  HPAD_BUTTON_UP = 0x0080 ,
  HPAD_BUTTON_START = 0x0100 ,
  HPAD_TRIGGER_Z = 0x0200 ,
  HPAD_TRIGGER_R = 0x0400 ,
  HPAD_TRIGGER_L = 0x0800 ,
  HPAD_STICK_EMULATION_LEFT = 0x00001000 ,
  HPAD_STICK_EMULATION_RIGHT = 0x00002000 ,
  HPAD_STICK_EMULATION_DOWN = 0x00004000 ,
  HPAD_STICK_EMULATION_UP = 0x00008000 ,
  HPAD_SUBSTICK_EMULATION_LEFT = 0x00010000 ,
  HPAD_SUBSTICK_EMULATION_RIGHT = 0x00020000 ,
  HPAD_SUBSTICK_EMULATION_DOWN = 0x00040000 ,
  HPAD_SUBSTICK_EMULATION_UP = 0x00080000
}
 
enum  HPADMotorCommand {
  HPAD_MOTOR_COMMAND_STOP = 0 ,
  HPAD_MOTOR_COMMAND_RUMBLE = 1 ,
  HPAD_MOTOR_COMMAND_STOP_HARD = 2
}
 

Functions

int32_t HPADInit (void)
 Initializes the HPAD library. More...
 
int32_t HPADShutdown (void)
 Shuts down the HPAD library. More...
 
int32_t RPLWRAP() HPADRead (HPADChan chan, HPADStatus *buffers, int32_t count)
 Reads status buffers from a specified HPAD channel. More...
 
int32_t HPADControlMotor (HPADChan chan, HPADMotorCommand command)
 Sends a motor/rumble command to the specified HPAD channel. More...
 
int32_t HPADRecalibrate (HPADChan chan)
 Invalidates calibration data of the specified HPAD channel. More...
 
HPADConnectCallback HPADSetConnectCallback (HPADChan chan, HPADConnectCallback callback)
 Sets a callback for once the specified HPAD channel is connected. More...
 
int32_t HPADGetGGGGStatus (HPADGGGGChan chan, HPADGGGGStatus *status)
 Get the status of the specified GGGG channel (GC Adapter). More...
 
HPADGGGGConnectCallback HPADSetGgggConnectCallback (HPADGGGGChan chan, HPADGGGGConnectCallback callback)
 Sets a callback for once the specified GGGG Adapter is connected. More...
 
HPADPowerSupplyCallback HPADSetPowerSupplyCallback (HPADGGGGChan chan, HPADPowerSupplyCallback callback)
 Sets a callback for once the power supply of the specified GGGG Adapter is connected. More...
 
HPADSamplingCallback HPADSetSamplingCallback (HPADGGGGChan chan, HPADSamplingCallback callback)
 Sets a callback for once a sample is received from the specified GGGG Adapter. More...
 
int32_t HPADResetDevice (HPADGGGGChan chan, HPADResetCallback callback)
 Resets the specified GGGG Adapter. More...