RetroArch
Classes | Macros | Functions | Variables
linuxraw_joypad.c File Reference
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <limits.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/inotify.h>
#include <linux/joystick.h>
#include <fcntl.h>
#include <sys/epoll.h>
#include <compat/strl.h>
#include <string/stdstring.h>
#include "../input_driver.h"
#include "../../verbosity.h"
#include "../../tasks/tasks_internal.h"
Include dependency graph for linuxraw_joypad.c:

Classes

struct  linuxraw_joypad
 

Macros

#define NUM_BUTTONS   32
 
#define NUM_AXES   32
 

Functions

static void linuxraw_poll_pad (struct linuxraw_joypad *pad)
 
static bool linuxraw_joypad_init_pad (const char *path, struct linuxraw_joypad *pad)
 
static const char * linuxraw_joypad_name (unsigned pad)
 
static void linuxraw_joypad_poll (void)
 
static bool linuxraw_joypad_init (void *data)
 
static void linuxraw_joypad_destroy (void)
 
static bool linuxraw_joypad_button (unsigned port, uint16_t joykey)
 
static void linuxraw_joypad_get_buttons (unsigned port, input_bits_t *state)
 
static int16_t linuxraw_joypad_axis (unsigned port, uint32_t joyaxis)
 
static bool linuxraw_joypad_query_pad (unsigned pad)
 

Variables

static struct linuxraw_joypad linuxraw_pads [MAX_USERS]
 
static int linuxraw_epoll = 0
 
static int linuxraw_inotify = 0
 
static bool linuxraw_hotplug = false
 
input_device_driver_t linuxraw_joypad
 

Macro Definition Documentation

◆ NUM_AXES

#define NUM_AXES   32

◆ NUM_BUTTONS

#define NUM_BUTTONS   32

Function Documentation

◆ linuxraw_joypad_axis()

static int16_t linuxraw_joypad_axis ( unsigned  port,
uint32_t  joyaxis 
)
static

◆ linuxraw_joypad_button()

static bool linuxraw_joypad_button ( unsigned  port,
uint16_t  joykey 
)
static

◆ linuxraw_joypad_destroy()

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

◆ linuxraw_joypad_get_buttons()

static void linuxraw_joypad_get_buttons ( unsigned  port,
input_bits_t state 
)
static

◆ linuxraw_joypad_init()

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

◆ linuxraw_joypad_init_pad()

static bool linuxraw_joypad_init_pad ( const char *  path,
struct linuxraw_joypad pad 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ linuxraw_joypad_name()

static const char* linuxraw_joypad_name ( unsigned  pad)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ linuxraw_joypad_poll()

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

◆ linuxraw_joypad_query_pad()

static bool linuxraw_joypad_query_pad ( unsigned  pad)
static

◆ linuxraw_poll_pad()

static void linuxraw_poll_pad ( struct linuxraw_joypad pad)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ linuxraw_epoll

int linuxraw_epoll = 0
static

◆ linuxraw_hotplug

bool linuxraw_hotplug = false
static

◆ linuxraw_inotify

int linuxraw_inotify = 0
static

◆ linuxraw_joypad

Initial value:
= {
"linuxraw",
}
static int16_t linuxraw_joypad_axis(unsigned port, uint32_t joyaxis)
Definition: linuxraw_joypad.c:342
static bool linuxraw_joypad_query_pad(unsigned pad)
Definition: linuxraw_joypad.c:369
static void linuxraw_joypad_poll(void)
Definition: linuxraw_joypad.c:133
static bool linuxraw_joypad_button(unsigned port, uint16_t joykey)
Definition: linuxraw_joypad.c:321
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static bool linuxraw_joypad_init(void *data)
Definition: linuxraw_joypad.c:235
static void linuxraw_joypad_destroy(void)
Definition: linuxraw_joypad.c:295
static const char * linuxraw_joypad_name(unsigned pad)
Definition: linuxraw_joypad.c:125
static void linuxraw_joypad_get_buttons(unsigned port, input_bits_t *state)
Definition: linuxraw_joypad.c:329

◆ linuxraw_pads

struct linuxraw_joypad linuxraw_pads[MAX_USERS]
static