RetroArch
Classes | Macros | Functions | Variables
connect_psxadapter.c File Reference
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <boolean.h>
#include "joypad_connection.h"
#include "../input_defines.h"
Include dependency graph for connect_psxadapter.c:

Classes

struct  hidpad_psxadapter_data
 

Macros

#define PSX_H_GET(a)   (a & 0x0F) /*HAT MASK = 0x0F */
 
#define PSX_H_LEFT(a)   (a == 0x05) || (a == 0x06) || (a == 0x07)
 
#define PSX_H_RIGHT(a)   (a == 0x01) || (a == 0x02) || (a == 0x03)
 
#define PSX_H_UP(a)   (a == 0x07) || (a == 0x00) || (a == 0x01)
 
#define PSX_H_DOWN(a)   (a == 0x03) || (a == 0x04) || (a == 0x05)
 

Functions

static voidhidpad_psxadapter_init (void *data, uint32_t slot, hid_driver_t *driver)
 
static void hidpad_psxadapter_deinit (void *data)
 
static void hidpad_psxadapter_get_buttons (void *data, input_bits_t *state)
 
static int16_t hidpad_psxadapter_get_axis (void *data, unsigned axis)
 
static void hidpad_psxadapter_packet_handler (void *data, uint8_t *packet, uint16_t size)
 
static void hidpad_psxadapter_set_rumble (void *data, enum retro_rumble_effect effect, uint16_t strength)
 
const char * hidpad_psxadapter_get_name (void *data)
 

Variables

pad_connection_interface_t pad_connection_psxadapter
 

Macro Definition Documentation

◆ PSX_H_DOWN

#define PSX_H_DOWN (   a)    (a == 0x03) || (a == 0x04) || (a == 0x05)

◆ PSX_H_GET

#define PSX_H_GET (   a)    (a & 0x0F) /*HAT MASK = 0x0F */

◆ PSX_H_LEFT

#define PSX_H_LEFT (   a)    (a == 0x05) || (a == 0x06) || (a == 0x07)

◆ PSX_H_RIGHT

#define PSX_H_RIGHT (   a)    (a == 0x01) || (a == 0x02) || (a == 0x03)

◆ PSX_H_UP

#define PSX_H_UP (   a)    (a == 0x07) || (a == 0x00) || (a == 0x01)

Function Documentation

◆ hidpad_psxadapter_deinit()

static void hidpad_psxadapter_deinit ( void data)
static
Here is the call graph for this function:

◆ hidpad_psxadapter_get_axis()

static int16_t hidpad_psxadapter_get_axis ( void data,
unsigned  axis 
)
static

◆ hidpad_psxadapter_get_buttons()

static void hidpad_psxadapter_get_buttons ( void data,
input_bits_t state 
)
static

◆ hidpad_psxadapter_get_name()

const char* hidpad_psxadapter_get_name ( void data)
Here is the call graph for this function:

◆ hidpad_psxadapter_init()

static void* hidpad_psxadapter_init ( void data,
uint32_t  slot,
hid_driver_t driver 
)
static
Here is the call graph for this function:

◆ hidpad_psxadapter_packet_handler()

static void hidpad_psxadapter_packet_handler ( void data,
uint8_t packet,
uint16_t  size 
)
static
Here is the call graph for this function:

◆ hidpad_psxadapter_set_rumble()

static void hidpad_psxadapter_set_rumble ( void data,
enum retro_rumble_effect  effect,
uint16_t  strength 
)
static
Here is the call graph for this function:

Variable Documentation

◆ pad_connection_psxadapter

pad_connection_interface_t pad_connection_psxadapter
Initial value:
= {
}
static void * hidpad_psxadapter_init(void *data, uint32_t slot, hid_driver_t *driver)
Definition: connect_psxadapter.c:33
static void hidpad_psxadapter_get_buttons(void *data, input_bits_t *state)
Definition: connect_psxadapter.c:62
static void hidpad_psxadapter_set_rumble(void *data, enum retro_rumble_effect effect, uint16_t strength)
Definition: connect_psxadapter.c:168
const char * hidpad_psxadapter_get_name(void *data)
Definition: connect_psxadapter.c:176
static int16_t hidpad_psxadapter_get_axis(void *data, unsigned axis)
Definition: connect_psxadapter.c:75
static void hidpad_psxadapter_deinit(void *data)
Definition: connect_psxadapter.c:54
static void hidpad_psxadapter_packet_handler(void *data, uint8_t *packet, uint16_t size)
Definition: connect_psxadapter.c:111