RetroArch
Classes | Macros | Typedefs | Functions | Variables
kpad_driver.c File Reference
#include "../../include/wiiu/input.h"
Include dependency graph for kpad_driver.c:

Classes

struct  _wiimote_state
 

Macros

#define WIIU_PRO_BUTTON_MASK   0x3FC0000;
 
#define CLASSIC_BUTTON_MASK   0xFF0000;
 

Typedefs

typedef struct _wiimote_state wiimote_state
 

Functions

static bool kpad_init (void *data)
 
static bool kpad_query_pad (unsigned pad)
 
static void kpad_destroy (void)
 
static bool kpad_button (unsigned pad, uint16_t button)
 
static void kpad_get_buttons (unsigned pad, input_bits_t *state)
 
static int16_t kpad_axis (unsigned pad, uint32_t axis)
 
static void kpad_poll (void)
 
static const char * kpad_name (unsigned pad)
 
static void kpad_deregister (unsigned channel)
 
static int to_wiimote_channel (unsigned pad)
 
static int get_slot_for_channel (unsigned channel)
 
static void kpad_register (unsigned channel, uint8_t device_type)
 
static void kpad_poll_one_channel (unsigned channel, KPADData *kpad)
 

Variables

static bool ready = false
 
wiimote_state wiimotes [WIIU_WIIMOTE_CHANNELS]
 
static int channel_slot_map [] = { -1, -1, -1, -1 }
 
static int poll_failures [WIIU_WIIMOTE_CHANNELS] = { 0, 0, 0, 0 }
 
input_device_driver_t kpad_driver
 

Macro Definition Documentation

◆ CLASSIC_BUTTON_MASK

#define CLASSIC_BUTTON_MASK   0xFF0000;

◆ WIIU_PRO_BUTTON_MASK

#define WIIU_PRO_BUTTON_MASK   0x3FC0000;

Typedef Documentation

◆ wiimote_state

typedef struct _wiimote_state wiimote_state

Function Documentation

◆ get_slot_for_channel()

static int get_slot_for_channel ( unsigned  channel)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kpad_axis()

static int16_t kpad_axis ( unsigned  pad,
uint32_t  axis 
)
static
Here is the call graph for this function:

◆ kpad_button()

static bool kpad_button ( unsigned  pad,
uint16_t  button 
)
static
Here is the call graph for this function:

◆ kpad_deregister()

static void kpad_deregister ( unsigned  channel)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kpad_destroy()

static void kpad_destroy ( void  )
static

◆ kpad_get_buttons()

static void kpad_get_buttons ( unsigned  pad,
input_bits_t state 
)
static
Here is the call graph for this function:

◆ kpad_init()

static bool kpad_init ( void data)
static

This sub-driver handles the wiimotes. The Wii U has 4 channels available. This also handles wiimote attachments such as the nunchuk and classic/pro controllers.

Here is the call graph for this function:

◆ kpad_name()

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

◆ kpad_poll()

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

◆ kpad_poll_one_channel()

static void kpad_poll_one_channel ( unsigned  channel,
KPADData kpad 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ kpad_query_pad()

static bool kpad_query_pad ( unsigned  pad)
static
Here is the caller graph for this function:

◆ kpad_register()

static void kpad_register ( unsigned  channel,
uint8_t  device_type 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_wiimote_channel()

static int to_wiimote_channel ( unsigned  pad)
static
Here is the caller graph for this function:

Variable Documentation

◆ channel_slot_map

int channel_slot_map[] = { -1, -1, -1, -1 }
static

◆ kpad_driver

input_device_driver_t kpad_driver
Initial value:
=
{
"wiimote",
}
static bool kpad_query_pad(unsigned pad)
Definition: kpad_driver.c:90
static void kpad_poll(void)
Definition: kpad_driver.c:211
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static bool kpad_init(void *data)
Definition: kpad_driver.c:82
static const char * kpad_name(unsigned pad)
Definition: kpad_driver.c:237
static bool kpad_button(unsigned pad, uint16_t button)
Definition: kpad_driver.c:100
static void kpad_get_buttons(unsigned pad, input_bits_t *state)
Definition: kpad_driver.c:113
static void kpad_destroy(void)
Definition: kpad_driver.c:95
static int16_t kpad_axis(unsigned pad, uint32_t axis)
Definition: kpad_driver.c:123

◆ poll_failures

int poll_failures[WIIU_WIIMOTE_CHANNELS] = { 0, 0, 0, 0 }
static

◆ ready

bool ready = false
static

◆ wiimotes

Initial value:
= {
{ 0, {{0,0},{0,0},{0,0}}, WIIMOTE_TYPE_NONE },
{ 0, {{0,0},{0,0},{0,0}}, WIIMOTE_TYPE_NONE },
{ 0, {{0,0},{0,0},{0,0}}, WIIMOTE_TYPE_NONE },
{ 0, {{0,0},{0,0},{0,0}}, WIIMOTE_TYPE_NONE },
}
#define WIIMOTE_TYPE_NONE
Definition: input.h:52