RetroArch
Classes | Typedefs | Enumerations | Functions | Variables
connect_ps4.c File Reference
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <boolean.h>
#include <retro_environment.h>
#include <retro_miscellaneous.h>
#include "joypad_connection.h"
#include "../input_defines.h"
#include "../../driver.h"
#include "../common/hid/hid_device_driver.h"
Include dependency graph for connect_ps4.c:

Classes

struct  ps4buttons
 
struct  ps4
 
struct  hidpad_ps4_data
 

Typedefs

typedef int bf_uint8_t
 

Enumerations

enum  connect_ps4_dpad_states {
  DPAD_UP = 0x0, DPAD_UP_RIGHT = 0x1, DPAD_RIGHT = 0x2, DPAD_RIGHT_DOWN = 0x3,
  DPAD_DOWN = 0x4, DPAD_DOWN_LEFT = 0x5, DPAD_LEFT = 0x6, DPAD_LEFT_UP = 0x7,
  DPAD_OFF = 0x8
}
 

Functions

struct ps4buttons __attribute__ ((packed))
 
static void hidpad_ps4_send_control (struct hidpad_ps4_data *device)
 
static voidhidpad_ps4_init (void *data, uint32_t slot, hid_driver_t *driver)
 
static void hidpad_ps4_deinit (void *data)
 
static bool hidpad_ps4_check_dpad (struct ps4 *rpt, unsigned id)
 
static void hidpad_ps4_get_buttons (void *data, input_bits_t *state)
 
static int16_t hidpad_ps4_get_axis (void *data, unsigned axis)
 
static void hidpad_ps4_packet_handler (void *data, uint8_t *packet, uint16_t size)
 
static void hidpad_ps4_set_rumble (void *data, enum retro_rumble_effect effect, uint16_t strength)
 

Variables

bf_uint8_t dpad
 
bf_uint8_t square
 
bf_uint8_t cross
 
bf_uint8_t circle
 
bf_uint8_t triangle
 
bf_uint8_t l1
 
bf_uint8_t r1
 
bf_uint8_t l2
 
bf_uint8_t r2
 
bf_uint8_t share
 
bf_uint8_t options
 
bf_uint8_t l3
 
bf_uint8_t r3
 
bf_uint8_t ps
 
bf_uint8_t touchpad
 
bf_uint8_t reportcounter
 
struct ps4 __attribute__
 
pad_connection_interface_t pad_connection_ps4
 

Typedef Documentation

◆ bf_uint8_t

typedef int bf_uint8_t

Enumeration Type Documentation

◆ connect_ps4_dpad_states

Enumerator
DPAD_UP 
DPAD_UP_RIGHT 
DPAD_RIGHT 
DPAD_RIGHT_DOWN 
DPAD_DOWN 
DPAD_DOWN_LEFT 
DPAD_LEFT 
DPAD_LEFT_UP 
DPAD_OFF 

Function Documentation

◆ __attribute__()

struct ps4buttons __attribute__ ( (packed )

◆ hidpad_ps4_check_dpad()

static bool hidpad_ps4_check_dpad ( struct ps4 rpt,
unsigned  id 
)
static
Here is the caller graph for this function:

◆ hidpad_ps4_deinit()

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

◆ hidpad_ps4_get_axis()

static int16_t hidpad_ps4_get_axis ( void data,
unsigned  axis 
)
static

◆ hidpad_ps4_get_buttons()

static void hidpad_ps4_get_buttons ( void data,
input_bits_t state 
)
static
Here is the call graph for this function:

◆ hidpad_ps4_init()

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

◆ hidpad_ps4_packet_handler()

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

◆ hidpad_ps4_send_control()

static void hidpad_ps4_send_control ( struct hidpad_ps4_data device)
static
Here is the caller graph for this function:

◆ hidpad_ps4_set_rumble()

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

Variable Documentation

◆ __attribute__

struct ps4 __attribute__

◆ circle

◆ cross

bf_uint8_t cross

◆ dpad

bf_uint8_t dpad

◆ l1

◆ l2

◆ l3

◆ options

bf_uint8_t options

◆ pad_connection_ps4

pad_connection_interface_t pad_connection_ps4
Initial value:
= {
}
static void hidpad_ps4_deinit(void *data)
Definition: connect_ps4.c:164
static void hidpad_ps4_packet_handler(void *data, uint8_t *packet, uint16_t size)
Definition: connect_ps4.c:251
static void hidpad_ps4_set_rumble(void *data, enum retro_rumble_effect effect, uint16_t strength)
Definition: connect_ps4.c:270
static void * hidpad_ps4_init(void *data, uint32_t slot, hid_driver_t *driver)
Definition: connect_ps4.c:127
static int16_t hidpad_ps4_get_axis(void *data, unsigned axis)
Definition: connect_ps4.c:236
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void hidpad_ps4_get_buttons(void *data, input_bits_t *state)
Definition: connect_ps4.c:189

◆ ps

◆ r1

◆ r2

◆ r3

◆ reportcounter

bf_uint8_t reportcounter

◆ share

bf_uint8_t share

◆ square

bf_uint8_t square

◆ touchpad

bf_uint8_t touchpad

◆ triangle

bf_uint8_t triangle