UniSaSA  1.0
C Gateway
Macros | Functions
wiimoteConnector.h File Reference
#include <stdio.h>
#include <errno.h>
#include <math.h>
#include <xwiimote.h>
#include "connector.h"
#include "unisasa_types.h"

Go to the source code of this file.

Macros

#define ID_WIIMOTE_BATTERY   0x00
 
#define ID_WIIMOTE_BUTTON_ONE   0x01
 
#define ID_WIIMOTE_BUTTON_TWO   0x02
 
#define ID_WIIMOTE_BUTTON_MINUS   0x03
 
#define ID_WIIMOTE_BUTTON_PLUS   0x04
 
#define ID_WIIMOTE_BUTTON_HOME   0x05
 
#define ID_WIIMOTE_BUTTON_A   0x06
 
#define ID_WIIMOTE_BUTTON_B   0x07
 
#define ID_WIIMOTE_BUTTON_UP   0x08
 
#define ID_WIIMOTE_BUTTON_DOWN   0x09
 
#define ID_WIIMOTE_BUTTON_LEFT   0x0A
 
#define ID_WIIMOTE_BUTTON_RIGHT   0x0b
 
#define ID_WIIMOTE_ACCELEROMETER_X_AXIS   0x0C
 
#define ID_WIIMOTE_ACCELEROMETER_Y_AXIS   0x0D
 
#define ID_WIIMOTE_ACCELEROMETER_Z_AXIS   0x0E
 
#define BUTTON_PRESSED   1
 
#define BUTTON_UNPRESSED   0
 
#define FIRST_BUTTON   ID_WIIMOTE_BUTTON_ONE
 
#define LAST_BUTTON   ID_WIIMOTE_BUTTON_RIGHT
 
#define ID_WIIMOTE_RUMBLE   0x0F
 
#define ID_WIIMOTE_LED_1   0x10
 
#define ID_WIIMOTE_LED_2   0x11
 
#define ID_WIIMOTE_LED_3   0x12
 
#define ID_WIIMOTE_LED_4   0x13
 

Functions

connectorInterface_t createWiiMoteConnector ()
 
void close_wiimote_device ()
 

Function Documentation

◆ close_wiimote_device()

void close_wiimote_device ( )

Close the wiimote connection

Definition at line 53 of file wiimoteConnector.c.

◆ createWiiMoteConnector()

connectorInterface_t createWiiMoteConnector ( )

Create a wiimote connector

Returns
wiimoteConnector

Definition at line 368 of file wiimoteConnector.c.