RetroArch
wpad.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6 
7 #include <wiiu/types.h>
8 
9 #define WPAD_EXT_CORE 0
10 #define WPAD_EXT_NUNCHUK 1
11 #define WPAD_EXT_CLASSIC 2
12 #define WPAD_EXT_MPLUS 5
13 #define WPAD_EXT_MPLUS_NUNCHUK 6
14 #define WPAD_EXT_MPLUS_CLASSIC 7
15 #define WPAD_EXT_PRO_CONTROLLER 31
16 
17 #define WPAD_FMT_PRO_CONTROLLER 22
18 
19 #define WPAD_BUTTON_LEFT 0x0001
20 #define WPAD_BUTTON_RIGHT 0x0002
21 #define WPAD_BUTTON_DOWN 0x0004
22 #define WPAD_BUTTON_UP 0x0008
23 #define WPAD_BUTTON_PLUS 0x0010
24 #define WPAD_BUTTON_2 0x0100
25 #define WPAD_BUTTON_1 0x0200
26 #define WPAD_BUTTON_B 0x0400
27 #define WPAD_BUTTON_A 0x0800
28 #define WPAD_BUTTON_MINUS 0x1000
29 #define WPAD_BUTTON_Z 0x2000
30 #define WPAD_BUTTON_C 0x4000
31 #define WPAD_BUTTON_HOME 0x8000
32 
33 #define WPAD_CLASSIC_BUTTON_UP 0x0001
34 #define WPAD_CLASSIC_BUTTON_LEFT 0x0002
35 #define WPAD_CLASSIC_BUTTON_ZR 0x0004
36 #define WPAD_CLASSIC_BUTTON_X 0x0008
37 #define WPAD_CLASSIC_BUTTON_A 0x0010
38 #define WPAD_CLASSIC_BUTTON_Y 0x0020
39 #define WPAD_CLASSIC_BUTTON_B 0x0040
40 #define WPAD_CLASSIC_BUTTON_ZL 0x0080
41 #define WPAD_CLASSIC_BUTTON_R 0x0200
42 #define WPAD_CLASSIC_BUTTON_PLUS 0x0400
43 #define WPAD_CLASSIC_BUTTON_HOME 0x0800
44 #define WPAD_CLASSIC_BUTTON_MINUS 0x1000
45 #define WPAD_CLASSIC_BUTTON_L 0x2000
46 #define WPAD_CLASSIC_BUTTON_DOWN 0x4000
47 #define WPAD_CLASSIC_BUTTON_RIGHT 0x8000
48 
49 #define WPAD_PRO_BUTTON_UP 0x00000001
50 #define WPAD_PRO_BUTTON_LEFT 0x00000002
51 #define WPAD_PRO_TRIGGER_ZR 0x00000004
52 #define WPAD_PRO_BUTTON_X 0x00000008
53 #define WPAD_PRO_BUTTON_A 0x00000010
54 #define WPAD_PRO_BUTTON_Y 0x00000020
55 #define WPAD_PRO_BUTTON_B 0x00000040
56 #define WPAD_PRO_TRIGGER_ZL 0x00000080
57 #define WPAD_PRO_RESERVED 0x00000100
58 #define WPAD_PRO_TRIGGER_R 0x00000200
59 #define WPAD_PRO_BUTTON_PLUS 0x00000400
60 #define WPAD_PRO_BUTTON_HOME 0x00000800
61 #define WPAD_PRO_BUTTON_MINUS 0x00001000
62 #define WPAD_PRO_TRIGGER_L 0x00002000
63 #define WPAD_PRO_BUTTON_DOWN 0x00004000
64 #define WPAD_PRO_BUTTON_RIGHT 0x00008000
65 #define WPAD_PRO_BUTTON_STICK_R 0x00010000
66 #define WPAD_PRO_BUTTON_STICK_L 0x00020000
67 
68 #define WPAD_PRO_STICK_L_EMULATION_UP 0x00200000
69 #define WPAD_PRO_STICK_L_EMULATION_DOWN 0x00100000
70 #define WPAD_PRO_STICK_L_EMULATION_LEFT 0x00040000
71 #define WPAD_PRO_STICK_L_EMULATION_RIGHT 0x00080000
72 
73 #define WPAD_PRO_STICK_R_EMULATION_UP 0x02000000
74 #define WPAD_PRO_STICK_R_EMULATION_DOWN 0x01000000
75 #define WPAD_PRO_STICK_R_EMULATION_LEFT 0x00400000
76 #define WPAD_PRO_STICK_R_EMULATION_RIGHT 0x00800000
77 
78 typedef struct WPADReadData_ {
79  u8 unknown[40];
91 
92 typedef void (* wpad_sampling_callback_t)(s32 chan);
93 typedef void (* wpad_extension_callback_t)(s32 chan, s32 status);
94 typedef void (* wpad_connect_callback_t)(s32 chan, s32 status);
95 
96 s32 WPADProbe (s32 chan, u32 * pad_type);
100 void WPADRead(s32 chan, void * data);
101 
102 #ifdef __cplusplus
103 }
104 #endif
s16 l_stick_y
Definition: wpad.h:85
int32_t s32
32bit signed integer
Definition: gctypes.h:24
s16 l_stick_x
Definition: wpad.h:84
void(* wpad_connect_callback_t)(s32 chan, s32 status)
Definition: wpad.h:94
s16 r_stick_y
Definition: wpad.h:87
Definition: wpad.h:78
u32 buttons
Definition: wpad.h:83
u8 unknown2[8]
Definition: wpad.h:88
GLboolean enable
Definition: glext.h:12027
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
Definition: ibxm.h:9
void(* wpad_sampling_callback_t)(s32 chan)
Definition: wpad.h:92
s32 WPADSetDataFormat(s32 chan, s32 format)
static uint32_t pad_type[MAX_PADS]
Definition: gx_joypad.c:103
u8 dev
Definition: wpad.h:80
u8 err
Definition: wpad.h:81
void WPADRead(s32 chan, void *data)
int16_t s16
16bit signed integer
Definition: gctypes.h:23
s16 r_stick_x
Definition: wpad.h:86
void(* wpad_extension_callback_t)(s32 chan, s32 status)
Definition: wpad.h:93
u8 fmt
Definition: wpad.h:89
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glext.h:6293
u8 unknown[40]
Definition: wpad.h:79
u8 unknown1[2]
Definition: wpad.h:82
struct WPADReadData_ WPADReadData
uint8_t u8
8bit unsigned integer
Definition: gctypes.h:17
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19
s32 WPADProbe(s32 chan, u32 *pad_type)
void WPADEnableURCC(s32 enable)
void WPADEnableWiiRemote(s32 enable)