KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Definitions for using the controller device. More...
Go to the source code of this file.
Data Structures | |
struct | cont_state_t |
Controller state structure. More... | |
Macros | |
#define | CONT_C (1<<0) |
C button Mask. | |
#define | CONT_B (1<<1) |
B button Mask. | |
#define | CONT_A (1<<2) |
A button Mask. | |
#define | CONT_START (1<<3) |
Start button Mask. | |
#define | CONT_DPAD_UP (1<<4) |
Main Dpad Up button Mask. | |
#define | CONT_DPAD_DOWN (1<<5) |
Main Dpad Down button Mask. | |
#define | CONT_DPAD_LEFT (1<<6) |
Main Dpad Left button Mask. | |
#define | CONT_DPAD_RIGHT (1<<7) |
Main Dpad right button Mask. | |
#define | CONT_Z (1<<8) |
Z button Mask. | |
#define | CONT_Y (1<<9) |
Y button Mask. | |
#define | CONT_X (1<<10) |
X button Mask. | |
#define | CONT_D (1<<11) |
D button Mask. | |
#define | CONT_DPAD2_UP (1<<12) |
Secondary Dpad Up button Mask. | |
#define | CONT_DPAD2_DOWN (1<<13) |
Secondary Dpad Down button Mask. | |
#define | CONT_DPAD2_LEFT (1<<14) |
Secondary Dpad Left button Mask. | |
#define | CONT_DPAD2_RIGHT (1<<15) |
Secondary Dpad Right button Mask. | |
#define | CONT_RESET_BUTTONS (CONT_A | CONT_B | CONT_X | CONT_Y | CONT_START) |
Controller buttons for standard reset action. | |
#define | CONT_CAPABILITY_C (1<<24) |
C button capability mask. | |
#define | CONT_CAPABILITY_B (1<<25) |
B button capability mask. | |
#define | CONT_CAPABILITY_A (1<<26) |
A button capability mask. | |
#define | CONT_CAPABILITY_START (1<<27) |
Start button capability mask. | |
#define | CONT_CAPABILITY_DPAD_UP (1<<28) |
First Dpad up capability mask. | |
#define | CONT_CAPABILITY_DPAD_DOWN (1<<29) |
First Dpad down capability mask. | |
#define | CONT_CAPABILITY_DPAD_LEFT (1<<30) |
First Dpad left capability mask. | |
#define | CONT_CAPABILITY_DPAD_RIGHT (1<<31) |
First Dpad right capability mask. | |
#define | CONT_CAPABILITY_Z (1<<16) |
Z button capability mask. | |
#define | CONT_CAPABILITY_Y (1<<17) |
Y button capability mask. | |
#define | CONT_CAPABILITY_X (1<<18) |
X button capability mask. | |
#define | CONT_CAPABILITY_D (1<<19) |
D button capability mask. | |
#define | CONT_CAPABILITY_DPAD2_UP (1<<20) |
Second Dpad up capability mask. | |
#define | CONT_CAPABILITY_DPAD2_DOWN (1<<21) |
Second Dpad down capability mask. | |
#define | CONT_CAPABILITY_DPAD2_LEFT (1<<22) |
Second Dpad left capability mask. | |
#define | CONT_CAPABILITY_DPAD2_RIGHT (1<<23) |
Second Dpad right capability mask. | |
#define | CONT_CAPABILITY_RTRIG (1<<8) |
Right trigger capability mask. | |
#define | CONT_CAPABILITY_LTRIG (1<<9) |
Left trigger capability mask. | |
#define | CONT_CAPABILITY_ANALOG_X (1<<10) |
First analog X axis capability mask. | |
#define | CONT_CAPABILITY_ANALOG_Y (1<<11) |
First analog Y axis capability mask. | |
#define | CONT_CAPABILITY_ANALOG2_X (1<<12) |
Second analog X axis capability mask. | |
#define | CONT_CAPABILITY_ANALOG2_Y (1<<13) |
Second analog Y axis capability mask. | |
#define | CONT_CAPABILITIES_STANDARD_BUTTONS |
Standard button (A, B, X, Y, Start) controller capabilities. | |
#define | CONT_CAPABILITIES_DPAD |
Directional pad (up, down, left right) controller capabilities. | |
#define | CONT_CAPABILITIES_ANALOG |
Analog stick (X, Y axes) controller capabilities. | |
#define | CONT_CAPABILITIES_TRIGGERS |
Trigger (L, R lever) controller capabilities. | |
#define | CONT_CAPABILITIES_EXTENDED_BUTTONS |
Extended button (C, Z) controller capabilities. | |
#define | CONT_CAPABILITIES_SECONDARY_DPAD |
Secondary directional pad (up, down, left, right) controller capabilities. | |
#define | CONT_CAPABILITIES_SECONDARY_ANALOG |
Secondary analog stick (X, Y axes) controller capabilities. | |
#define | CONT_CAPABILITIES_DUAL_DPAD |
Both directional pads (up, down, left right) controller capabilities. | |
#define | CONT_CAPABILITIES_DUAL_ANALOG |
Both analog sticks (X, Y axes) controller capabilities. | |
#define | CONT_TYPE_STANDARD_CONTROLLER |
Standard controller type. | |
#define | CONT_TYPE_DUAL_ANALOG_CONTROLLER |
Dual analog controller type. | |
#define | CONT_TYPE_ASCII_PAD |
ASCII fighting pad controller type. | |
#define | CONT_TYPE_ARCADE_STICK |
Arcade stick controller type. | |
#define | CONT_TYPE_TWIN_STICK |
Twin stick joystick controller type. | |
#define | CONT_TYPE_ASCII_MISSION_STICK |
ASCII Mission Stick controller type. | |
#define | CONT_TYPE_RACING_CONTROLLER |
Racing wheel/controller type. | |
#define | CONT_TYPE_MARACAS |
Samba De Amigo maraca controller type. | |
#define | CONT_TYPE_DANCE_MAT |
Dance Dance Revolution mat controller type. | |
#define | CONT_TYPE_FISHING_ROD |
Fishing rod controller type. | |
#define | CONT_TYPE_POP_N_MUSIC |
Pop'n'Music controller type. | |
#define | CONT_TYPE_DENSHA_DE_GO |
Densha de Go! controller type. | |
Typedefs | |
typedef void(* | cont_btn_callback_t) (uint8_t addr, uint32_t btns) |
Controller automatic callback type. | |
Functions | |
int | cont_btn_callback (uint8_t addr, uint32_t btns, cont_btn_callback_t cb) |
Set an automatic button press callback. | |
int | cont_has_capabilities (const struct maple_device *cont, uint32_t capabilities) |
Check for controller capabilities. | |
int | cont_is_type (const struct maple_device *cont, uint32_t type) |
Check for controller type. | |
Definitions for using the controller device.
This file contains the definitions needed to access the Maple controller device. Obviously, this corresponds to the MAPLE_FUNC_CONTROLLER function code.