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

Go to the source code of this file.

Data Structures

struct  KPADVec2D
 2D vector. More...
 
struct  KPADVec3D
 3D vector. More...
 
struct  KPADStatus
 A structure containing the Wii Remote data. More...
 
union  KPADStatus.__unnamed46__
 Extension data, check with extensionType to see what is valid to read. More...
 
struct  KPADStatus.__unnamed46__.nunchuk
 Structure to use when extension type is set to WPAD_EXT_NUNCHUK. More...
 
struct  KPADStatus.__unnamed46__.classic
 Structure to use when extension type is set to WPAD_EXT_CLASSIC. More...
 
struct  KPADStatus.__unnamed46__.pro
 Structure to use when extension type is set to WPAD_EXT_PRO_CONTROLLER. More...
 

Typedefs

typedef enum WPADChan KPADChan
 Wii Remote channel. More...
 
typedef enum WPADDataFormat KPADDataFormat
 Data format. More...
 
typedef enum WPADExtensionType KPADExtensionType
 Extension type. More...
 
typedef enum WPADMplsMode KPADMplsMode
 MotionPlus Mode. More...
 
typedef struct KPADStatus KPADStatus
 
typedef struct KPADVec2D KPADVec2D
 
typedef struct KPADVec3D KPADVec3D
 
typedef enum KPADError KPADError
 Error. More...
 
typedef WPADConnectCallback KPADConnectCallback
 

Enumerations

enum  KPADError {
  KPAD_ERROR_OK = 0 ,
  KPAD_ERROR_NO_SAMPLES = -1 ,
  KPAD_ERROR_INVALID_CONTROLLER = -2 ,
  KPAD_ERROR_WPAD_UNINIT = -3 ,
  KPAD_ERROR_BUSY = -4 ,
  KPAD_ERROR_UNINITIALIZED = -5
}
 Error. More...
 

Functions

void KPADInit ()
 Initialises the KPAD library for use. More...
 
void KPADShutdown ()
 Cleans up and frees the KPAD library. More...
 
int32_t KPADRead (KPADChan chan, KPADStatus *data, uint32_t size)
 Read data from the desired controller. More...
 
int32_t KPADReadEx (KPADChan chan, KPADStatus *data, uint32_t size, KPADError *error)
 Read data from the desired controller. More...
 
int32_t KPADSetMaxControllers (uint32_t maxControllers)
 Set the maximum amount of controllers which can be connected to the system. More...
 
uint32_t KPADGetMaxControllers (void)
 Get the maximum amount of controllers which can be connected to the system. More...
 
uint32_t KPADGetGameMaxControllers (void)
 Get the maximum amount of controllers which can be connected, as reported by IOS-PAD. More...
 
KPADConnectCallback KPADSetConnectCallback (KPADChan chan, KPADConnectCallback callback)
 Set a callback for when a controller connection status changes. More...
 
void KPADEnableMpls (KPADChan channel, KPADMplsMode mode)
 Sets MotionPlus for the controller in specified mode. More...
 
void KPADDisableMpls (KPADChan channel)
 Disables MotionPlus for the controller. More...
 
KPADMplsMode KPADGetMplsStatus (KPADChan chan)
 Get MotionPlus mode. More...
 
void KPADEnableDPD (KPADChan chan)
 Enable IR pointing. More...
 
void KPADDisableDPD (KPADChan chan)
 Disable IR pointing. More...