![]() |
libdragon
|
Joypad internal. More...
Go to the source code of this file.
Data Structures | |
struct | joypad_gcn_origin_t |
Joypad GameCube controller origins structure. More... | |
struct | joypad_device_cold_t |
"Cold" (non-volatile) Joypad device structure. More... | |
struct | joypad_device_hot_t |
"Hot" (interrupt-driven) Joypad device structure. More... | |
Macros | |
#define | ASSERT_JOYPAD_PORT_VALID(port) assert((port) >= 0 && (port) < JOYPAD_PORT_COUNT) |
Convenience macro to validate a Joypad port number. | |
#define | JOYPAD_GCN_ORIGIN_INIT ((joypad_gcn_origin_t){ 127, 127, 127, 127, 0, 0 }) |
Initial state for GameCube controller origins. | |
#define | CLAMP_ANALOG_STICK(value) CLAMP((int)(value), -127, 127) |
Ensure value is in range of an analog stick axis. | |
#define | CLAMP_ANALOG_TRIGGER(value) CLAMP((int)(value), 0, 255) |
Ensure value is in range of an analog trigger. | |
Joypad raw 2D byte bitmasks | |
#define | JOYPAD_RAW_2D_RIGHT (1<<0) |
Joypad raw 2D right bitmask. | |
#define | JOYPAD_RAW_2D_LEFT (1<<1) |
Joypad raw 2D left bitmask. | |
#define | JOYPAD_RAW_2D_DOWN (1<<2) |
Joypad raw 2D down bitmask. | |
#define | JOYPAD_RAW_2D_UP (1<<3) |
Joypad raw 2D up bitmask. | |
Enumerations | |
enum | joypad_rumble_method_t { JOYPAD_RUMBLE_METHOD_NONE = 0 , JOYPAD_RUMBLE_METHOD_N64_RUMBLE_PAK , JOYPAD_RUMBLE_METHOD_GCN_CONTROLLER } |
Joypad rumble methods enumeration. More... | |
Functions | |
joypad_inputs_t | joypad_read_n64_inputs (joypad_port_t port) |
Read the inputs from a Nintendo 64 controller synchronously. | |
int | joypad_get_accessory_state (joypad_port_t port) |
Get the Joypad accessory state for a Joypad port. | |
int | joypad_get_accessory_error (joypad_port_t port) |
Get the Joypad accessory error for a Joypad port. | |
Variables | |
volatile joybus_identifier_t | joypad_identifiers_hot [JOYPAD_PORT_COUNT] |
Joypad identifiers for each port. | |
volatile joypad_device_hot_t | joypad_devices_hot [JOYPAD_PORT_COUNT] |
Joypad "hot" devices for each port. | |
volatile joypad_gcn_origin_t | joypad_origins_hot [JOYPAD_PORT_COUNT] |
Joypad origins for each port. | |
volatile joypad_accessory_t | joypad_accessories_hot [JOYPAD_PORT_COUNT] |
Joypad accessories for each port. | |
Joypad internal.