20 #ifndef __DC_MAPLE_CONTROLLER_H
21 #define __DC_MAPLE_CONTROLLER_H
23 #include <sys/cdefs.h>
38 #define CONT_START (1<<3)
39 #define CONT_DPAD_UP (1<<4)
40 #define CONT_DPAD_DOWN (1<<5)
41 #define CONT_DPAD_LEFT (1<<6)
42 #define CONT_DPAD_RIGHT (1<<7)
45 #define CONT_X (1<<10)
46 #define CONT_D (1<<11)
47 #define CONT_DPAD2_UP (1<<12)
48 #define CONT_DPAD2_DOWN (1<<13)
49 #define CONT_DPAD2_LEFT (1<<14)
50 #define CONT_DPAD2_RIGHT (1<<15)
115 void cont_shutdown();
146 #define CONT_CAPABILITY_C (1<<0)
147 #define CONT_CAPABILITY_B (1<<1)
148 #define CONT_CAPABILITY_A (1<<2)
149 #define CONT_CAPABILITY_START (1<<3)
150 #define CONT_CAPABILITY_DPAD_UP (1<<4)
151 #define CONT_CAPABILITY_DPAD_DOWN (1<<5)
152 #define CONT_CAPABILITY_DPAD_LEFT (1<<6)
153 #define CONT_CAPABILITY_DPAD_RIGHT (1<<7)
154 #define CONT_CAPABILITY_Z (1<<8)
155 #define CONT_CAPABILITY_Y (1<<9)
156 #define CONT_CAPABILITY_X (1<<10)
157 #define CONT_CAPABILITY_D (1<<11)
158 #define CONT_CAPABILITY_DPAD2_UP (1<<12)
159 #define CONT_CAPABILITY_DPAD2_DOWN (1<<13)
160 #define CONT_CAPABILITY_DPAD2_LEFT (1<<14)
161 #define CONT_CAPABILITY_DPAD2_RIGHT (1<<15)
162 #define CONT_CAPABILITY_RTRIG (1<<16)
163 #define CONT_CAPABILITY_LTRIG (1<<17)
164 #define CONT_CAPABILITY_ANALOG_X (1<<18)
165 #define CONT_CAPABILITY_ANALOG_Y (1<<19)
166 #define CONT_CAPABILITY_ANALOG2_X (1<<20)
167 #define CONT_CAPABILITY_ANALOG2_Y (1<<21)
uint8 ltrig
Definition: controller.h:57
int joyy
Main joystick y-axis value.
Definition: controller.h:103
int joyx
Main joystick x-axis value.
Definition: controller.h:100
void cont_btn_callback(uint8 addr, uint32 btns, cont_btn_callback_t cb)
Set an automatic button press callback.
uint8 joy2y
Definition: controller.h:61
uint8 joy2x
Definition: controller.h:60
int joy2y
Secondary joystick y-axis value (if applicable).
Definition: controller.h:109
uint32 buttons
Buttons bitfield.
Definition: controller.h:91
int joy2x
Secondary joystick x-axis value (if applicable).
Definition: controller.h:106
unsigned short uint16
16-bit unsigned integer
Definition: types.h:29
uint8 joyx
Definition: controller.h:58
uint8 rtrig
Definition: controller.h:56
Definition: controller.h:54
unsigned long uint32
32-bit unsigned integer
Definition: types.h:28
int ltrig
Left trigger value.
Definition: controller.h:94
int rtrig
Right trigger value.
Definition: controller.h:97
unsigned char uint8
8-bit unsigned integer
Definition: types.h:30
uint8 joyy
Definition: controller.h:59
void(* cont_btn_callback_t)(uint8 addr, uint32 btns)
Controller automatic callback type.
Definition: controller.h:125
uint16 buttons
Definition: controller.h:55
Controller status structure.
Definition: controller.h:87