RetroArch
Functions | Variables
wiiu_hid.c File Reference
#include "../include/wiiu/hid.h"
#include <wiiu/os/atomic.h>
Include dependency graph for wiiu_hid.c:

Functions

static void report_hid_error (const char *msg, wiiu_adapter_t *adapter, int32_t error)
 
static bool wiiu_hid_joypad_query (void *data, unsigned slot)
 
static joypad_connection_tget_pad (wiiu_hid_t *hid, unsigned slot)
 
static const char * wiiu_hid_joypad_name (void *data, unsigned slot)
 
static void wiiu_hid_joypad_get_buttons (void *data, unsigned slot, input_bits_t *state)
 
static bool wiiu_hid_joypad_button (void *data, unsigned slot, uint16_t joykey)
 
static bool wiiu_hid_joypad_rumble (void *data, unsigned slot, enum retro_rumble_effect effect, uint16_t strength)
 
static int16_t wiiu_hid_joypad_axis (void *data, unsigned slot, uint32_t joyaxis)
 
static voidwiiu_hid_init (void)
 
static void wiiu_hid_free (const void *data)
 
static void wiiu_hid_poll (void *data)
 
static void wiiu_hid_send_control (void *data, uint8_t *buf, size_t size)
 
static int32_t wiiu_hid_set_report (void *data, uint8_t report_type, uint8_t report_id, void *report_data, uint32_t report_length)
 
static int32_t wiiu_hid_set_idle (void *data, uint8_t duration)
 
static int32_t wiiu_hid_set_protocol (void *data, uint8_t protocol)
 
static int32_t wiiu_hid_read (void *data, void *buffer, size_t size)
 
static void start_polling_thread (wiiu_hid_t *hid)
 
static void stop_polling_thread (wiiu_hid_t *hid)
 
static void log_device (HIDDevice *device)
 
static uint8_t try_init_driver (wiiu_adapter_t *adapter)
 
static void synchronized_process_adapters (wiiu_hid_t *hid)
 
static void synchronized_add_event (wiiu_attach_event *event)
 
static wiiu_attach_eventsynchronized_get_events_list (void)
 
static wiiu_adapter_tsynchronized_lookup_adapter (uint32_t handle)
 
static void synchronized_add_to_adapters_list (wiiu_adapter_t *adapter)
 
static int32_t wiiu_attach_callback (HIDClient *client, HIDDevice *device, uint32_t attach)
 
static void wiiu_hid_detach (wiiu_hid_t *hid, wiiu_attach_event *event)
 
static void wiiu_hid_attach (wiiu_hid_t *hid, wiiu_attach_event *event)
 
static void wiiu_hid_read_loop_callback (uint32_t handle, int32_t error, uint8_t *buffer, uint32_t buffer_size, void *userdata)
 
static void wiiu_hid_polling_thread_cleanup (OSThread *thread, void *stack)
 
static void wiiu_handle_attach_events (wiiu_hid_t *hid, wiiu_attach_event *list)
 
static void wiiu_poll_adapter (wiiu_adapter_t *adapter)
 
static void wiiu_poll_adapters (wiiu_hid_t *hid)
 
static int wiiu_hid_polling_thread (int argc, const char **argv)
 
static OSThreadnew_thread (void)
 
static void wiiu_hid_init_lists (void)
 
static wiiu_hid_tnew_hid (void)
 
static void delete_hid (wiiu_hid_t *hid)
 
static HIDClientnew_hidclient (void)
 
static void delete_hidclient (HIDClient *client)
 
static void init_cachealigned_buffer (int32_t min_size, uint8_t **out_buf_ptr, int32_t *actual_size)
 
static wiiu_adapter_tnew_adapter (wiiu_attach_event *event)
 
static void delete_adapter (wiiu_adapter_t *adapter)
 
static wiiu_attach_eventnew_attach_event (HIDDevice *device)
 
static void delete_attach_event (wiiu_attach_event *event)
 
voidalloc_zeroed (size_t alignment, size_t size)
 

Variables

static wiiu_event_list events
 
static wiiu_adapter_list adapters
 
hid_driver_t wiiu_hid
 

Function Documentation

◆ alloc_zeroed()

void* alloc_zeroed ( size_t  alignment,
size_t  size 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ delete_adapter()

static void delete_adapter ( wiiu_adapter_t adapter)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ delete_attach_event()

static void delete_attach_event ( wiiu_attach_event event)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ delete_hid()

static void delete_hid ( wiiu_hid_t hid)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ delete_hidclient()

static void delete_hidclient ( HIDClient client)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_pad()

static joypad_connection_t* get_pad ( wiiu_hid_t hid,
unsigned  slot 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_cachealigned_buffer()

static void init_cachealigned_buffer ( int32_t  min_size,
uint8_t **  out_buf_ptr,
int32_t actual_size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ log_device()

static void log_device ( HIDDevice device)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ new_adapter()

static wiiu_adapter_t* new_adapter ( wiiu_attach_event event)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ new_attach_event()

static wiiu_attach_event* new_attach_event ( HIDDevice device)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ new_hid()

static wiiu_hid_t* new_hid ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ new_hidclient()

static HIDClient* new_hidclient ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ new_thread()

static OSThread* new_thread ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ report_hid_error()

static void report_hid_error ( const char *  msg,
wiiu_adapter_t adapter,
int32_t  error 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_polling_thread()

static void start_polling_thread ( wiiu_hid_t hid)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop_polling_thread()

static void stop_polling_thread ( wiiu_hid_t hid)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ synchronized_add_event()

static void synchronized_add_event ( wiiu_attach_event event)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ synchronized_add_to_adapters_list()

static void synchronized_add_to_adapters_list ( wiiu_adapter_t adapter)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ synchronized_get_events_list()

static wiiu_attach_event* synchronized_get_events_list ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ synchronized_lookup_adapter()

static wiiu_adapter_t* synchronized_lookup_adapter ( uint32_t  handle)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ synchronized_process_adapters()

static void synchronized_process_adapters ( wiiu_hid_t hid)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ try_init_driver()

static uint8_t try_init_driver ( wiiu_adapter_t adapter)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiu_attach_callback()

static int32_t wiiu_attach_callback ( HIDClient client,
HIDDevice device,
uint32_t  attach 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiu_handle_attach_events()

static void wiiu_handle_attach_events ( wiiu_hid_t hid,
wiiu_attach_event list 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiu_hid_attach()

static void wiiu_hid_attach ( wiiu_hid_t hid,
wiiu_attach_event event 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiu_hid_detach()

static void wiiu_hid_detach ( wiiu_hid_t hid,
wiiu_attach_event event 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiu_hid_free()

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

◆ wiiu_hid_init()

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

◆ wiiu_hid_init_lists()

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

◆ wiiu_hid_joypad_axis()

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

◆ wiiu_hid_joypad_button()

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

◆ wiiu_hid_joypad_get_buttons()

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

◆ wiiu_hid_joypad_name()

static const char* wiiu_hid_joypad_name ( void data,
unsigned  slot 
)
static
Here is the call graph for this function:

◆ wiiu_hid_joypad_query()

static bool wiiu_hid_joypad_query ( void data,
unsigned  slot 
)
static
Here is the caller graph for this function:

◆ wiiu_hid_joypad_rumble()

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

◆ wiiu_hid_poll()

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

◆ wiiu_hid_polling_thread()

static int wiiu_hid_polling_thread ( int  argc,
const char **  argv 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiu_hid_polling_thread_cleanup()

static void wiiu_hid_polling_thread_cleanup ( OSThread thread,
void stack 
)
static

Block until all the HIDRead() calls have returned.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiu_hid_read()

static int32_t wiiu_hid_read ( void data,
void buffer,
size_t  size 
)
static
Here is the call graph for this function:

◆ wiiu_hid_read_loop_callback()

static void wiiu_hid_read_loop_callback ( uint32_t  handle,
int32_t  error,
uint8_t buffer,
uint32_t  buffer_size,
void userdata 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiu_hid_send_control()

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

◆ wiiu_hid_set_idle()

static int32_t wiiu_hid_set_idle ( void data,
uint8_t  duration 
)
static
Here is the call graph for this function:

◆ wiiu_hid_set_protocol()

static int32_t wiiu_hid_set_protocol ( void data,
uint8_t  protocol 
)
static
Here is the call graph for this function:

◆ wiiu_hid_set_report()

static int32_t wiiu_hid_set_report ( void data,
uint8_t  report_type,
uint8_t  report_id,
void report_data,
uint32_t  report_length 
)
static
Here is the call graph for this function:

◆ wiiu_poll_adapter()

static void wiiu_poll_adapter ( wiiu_adapter_t adapter)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiu_poll_adapters()

static void wiiu_poll_adapters ( wiiu_hid_t hid)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ adapters

wiiu_adapter_list adapters
static

◆ events

wiiu_event_list events
static

◆ wiiu_hid

Initial value:
= {
"wiiu",
}
static int32_t wiiu_hid_read(void *data, void *buffer, size_t size)
Definition: wiiu_hid.c:225
static int32_t wiiu_hid_set_report(void *data, uint8_t report_type, uint8_t report_id, void *report_data, uint32_t report_length)
Definition: wiiu_hid.c:183
static bool wiiu_hid_joypad_button(void *data, unsigned slot, uint16_t joykey)
Definition: wiiu_hid.c:64
static void wiiu_hid_joypad_get_buttons(void *data, unsigned slot, input_bits_t *state)
Definition: wiiu_hid.c:56
static void wiiu_hid_free(const void *data)
Definition: wiiu_hid.c:125
static void wiiu_hid_send_control(void *data, uint8_t *buf, size_t size)
Definition: wiiu_hid.c:157
static const char * wiiu_hid_joypad_name(void *data, unsigned slot)
Definition: wiiu_hid.c:46
static void wiiu_hid_poll(void *data)
Definition: wiiu_hid.c:148
static int16_t wiiu_hid_joypad_axis(void *data, unsigned slot, uint32_t joyaxis)
Definition: wiiu_hid.c:86
static bool wiiu_hid_joypad_query(void *data, unsigned slot)
Definition: wiiu_hid.c:25
static int32_t wiiu_hid_set_idle(void *data, uint8_t duration)
Definition: wiiu_hid.c:201
static int32_t wiiu_hid_set_protocol(void *data, uint8_t protocol)
Definition: wiiu_hid.c:213
static bool wiiu_hid_joypad_rumble(void *data, unsigned slot, enum retro_rumble_effect effect, uint16_t strength)
Definition: wiiu_hid.c:74
static void * wiiu_hid_init(void)
Definition: wiiu_hid.c:96