RetroArch
Functions | Variables
wiiuse.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "definitions.h"
#include "wiiuse_internal.h"
#include "io.h"
Include dependency graph for wiiuse.c:

Functions

void wiiuse_send_next_command (struct wiimote_t *wm)
 
static void __wiiuse_push_command (struct wiimote_t *wm, struct cmd_blk_t *cmd)
 
struct wiimote_t ** wiiuse_init (int wiimotes)
 
int wiiuse_set_flags (struct wiimote_t *wm, int enable, int disable)
 Set flags for the specified wiimote. More...
 
void wiiuse_motion_sensing (struct wiimote_t *wm, int status)
 Set if the wiimote should report motion sensing. More...
 
void wiiuse_set_leds (struct wiimote_t *wm, int leds, cmd_blk_cb cb)
 Toggle the state of the rumble. More...
 
int wiiuse_set_report_type (struct wiimote_t *wm, cmd_blk_cb cb)
 
void wiiuse_status (struct wiimote_t *wm, cmd_blk_cb cb)
 
int wiiuse_read_data (struct wiimote_t *wm, ubyte *buffer, uint addr, uword len, cmd_blk_cb cb)
 
int wiiuse_write_data (struct wiimote_t *wm, uint addr, ubyte *data, ubyte len, cmd_blk_cb cb)
 
int wiiuse_write_streamdata (struct wiimote_t *wm, ubyte *data, ubyte len, cmd_blk_cb cb)
 
int wiiuse_sendcmd (struct wiimote_t *wm, ubyte report_type, ubyte *msg, int len, cmd_blk_cb cb)
 

Variables

static struct wiimote_t ** __wm = NULL
 

Function Documentation

◆ __wiiuse_push_command()

static void __wiiuse_push_command ( struct wiimote_t wm,
struct cmd_blk_t cmd 
)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiuse_init()

struct wiimote_t** wiiuse_init ( int  wiimotes)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiuse_motion_sensing()

void wiiuse_motion_sensing ( struct wiimote_t wm,
int  status 
)

Set if the wiimote should report motion sensing.

Parameters
wmPointer to a wiimote_t structure.
status1 to enable, 0 to disable.

Since reporting motion sensing sends a lot of data, the wiimote saves power by not transmitting it by default.

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

◆ wiiuse_read_data()

int wiiuse_read_data ( struct wiimote_t wm,
ubyte buffer,
uint  addr,
uword  len,
cmd_blk_cb  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiuse_send_next_command()

void wiiuse_send_next_command ( struct wiimote_t wm)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiuse_sendcmd()

int wiiuse_sendcmd ( struct wiimote_t wm,
ubyte  report_type,
ubyte msg,
int  len,
cmd_blk_cb  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiuse_set_flags()

int wiiuse_set_flags ( struct wiimote_t wm,
int  enable,
int  disable 
)

Set flags for the specified wiimote.

Parameters
wmPointer to a wiimote_t structure.
enableFlags to enable.
disableFlags to disable.
Returns
The flags set after 'enable' and 'disable' have been applied.

The values 'enable' and 'disable' may be any flags OR'ed together. Flags are defined in wiiuse.h.

Here is the caller graph for this function:

◆ wiiuse_set_leds()

void wiiuse_set_leds ( struct wiimote_t wm,
int  leds,
cmd_blk_cb  cb 
)

Toggle the state of the rumble.

Parameters
wmPointer to a wiimote_t structure.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiuse_set_report_type()

int wiiuse_set_report_type ( struct wiimote_t wm,
cmd_blk_cb  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiuse_status()

void wiiuse_status ( struct wiimote_t wm,
cmd_blk_cb  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiuse_write_data()

int wiiuse_write_data ( struct wiimote_t wm,
uint  addr,
ubyte data,
ubyte  len,
cmd_blk_cb  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wiiuse_write_streamdata()

int wiiuse_write_streamdata ( struct wiimote_t wm,
ubyte data,
ubyte  len,
cmd_blk_cb  cb 
)
Here is the call graph for this function:

Variable Documentation

◆ __wm

struct wiimote_t** __wm = NULL
static