RetroArch
Classes | Macros | Typedefs | Functions | Variables
wiiusb_hid.c File Reference
#include <stdlib.h>
#include <gccore.h>
#include <rthreads/rthreads.h>
#include "../input_defines.h"
#include "../input_driver.h"
#include "../connect/joypad_connection.h"
#include "../../tasks/tasks_internal.h"
#include "../../verbosity.h"
Include dependency graph for wiiusb_hid.c:

Classes

struct  wiiusb_hid
 
struct  wiiusb_adapter
 

Macros

#define WIIUSB_SC_NONE   0
 
#define WIIUSB_SC_INTMSG   1
 
#define WIIUSB_SC_CTRLMSG   2
 
#define WIIUSB_SC_CTRLMSG2   3
 

Typedefs

typedef struct wiiusb_hid wiiusb_hid_t
 

Functions

static void wiiusb_hid_process_control_message (struct wiiusb_adapter *adapter)
 
static int32_t wiiusb_hid_read_cb (int32_t size, void *data)
 
static void wiiusb_hid_device_send_control (void *data, uint8_t *data_buf, size_t size)
 
static void wiiusb_hid_device_add_autodetect (unsigned idx, const char *device_name, const char *driver_name, uint16_t dev_vid, uint16_t dev_pid)
 
static void wiiusb_get_description (usb_device_entry *device, struct wiiusb_adapter *adapter, usb_devdesc *devdesc)
 
static const char * wiiusb_hid_joypad_name (void *data, unsigned pad)
 
static int32_t wiiusb_hid_release_adapter (struct wiiusb_adapter *adapter)
 
static int wiiusb_hid_remove_adapter (struct wiiusb_adapter *adapter)
 
static int wiiusb_hid_removal_cb (int result, void *usrdata)
 
static int wiiusb_hid_add_adapter (void *data, usb_device_entry *dev)
 
static bool wiiusb_hid_new_device (wiiusb_hid_t *hid, int32_t id)
 
static void wiiusb_hid_scan_for_devices (wiiusb_hid_t *hid)
 
static void wiiusb_hid_poll_thread (void *data)
 
static int wiiusb_hid_change_cb (int result, void *usrdata)
 
static bool wiiusb_hid_joypad_query (void *data, unsigned pad)
 
static void wiiusb_hid_joypad_get_buttons (void *data, unsigned port, input_bits_t *state)
 
static bool wiiusb_hid_joypad_button (void *data, unsigned port, uint16_t joykey)
 
static bool wiiusb_hid_joypad_rumble (void *data, unsigned pad, enum retro_rumble_effect effect, uint16_t strength)
 
static int16_t wiiusb_hid_joypad_axis (void *data, unsigned port, uint32_t joyaxis)
 
static void wiiusb_hid_free (const void *data)
 
static voidwiiusb_hid_init (void)
 
static void wiiusb_hid_poll (void *data)
 

Variables

hid_driver_t wiiusb_hid
 

Macro Definition Documentation

◆ WIIUSB_SC_CTRLMSG

#define WIIUSB_SC_CTRLMSG   2

◆ WIIUSB_SC_CTRLMSG2

#define WIIUSB_SC_CTRLMSG2   3

◆ WIIUSB_SC_INTMSG

#define WIIUSB_SC_INTMSG   1

◆ WIIUSB_SC_NONE

#define WIIUSB_SC_NONE   0

Typedef Documentation

◆ wiiusb_hid_t

typedef struct wiiusb_hid wiiusb_hid_t

Function Documentation

◆ wiiusb_get_description()

static void wiiusb_get_description ( usb_device_entry *  device,
struct wiiusb_adapter adapter,
usb_devdesc *  devdesc 
)
static
Here is the caller graph for this function:

◆ wiiusb_hid_add_adapter()

static int wiiusb_hid_add_adapter ( void data,
usb_device_entry *  dev 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiusb_hid_change_cb()

static int wiiusb_hid_change_cb ( int  result,
void usrdata 
)
static
Here is the caller graph for this function:

◆ wiiusb_hid_device_add_autodetect()

static void wiiusb_hid_device_add_autodetect ( unsigned  idx,
const char *  device_name,
const char *  driver_name,
uint16_t  dev_vid,
uint16_t  dev_pid 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiusb_hid_device_send_control()

static void wiiusb_hid_device_send_control ( void data,
uint8_t data_buf,
size_t  size 
)
static
Here is the call graph for this function:

◆ wiiusb_hid_free()

static void wiiusb_hid_free ( const void data)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiusb_hid_init()

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

◆ wiiusb_hid_joypad_axis()

static int16_t wiiusb_hid_joypad_axis ( void data,
unsigned  port,
uint32_t  joyaxis 
)
static
Here is the call graph for this function:

◆ wiiusb_hid_joypad_button()

static bool wiiusb_hid_joypad_button ( void data,
unsigned  port,
uint16_t  joykey 
)
static
Here is the call graph for this function:

◆ wiiusb_hid_joypad_get_buttons()

static void wiiusb_hid_joypad_get_buttons ( void data,
unsigned  port,
input_bits_t state 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiusb_hid_joypad_name()

static const char* wiiusb_hid_joypad_name ( void data,
unsigned  pad 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiusb_hid_joypad_query()

static bool wiiusb_hid_joypad_query ( void data,
unsigned  pad 
)
static

◆ wiiusb_hid_joypad_rumble()

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

◆ wiiusb_hid_new_device()

static bool wiiusb_hid_new_device ( wiiusb_hid_t hid,
int32_t  id 
)
static
Here is the caller graph for this function:

◆ wiiusb_hid_poll()

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

◆ wiiusb_hid_poll_thread()

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

◆ wiiusb_hid_process_control_message()

static void wiiusb_hid_process_control_message ( struct wiiusb_adapter adapter)
static
Here is the caller graph for this function:

◆ wiiusb_hid_read_cb()

static int32_t wiiusb_hid_read_cb ( int32_t  size,
void data 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiusb_hid_release_adapter()

static int32_t wiiusb_hid_release_adapter ( struct wiiusb_adapter adapter)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiusb_hid_removal_cb()

static int wiiusb_hid_removal_cb ( int  result,
void usrdata 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiusb_hid_remove_adapter()

static int wiiusb_hid_remove_adapter ( struct wiiusb_adapter adapter)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiusb_hid_scan_for_devices()

static void wiiusb_hid_scan_for_devices ( wiiusb_hid_t hid)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ wiiusb_hid

Initial value:
= {
"wiiusb",
}
static void wiiusb_hid_free(const void *data)
Definition: wiiusb_hid.c:551
static void * wiiusb_hid_init(void)
Definition: wiiusb_hid.c:579
static bool wiiusb_hid_joypad_query(void *data, unsigned pad)
Definition: wiiusb_hid.c:476
static const char * wiiusb_hid_joypad_name(void *data, unsigned pad)
Definition: wiiusb_hid.c:196
static void wiiusb_hid_joypad_get_buttons(void *data, unsigned port, input_bits_t *state)
Definition: wiiusb_hid.c:481
static bool wiiusb_hid_joypad_button(void *data, unsigned port, uint16_t joykey)
Definition: wiiusb_hid.c:493
static void wiiusb_hid_device_send_control(void *data, uint8_t *data_buf, size_t size)
Definition: wiiusb_hid.c:122
static bool wiiusb_hid_joypad_rumble(void *data, unsigned pad, enum retro_rumble_effect effect, uint16_t strength)
Definition: wiiusb_hid.c:511
static void wiiusb_hid_poll(void *data)
Definition: wiiusb_hid.c:619
static int16_t wiiusb_hid_joypad_axis(void *data, unsigned port, uint32_t joyaxis)
Definition: wiiusb_hid.c:522