RetroArch
Classes | Macros | Typedefs | Functions | Variables
joypad_connection.h File Reference
#include <stdint.h>
#include <stddef.h>
#include <libretro.h>
#include <retro_miscellaneous.h>
#include <retro_endianness.h>
#include "../input_driver.h"
Include dependency graph for joypad_connection.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  joypad_connection
 
struct  pad_connection_interface
 

Macros

#define VID_NONE   0x0000
 
#define VID_NINTENDO   swap_if_big16(0x057e)
 
#define VID_SONY   swap_if_big16(0x054c)
 
#define VID_MICRONTEK   swap_if_big16(0x0079)
 
#define VID_PCS   swap_if_big16(0x0810)
 
#define VID_PS3_CLONE   swap_if_big16(0x0313)
 
#define VID_SNES_CLONE   swap_if_big16(0x081f)
 
#define PID_NONE   0x0000
 
#define PID_NINTENDO_PRO   swap_if_big16(0x0330)
 
#define PID_SONY_DS3   swap_if_big16(0x0268)
 
#define PID_SONY_DS4   swap_if_big16(0x05c4)
 
#define PID_DS3_CLONE   swap_if_big16(0x20d6)
 
#define PID_SNES_CLONE   swap_if_big16(0xe401)
 
#define PID_MICRONTEK_NES   swap_if_big16(0x0011)
 
#define PID_NINTENDO_GCA   swap_if_big16(0x0337)
 
#define PID_PCS_PS2PSX   swap_if_big16(0x0001)
 
#define PID_PCS_PSX2PS3   swap_if_big16(0x0003)
 

Typedefs

typedef struct pad_connection_interface pad_connection_interface_t
 

Functions

int32_t pad_connection_pad_init (joypad_connection_t *joyconn, const char *name, uint16_t vid, uint16_t pid, void *data, hid_driver_t *driver)
 
joypad_connection_tpad_connection_init (unsigned pads)
 
void pad_connection_destroy (joypad_connection_t *joyconn)
 
void pad_connection_pad_deinit (joypad_connection_t *joyconn, uint32_t idx)
 
void pad_connection_packet (joypad_connection_t *joyconn, uint32_t idx, uint8_t *data, uint32_t length)
 
void pad_connection_get_buttons (joypad_connection_t *joyconn, unsigned idx, input_bits_t *state)
 
int16_t pad_connection_get_axis (joypad_connection_t *joyconn, unsigned idx, unsigned i)
 
bool pad_connection_has_interface (joypad_connection_t *joyconn, unsigned idx)
 
int pad_connection_find_vacant_pad (joypad_connection_t *joyconn)
 
bool pad_connection_rumble (joypad_connection_t *s, unsigned pad, enum retro_rumble_effect effect, uint16_t strength)
 
const char * pad_connection_get_name (joypad_connection_t *joyconn, unsigned idx)
 

Variables

pad_connection_interface_t pad_connection_wii
 
pad_connection_interface_t pad_connection_wiiupro
 
pad_connection_interface_t pad_connection_ps3
 
pad_connection_interface_t pad_connection_ps4
 
pad_connection_interface_t pad_connection_snesusb
 
pad_connection_interface_t pad_connection_nesusb
 
pad_connection_interface_t pad_connection_wiiugca
 
pad_connection_interface_t pad_connection_ps2adapter
 
pad_connection_interface_t pad_connection_psxadapter
 

Macro Definition Documentation

◆ PID_DS3_CLONE

#define PID_DS3_CLONE   swap_if_big16(0x20d6)

◆ PID_MICRONTEK_NES

#define PID_MICRONTEK_NES   swap_if_big16(0x0011)

◆ PID_NINTENDO_GCA

#define PID_NINTENDO_GCA   swap_if_big16(0x0337)

◆ PID_NINTENDO_PRO

#define PID_NINTENDO_PRO   swap_if_big16(0x0330)

◆ PID_NONE

#define PID_NONE   0x0000

◆ PID_PCS_PS2PSX

#define PID_PCS_PS2PSX   swap_if_big16(0x0001)

◆ PID_PCS_PSX2PS3

#define PID_PCS_PSX2PS3   swap_if_big16(0x0003)

◆ PID_SNES_CLONE

#define PID_SNES_CLONE   swap_if_big16(0xe401)

◆ PID_SONY_DS3

#define PID_SONY_DS3   swap_if_big16(0x0268)

◆ PID_SONY_DS4

#define PID_SONY_DS4   swap_if_big16(0x05c4)

◆ VID_MICRONTEK

#define VID_MICRONTEK   swap_if_big16(0x0079)

◆ VID_NINTENDO

#define VID_NINTENDO   swap_if_big16(0x057e)

◆ VID_NONE

#define VID_NONE   0x0000

◆ VID_PCS

#define VID_PCS   swap_if_big16(0x0810)

◆ VID_PS3_CLONE

#define VID_PS3_CLONE   swap_if_big16(0x0313)

◆ VID_SNES_CLONE

#define VID_SNES_CLONE   swap_if_big16(0x081f)

◆ VID_SONY

#define VID_SONY   swap_if_big16(0x054c)

Typedef Documentation

◆ pad_connection_interface_t

Function Documentation

◆ pad_connection_destroy()

void pad_connection_destroy ( joypad_connection_t joyconn)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pad_connection_find_vacant_pad()

int pad_connection_find_vacant_pad ( joypad_connection_t joyconn)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pad_connection_get_axis()

int16_t pad_connection_get_axis ( joypad_connection_t joyconn,
unsigned  idx,
unsigned  i 
)
Here is the caller graph for this function:

◆ pad_connection_get_buttons()

void pad_connection_get_buttons ( joypad_connection_t joyconn,
unsigned  idx,
input_bits_t state 
)
Here is the caller graph for this function:

◆ pad_connection_get_name()

const char* pad_connection_get_name ( joypad_connection_t joyconn,
unsigned  idx 
)
Here is the caller graph for this function:

◆ pad_connection_has_interface()

bool pad_connection_has_interface ( joypad_connection_t joyconn,
unsigned  idx 
)
Here is the caller graph for this function:

◆ pad_connection_init()

joypad_connection_t* pad_connection_init ( unsigned  pads)

Since the pad_connection_destroy() call needs to iterate through this list, we allocate pads+1 entries and use the extra spot to store a marker.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pad_connection_packet()

void pad_connection_packet ( joypad_connection_t joyconn,
uint32_t  idx,
uint8_t data,
uint32_t  length 
)
Here is the caller graph for this function:

◆ pad_connection_pad_deinit()

void pad_connection_pad_deinit ( joypad_connection_t joyconn,
uint32_t  idx 
)
Here is the caller graph for this function:

◆ pad_connection_pad_init()

int32_t pad_connection_pad_init ( joypad_connection_t joyconn,
const char *  name,
uint16_t  vid,
uint16_t  pid,
void data,
hid_driver_t driver 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pad_connection_rumble()

bool pad_connection_rumble ( joypad_connection_t s,
unsigned  pad,
enum retro_rumble_effect  effect,
uint16_t  strength 
)
Here is the caller graph for this function:

Variable Documentation

◆ pad_connection_nesusb

pad_connection_interface_t pad_connection_nesusb

◆ pad_connection_ps2adapter

pad_connection_interface_t pad_connection_ps2adapter

◆ pad_connection_ps3

pad_connection_interface_t pad_connection_ps3

◆ pad_connection_ps4

pad_connection_interface_t pad_connection_ps4

◆ pad_connection_psxadapter

pad_connection_interface_t pad_connection_psxadapter

◆ pad_connection_snesusb

pad_connection_interface_t pad_connection_snesusb

◆ pad_connection_wii

pad_connection_interface_t pad_connection_wii

◆ pad_connection_wiiugca

pad_connection_interface_t pad_connection_wiiugca

◆ pad_connection_wiiupro

pad_connection_interface_t pad_connection_wiiupro