UniSaSA  1.0
C Gateway
wiimoteConnector.h
Go to the documentation of this file.
1 
5 #ifndef _UNISASA_WIIMOTE_CONNECTOR__H_
6 #define _UNISASA_WIIMOTE_CONNECTOR__H_
7 
8 #include <stdio.h>
9 #include <errno.h>
10 #include <math.h>
11 #include <xwiimote.h>
12 #include "connector.h"
13 #include "unisasa_types.h"
14 
15 //Sensors
16 #define ID_WIIMOTE_BATTERY 0x00
17 #define ID_WIIMOTE_BUTTON_ONE 0x01
18 #define ID_WIIMOTE_BUTTON_TWO 0x02
19 #define ID_WIIMOTE_BUTTON_MINUS 0x03
20 #define ID_WIIMOTE_BUTTON_PLUS 0x04
21 #define ID_WIIMOTE_BUTTON_HOME 0x05
22 #define ID_WIIMOTE_BUTTON_A 0x06
23 #define ID_WIIMOTE_BUTTON_B 0x07
24 #define ID_WIIMOTE_BUTTON_UP 0x08
25 #define ID_WIIMOTE_BUTTON_DOWN 0x09
26 #define ID_WIIMOTE_BUTTON_LEFT 0x0A
27 #define ID_WIIMOTE_BUTTON_RIGHT 0x0b
28 #define ID_WIIMOTE_ACCELEROMETER_X_AXIS 0x0C
29 #define ID_WIIMOTE_ACCELEROMETER_Y_AXIS 0x0D
30 #define ID_WIIMOTE_ACCELEROMETER_Z_AXIS 0x0E
31 
32 #define BUTTON_PRESSED 1
33 #define BUTTON_UNPRESSED 0
34 
35 #define FIRST_BUTTON ID_WIIMOTE_BUTTON_ONE
36 #define LAST_BUTTON ID_WIIMOTE_BUTTON_RIGHT
37 
38 //Actuators
39 #define ID_WIIMOTE_RUMBLE 0x0F
40 #define ID_WIIMOTE_LED_1 0x10
41 #define ID_WIIMOTE_LED_2 0x11
42 #define ID_WIIMOTE_LED_3 0x12
43 #define ID_WIIMOTE_LED_4 0x13
44 
51 
56 
57 #endif
58 
void close_wiimote_device()
connectorInterface_t createWiiMoteConnector()