RetroArch
Classes | Macros | Functions | Variables
wiiuse_internal.h File Reference

General internal wiiuse stuff. More...

#include "definitions.h"
#include <wiiuse/wiiuse.h>
Include dependency graph for wiiuse_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  op_t
 

Macros

#define WIIUSE_VERSION   "0.12"
 
#define WM_OUTPUT_CHANNEL   0x11
 
#define WM_INPUT_CHANNEL   0x13
 
#define WM_SET_REPORT   0x50
 
#define WM_DATA   0xA0
 
#define WM_CMD_RUMBLE   0x10
 
#define WM_CMD_LED   0x11
 
#define WM_CMD_REPORT_TYPE   0x12
 
#define WM_CMD_IR   0x13
 
#define WM_CMD_SPEAKER_ENABLE   0x14
 
#define WM_CMD_CTRL_STATUS   0x15
 
#define WM_CMD_WRITE_DATA   0x16
 
#define WM_CMD_READ_DATA   0x17
 
#define WM_CMD_STREAM_DATA   0x18
 
#define WM_CMD_SPEAKER_MUTE   0x19
 
#define WM_CMD_IR_2   0x1A
 
#define WM_RPT_CTRL_STATUS   0x20
 
#define WM_RPT_READ   0x21
 
#define WM_RPT_ACK   0x22
 
#define WM_RPT_BTN   0x30
 
#define WM_RPT_BTN_ACC   0x31
 
#define WM_RPT_BTN_ACC_IR   0x33
 
#define WM_RPT_BTN_EXP   0x34
 
#define WM_RPT_BTN_ACC_EXP   0x35
 
#define WM_RPT_BTN_IR_EXP   0x36
 
#define WM_RPT_BTN_ACC_IR_EXP   0x37
 
#define WM_BT_INPUT   0x01
 
#define WM_BT_OUTPUT   0x02
 
#define WM_DEV_CLASS_0   0x04
 
#define WM_DEV_CLASS_1   0x25
 
#define WM_DEV_CLASS_2   0x00
 
#define WM_VENDOR_ID   0x057E
 
#define WM_PRODUCT_ID   0x0306
 
#define WM_MAX_BATTERY_CODE   0xC8
 
#define WM_MEM_OFFSET_CALIBRATION   0x16
 
#define WM_EXP_MEM_BASE   0x04A40000
 
#define WM_EXP_MEM_ENABLE1   0x04A400F0
 
#define WM_EXP_MEM_ENABLE2   0x04A400FB
 
#define WM_EXP_MEM_KEY   0x04A40040
 
#define WM_EXP_MEM_CALIBR   0x04A40020
 
#define WM_EXP_MOTION_PLUS_ENABLE   0x04A600FE
 
#define WM_EXP_ID   0x04A400FA
 
#define WM_REG_IR   0x04B00030
 
#define WM_REG_IR_BLOCK1   0x04B00000
 
#define WM_REG_IR_BLOCK2   0x04B0001A
 
#define WM_REG_IR_MODENUM   0x04B00033
 
#define WM_REG_SPEAKER_REG1   0x04A20001
 
#define WM_REG_SPEAKER_REG2   0x04A20008
 
#define WM_REG_SPEAKER_REG3   0x04A20009
 
#define WM_REG_SPEAKER_BLOCK   0x04A20001
 
#define WM_IR_BLOCK1_LEVEL1   "\x02\x00\x00\x71\x01\x00\x64\x00\xfe"
 
#define WM_IR_BLOCK2_LEVEL1   "\xfd\x05"
 
#define WM_IR_BLOCK1_LEVEL2   "\x02\x00\x00\x71\x01\x00\x96\x00\xb4"
 
#define WM_IR_BLOCK2_LEVEL2   "\xb3\x04"
 
#define WM_IR_BLOCK1_LEVEL3   "\x02\x00\x00\x71\x01\x00\xaa\x00\x64"
 
#define WM_IR_BLOCK2_LEVEL3   "\x63\x03"
 
#define WM_IR_BLOCK1_LEVEL4   "\x02\x00\x00\x71\x01\x00\xc8\x00\x36"
 
#define WM_IR_BLOCK2_LEVEL4   "\x35\x03"
 
#define WM_IR_BLOCK1_LEVEL5   "\x07\x00\x00\x71\x01\x00\x72\x00\x20"
 
#define WM_IR_BLOCK2_LEVEL5   "\x1f\x03"
 
#define WM_IR_TYPE_BASIC   0x01
 
#define WM_IR_TYPE_EXTENDED   0x03
 
#define WM_IR_TYPE_FULL   0x05
 
#define WM_CTRL_STATUS_BYTE1_ATTACHMENT   0x02
 
#define WM_CTRL_STATUS_BYTE1_SPEAKER_ENABLED   0x04
 
#define WM_CTRL_STATUS_BYTE1_IR_ENABLED   0x08
 
#define WM_CTRL_STATUS_BYTE1_LED_1   0x10
 
#define WM_CTRL_STATUS_BYTE1_LED_2   0x20
 
#define WM_CTRL_STATUS_BYTE1_LED_3   0x40
 
#define WM_CTRL_STATUS_BYTE1_LED_4   0x80
 
#define WM_ASPECT_16_9_X   660
 
#define WM_ASPECT_16_9_Y   370
 
#define WM_ASPECT_4_3_X   560
 
#define WM_ASPECT_4_3_Y   420
 
#define EXP_ID_CODE_NUNCHUK   0xa4200000
 
#define EXP_ID_CODE_CLASSIC_CONTROLLER   0xa4200101
 
#define EXP_ID_CODE_CLASSIC_CONTROLLER_NYKOWING   0x90908f00
 
#define EXP_ID_CODE_CLASSIC_CONTROLLER_NYKOWING2   0x9e9f9c00
 
#define EXP_ID_CODE_CLASSIC_CONTROLLER_NYKOWING3   0x908f8f00
 
#define EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC   0xa5a2a300
 
#define EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC2   0x98999900
 
#define EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC3   0xa0a1a000
 
#define EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC4   0x8d8d8e00
 
#define EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC5   0x93949400
 
#define EXP_ID_CODE_CLASSIC_WIIU_PRO   0xa4200120
 
#define EXP_ID_CODE_MOTION_PLUS   0xa4200405
 
#define EXP_HANDSHAKE_LEN   224
 
#define WIIMOTE_STATE_DEV_FOUND   0x00001
 
#define WIIMOTE_STATE_HANDSHAKE   0x00004 /* actual connection exists but no handshake yet */
 
#define WIIMOTE_STATE_HANDSHAKE_COMPLETE   0x00008 /* actual connection exists but no handshake yet */
 
#define WIIMOTE_STATE_CONNECTED   0x00010
 
#define WIIMOTE_STATE_EXP_HANDSHAKE   0x00020 /* actual connection exists but no handshake yet */
 
#define WIIMOTE_STATE_EXP_FAILED   0x00040 /* actual connection exists but no handshake yet */
 
#define WIIMOTE_STATE_RUMBLE   0x00080
 
#define WIIMOTE_STATE_ACC   0x00100
 
#define WIIMOTE_STATE_EXP   0x00200
 
#define WIIMOTE_STATE_IR   0x00400
 
#define WIIMOTE_STATE_SPEAKER   0x00800
 
#define WIIMOTE_STATE_IR_SENS_LVL1   0x01000
 
#define WIIMOTE_STATE_IR_SENS_LVL2   0x02000
 
#define WIIMOTE_STATE_IR_SENS_LVL3   0x04000
 
#define WIIMOTE_STATE_IR_SENS_LVL4   0x08000
 
#define WIIMOTE_STATE_IR_SENS_LVL5   0x10000
 
#define WIIMOTE_STATE_IR_INIT   0x20000
 
#define WIIMOTE_STATE_SPEAKER_INIT   0x40000
 
#define WIIMOTE_STATE_WIIU_PRO   0x80000
 
#define WIIMOTE_INIT_STATES   (WIIMOTE_STATE_IR_SENS_LVL3)
 
#define WIIMOTE_IS_SET(wm, s)   ((wm->state & (s)) == (s))
 
#define WIIMOTE_ENABLE_STATE(wm, s)   (wm->state |= (s))
 
#define WIIMOTE_DISABLE_STATE(wm, s)   (wm->state &= ~(s))
 
#define WIIMOTE_TOGGLE_STATE(wm, s)   ((wm->state & (s)) ? WIIMOTE_DISABLE_STATE(wm, s) : WIIMOTE_ENABLE_STATE(wm, s))
 
#define WIIMOTE_IS_FLAG_SET(wm, s)   ((wm->flags & (s)) == (s))
 
#define WIIMOTE_ENABLE_FLAG(wm, s)   (wm->flags |= (s))
 
#define WIIMOTE_DISABLE_FLAG(wm, s)   (wm->flags &= ~(s))
 
#define WIIMOTE_TOGGLE_FLAG(wm, s)   ((wm->flags & (s)) ? WIIMOTE_DISABLE_FLAG(wm, s) : WIIMOTE_ENABLE_FLAG(wm, s))
 
#define NUNCHUK_IS_FLAG_SET(wm, s)   ((*(wm->flags) & (s)) == (s))
 
#define WIIMOTE_ID(wm)   (wm->unid)
 
#define WIIMOTE_IS_CONNECTED(wm)   (WIIMOTE_IS_SET(wm, WIIMOTE_STATE_CONNECTED))
 
#define WIIUSE_DEFAULT_SMOOTH_ALPHA   0.3f
 
#define SMOOTH_ROLL   0x01
 
#define SMOOTH_PITCH   0x02
 

Functions

struct op_t __attribute__ ((packed))
 
void wiiuse_init_cmd_queue (struct wiimote_t *wm)
 
void wiiuse_send_next_command (struct wiimote_t *wm)
 
int wiiuse_set_report_type (struct wiimote_t *wm, cmd_blk_cb cb)
 
int wiiuse_sendcmd (struct wiimote_t *wm, ubyte report_type, ubyte *msg, int len, cmd_blk_cb cb)
 

Variables

ubyte cmd
 
union {
   struct {
      uint   addr
 
      uword   size
 
   }   readdata
 
   struct {
      uint   addr
 
      ubyte   size
 
      ubyte   data [16]
 
   }   writedata
 
   ubyte   __data [MAX_PAYLOAD]
 
}; 
 
voidbuffer
 
int wait
 

Detailed Description

General internal wiiuse stuff.

Since Wiiuse is a library, wiiuse.h is a duplicate of the API header.

The code that would normally go in that file, but which is not needed by third party developers, is put here.

So wiiuse_internal.h is included by other files internally, wiiuse.h is included only here.

Macro Definition Documentation

◆ EXP_HANDSHAKE_LEN

#define EXP_HANDSHAKE_LEN   224

◆ EXP_ID_CODE_CLASSIC_CONTROLLER

#define EXP_ID_CODE_CLASSIC_CONTROLLER   0xa4200101

◆ EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC

#define EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC   0xa5a2a300

◆ EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC2

#define EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC2   0x98999900

◆ EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC3

#define EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC3   0xa0a1a000

◆ EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC4

#define EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC4   0x8d8d8e00

◆ EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC5

#define EXP_ID_CODE_CLASSIC_CONTROLLER_GENERIC5   0x93949400

◆ EXP_ID_CODE_CLASSIC_CONTROLLER_NYKOWING

#define EXP_ID_CODE_CLASSIC_CONTROLLER_NYKOWING   0x90908f00

◆ EXP_ID_CODE_CLASSIC_CONTROLLER_NYKOWING2

#define EXP_ID_CODE_CLASSIC_CONTROLLER_NYKOWING2   0x9e9f9c00

◆ EXP_ID_CODE_CLASSIC_CONTROLLER_NYKOWING3

#define EXP_ID_CODE_CLASSIC_CONTROLLER_NYKOWING3   0x908f8f00

◆ EXP_ID_CODE_CLASSIC_WIIU_PRO

#define EXP_ID_CODE_CLASSIC_WIIU_PRO   0xa4200120

◆ EXP_ID_CODE_MOTION_PLUS

#define EXP_ID_CODE_MOTION_PLUS   0xa4200405

◆ EXP_ID_CODE_NUNCHUK

#define EXP_ID_CODE_NUNCHUK   0xa4200000

Expansion stuff

◆ NUNCHUK_IS_FLAG_SET

#define NUNCHUK_IS_FLAG_SET (   wm,
  s 
)    ((*(wm->flags) & (s)) == (s))

◆ SMOOTH_PITCH

#define SMOOTH_PITCH   0x02

◆ SMOOTH_ROLL

#define SMOOTH_ROLL   0x01

◆ WIIMOTE_DISABLE_FLAG

#define WIIMOTE_DISABLE_FLAG (   wm,
  s 
)    (wm->flags &= ~(s))

◆ WIIMOTE_DISABLE_STATE

#define WIIMOTE_DISABLE_STATE (   wm,
  s 
)    (wm->state &= ~(s))

◆ WIIMOTE_ENABLE_FLAG

#define WIIMOTE_ENABLE_FLAG (   wm,
  s 
)    (wm->flags |= (s))

◆ WIIMOTE_ENABLE_STATE

#define WIIMOTE_ENABLE_STATE (   wm,
  s 
)    (wm->state |= (s))

◆ WIIMOTE_ID

#define WIIMOTE_ID (   wm)    (wm->unid)

◆ WIIMOTE_INIT_STATES

#define WIIMOTE_INIT_STATES   (WIIMOTE_STATE_IR_SENS_LVL3)

◆ WIIMOTE_IS_CONNECTED

#define WIIMOTE_IS_CONNECTED (   wm)    (WIIMOTE_IS_SET(wm, WIIMOTE_STATE_CONNECTED))

◆ WIIMOTE_IS_FLAG_SET

#define WIIMOTE_IS_FLAG_SET (   wm,
  s 
)    ((wm->flags & (s)) == (s))

◆ WIIMOTE_IS_SET

#define WIIMOTE_IS_SET (   wm,
  s 
)    ((wm->state & (s)) == (s))

◆ WIIMOTE_STATE_ACC

#define WIIMOTE_STATE_ACC   0x00100

◆ WIIMOTE_STATE_CONNECTED

#define WIIMOTE_STATE_CONNECTED   0x00010

◆ WIIMOTE_STATE_DEV_FOUND

#define WIIMOTE_STATE_DEV_FOUND   0x00001

◆ WIIMOTE_STATE_EXP

#define WIIMOTE_STATE_EXP   0x00200

◆ WIIMOTE_STATE_EXP_FAILED

#define WIIMOTE_STATE_EXP_FAILED   0x00040 /* actual connection exists but no handshake yet */

◆ WIIMOTE_STATE_EXP_HANDSHAKE

#define WIIMOTE_STATE_EXP_HANDSHAKE   0x00020 /* actual connection exists but no handshake yet */

◆ WIIMOTE_STATE_HANDSHAKE

#define WIIMOTE_STATE_HANDSHAKE   0x00004 /* actual connection exists but no handshake yet */

◆ WIIMOTE_STATE_HANDSHAKE_COMPLETE

#define WIIMOTE_STATE_HANDSHAKE_COMPLETE   0x00008 /* actual connection exists but no handshake yet */

◆ WIIMOTE_STATE_IR

#define WIIMOTE_STATE_IR   0x00400

◆ WIIMOTE_STATE_IR_INIT

#define WIIMOTE_STATE_IR_INIT   0x20000

◆ WIIMOTE_STATE_IR_SENS_LVL1

#define WIIMOTE_STATE_IR_SENS_LVL1   0x01000

◆ WIIMOTE_STATE_IR_SENS_LVL2

#define WIIMOTE_STATE_IR_SENS_LVL2   0x02000

◆ WIIMOTE_STATE_IR_SENS_LVL3

#define WIIMOTE_STATE_IR_SENS_LVL3   0x04000

◆ WIIMOTE_STATE_IR_SENS_LVL4

#define WIIMOTE_STATE_IR_SENS_LVL4   0x08000

◆ WIIMOTE_STATE_IR_SENS_LVL5

#define WIIMOTE_STATE_IR_SENS_LVL5   0x10000

◆ WIIMOTE_STATE_RUMBLE

#define WIIMOTE_STATE_RUMBLE   0x00080

◆ WIIMOTE_STATE_SPEAKER

#define WIIMOTE_STATE_SPEAKER   0x00800

◆ WIIMOTE_STATE_SPEAKER_INIT

#define WIIMOTE_STATE_SPEAKER_INIT   0x40000

◆ WIIMOTE_STATE_WIIU_PRO

#define WIIMOTE_STATE_WIIU_PRO   0x80000

◆ WIIMOTE_TOGGLE_FLAG

#define WIIMOTE_TOGGLE_FLAG (   wm,
  s 
)    ((wm->flags & (s)) ? WIIMOTE_DISABLE_FLAG(wm, s) : WIIMOTE_ENABLE_FLAG(wm, s))

◆ WIIMOTE_TOGGLE_STATE

#define WIIMOTE_TOGGLE_STATE (   wm,
  s 
)    ((wm->state & (s)) ? WIIMOTE_DISABLE_STATE(wm, s) : WIIMOTE_ENABLE_STATE(wm, s))

◆ WIIUSE_DEFAULT_SMOOTH_ALPHA

#define WIIUSE_DEFAULT_SMOOTH_ALPHA   0.3f

◆ WIIUSE_VERSION

#define WIIUSE_VERSION   "0.12"

◆ WM_ASPECT_16_9_X

#define WM_ASPECT_16_9_X   660

◆ WM_ASPECT_16_9_Y

#define WM_ASPECT_16_9_Y   370

◆ WM_ASPECT_4_3_X

#define WM_ASPECT_4_3_X   560

◆ WM_ASPECT_4_3_Y

#define WM_ASPECT_4_3_Y   420

◆ WM_BT_INPUT

#define WM_BT_INPUT   0x01

◆ WM_BT_OUTPUT

#define WM_BT_OUTPUT   0x02

◆ WM_CMD_CTRL_STATUS

#define WM_CMD_CTRL_STATUS   0x15

◆ WM_CMD_IR

#define WM_CMD_IR   0x13

◆ WM_CMD_IR_2

#define WM_CMD_IR_2   0x1A

◆ WM_CMD_LED

#define WM_CMD_LED   0x11

◆ WM_CMD_READ_DATA

#define WM_CMD_READ_DATA   0x17

◆ WM_CMD_REPORT_TYPE

#define WM_CMD_REPORT_TYPE   0x12

◆ WM_CMD_RUMBLE

#define WM_CMD_RUMBLE   0x10

◆ WM_CMD_SPEAKER_ENABLE

#define WM_CMD_SPEAKER_ENABLE   0x14

◆ WM_CMD_SPEAKER_MUTE

#define WM_CMD_SPEAKER_MUTE   0x19

◆ WM_CMD_STREAM_DATA

#define WM_CMD_STREAM_DATA   0x18

◆ WM_CMD_WRITE_DATA

#define WM_CMD_WRITE_DATA   0x16

◆ WM_CTRL_STATUS_BYTE1_ATTACHMENT

#define WM_CTRL_STATUS_BYTE1_ATTACHMENT   0x02

◆ WM_CTRL_STATUS_BYTE1_IR_ENABLED

#define WM_CTRL_STATUS_BYTE1_IR_ENABLED   0x08

◆ WM_CTRL_STATUS_BYTE1_LED_1

#define WM_CTRL_STATUS_BYTE1_LED_1   0x10

◆ WM_CTRL_STATUS_BYTE1_LED_2

#define WM_CTRL_STATUS_BYTE1_LED_2   0x20

◆ WM_CTRL_STATUS_BYTE1_LED_3

#define WM_CTRL_STATUS_BYTE1_LED_3   0x40

◆ WM_CTRL_STATUS_BYTE1_LED_4

#define WM_CTRL_STATUS_BYTE1_LED_4   0x80

◆ WM_CTRL_STATUS_BYTE1_SPEAKER_ENABLED

#define WM_CTRL_STATUS_BYTE1_SPEAKER_ENABLED   0x04

◆ WM_DATA

#define WM_DATA   0xA0

◆ WM_DEV_CLASS_0

#define WM_DEV_CLASS_0   0x04

◆ WM_DEV_CLASS_1

#define WM_DEV_CLASS_1   0x25

◆ WM_DEV_CLASS_2

#define WM_DEV_CLASS_2   0x00

◆ WM_EXP_ID

#define WM_EXP_ID   0x04A400FA

◆ WM_EXP_MEM_BASE

#define WM_EXP_MEM_BASE   0x04A40000

◆ WM_EXP_MEM_CALIBR

#define WM_EXP_MEM_CALIBR   0x04A40020

◆ WM_EXP_MEM_ENABLE1

#define WM_EXP_MEM_ENABLE1   0x04A400F0

◆ WM_EXP_MEM_ENABLE2

#define WM_EXP_MEM_ENABLE2   0x04A400FB

◆ WM_EXP_MEM_KEY

#define WM_EXP_MEM_KEY   0x04A40040

◆ WM_EXP_MOTION_PLUS_ENABLE

#define WM_EXP_MOTION_PLUS_ENABLE   0x04A600FE

◆ WM_INPUT_CHANNEL

#define WM_INPUT_CHANNEL   0x13

◆ WM_IR_BLOCK1_LEVEL1

#define WM_IR_BLOCK1_LEVEL1   "\x02\x00\x00\x71\x01\x00\x64\x00\xfe"

◆ WM_IR_BLOCK1_LEVEL2

#define WM_IR_BLOCK1_LEVEL2   "\x02\x00\x00\x71\x01\x00\x96\x00\xb4"

◆ WM_IR_BLOCK1_LEVEL3

#define WM_IR_BLOCK1_LEVEL3   "\x02\x00\x00\x71\x01\x00\xaa\x00\x64"

◆ WM_IR_BLOCK1_LEVEL4

#define WM_IR_BLOCK1_LEVEL4   "\x02\x00\x00\x71\x01\x00\xc8\x00\x36"

◆ WM_IR_BLOCK1_LEVEL5

#define WM_IR_BLOCK1_LEVEL5   "\x07\x00\x00\x71\x01\x00\x72\x00\x20"

◆ WM_IR_BLOCK2_LEVEL1

#define WM_IR_BLOCK2_LEVEL1   "\xfd\x05"

◆ WM_IR_BLOCK2_LEVEL2

#define WM_IR_BLOCK2_LEVEL2   "\xb3\x04"

◆ WM_IR_BLOCK2_LEVEL3

#define WM_IR_BLOCK2_LEVEL3   "\x63\x03"

◆ WM_IR_BLOCK2_LEVEL4

#define WM_IR_BLOCK2_LEVEL4   "\x35\x03"

◆ WM_IR_BLOCK2_LEVEL5

#define WM_IR_BLOCK2_LEVEL5   "\x1f\x03"

◆ WM_IR_TYPE_BASIC

#define WM_IR_TYPE_BASIC   0x01

◆ WM_IR_TYPE_EXTENDED

#define WM_IR_TYPE_EXTENDED   0x03

◆ WM_IR_TYPE_FULL

#define WM_IR_TYPE_FULL   0x05

◆ WM_MAX_BATTERY_CODE

#define WM_MAX_BATTERY_CODE   0xC8

◆ WM_MEM_OFFSET_CALIBRATION

#define WM_MEM_OFFSET_CALIBRATION   0x16

◆ WM_OUTPUT_CHANNEL

#define WM_OUTPUT_CHANNEL   0x11

◆ WM_PRODUCT_ID

#define WM_PRODUCT_ID   0x0306

◆ WM_REG_IR

#define WM_REG_IR   0x04B00030

◆ WM_REG_IR_BLOCK1

#define WM_REG_IR_BLOCK1   0x04B00000

◆ WM_REG_IR_BLOCK2

#define WM_REG_IR_BLOCK2   0x04B0001A

◆ WM_REG_IR_MODENUM

#define WM_REG_IR_MODENUM   0x04B00033

◆ WM_REG_SPEAKER_BLOCK

#define WM_REG_SPEAKER_BLOCK   0x04A20001

◆ WM_REG_SPEAKER_REG1

#define WM_REG_SPEAKER_REG1   0x04A20001

◆ WM_REG_SPEAKER_REG2

#define WM_REG_SPEAKER_REG2   0x04A20008

◆ WM_REG_SPEAKER_REG3

#define WM_REG_SPEAKER_REG3   0x04A20009

◆ WM_RPT_ACK

#define WM_RPT_ACK   0x22

◆ WM_RPT_BTN

#define WM_RPT_BTN   0x30

◆ WM_RPT_BTN_ACC

#define WM_RPT_BTN_ACC   0x31

◆ WM_RPT_BTN_ACC_EXP

#define WM_RPT_BTN_ACC_EXP   0x35

◆ WM_RPT_BTN_ACC_IR

#define WM_RPT_BTN_ACC_IR   0x33

◆ WM_RPT_BTN_ACC_IR_EXP

#define WM_RPT_BTN_ACC_IR_EXP   0x37

◆ WM_RPT_BTN_EXP

#define WM_RPT_BTN_EXP   0x34

◆ WM_RPT_BTN_IR_EXP

#define WM_RPT_BTN_IR_EXP   0x36

◆ WM_RPT_CTRL_STATUS

#define WM_RPT_CTRL_STATUS   0x20

◆ WM_RPT_READ

#define WM_RPT_READ   0x21

◆ WM_SET_REPORT

#define WM_SET_REPORT   0x50

◆ WM_VENDOR_ID

#define WM_VENDOR_ID   0x057E

Function Documentation

◆ __attribute__()

struct op_t __attribute__ ( (packed )

◆ wiiuse_init_cmd_queue()

void wiiuse_init_cmd_queue ( struct wiimote_t wm)
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_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:

Variable Documentation

◆ @881

union { ... }

◆ __data

ubyte __data[MAX_PAYLOAD]

◆ addr

◆ buffer

◆ cmd

ubyte cmd

◆ data

ubyte data[16]

◆ readdata

struct { ... } readdata

◆ size

◆ wait

int wait

◆ writedata

struct { ... } writedata