summaryrefslogtreecommitdiff
path: root/global_defs.h
blob: 248da05caa92b6f48485702beda1d062f54046d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <stdio.h>
#include <unistd.h>
#include <linux/input.h>
#include <fcntl.h>
#include <sys/time.h>
#include <stdlib.h>
#include <stdint.h>

//magic numbers
#define NUM_EVENTS              14              //steam + xbox + ps4 * 6 + wii * 4 + mouse
#define NUM_EVENTS_PS4      	3
#define NUM_EVENTS_WII      	4
                                                
#define PS4_BT_TOUCH_BIT        32
#define PS4_BT_GYRO_BIT         64
#define PS4_BT_BUTTONS_BIT      128
#define PS4_BT_ALL_BITS         224             // 128 + 64 + 32

#define PS4_WIRED_TOUCH_BIT     4               
#define PS4_WIRED_GYRO_BIT      8               
#define PS4_WIRED_BUTTONS_BIT   16              
#define PS4_WIRED_ALL_BITS      28              // 16 + 8 + 4

#define NINTENDO_GYRO_BIT       256     
#define NINTENDO_IR_BIT         512
#define NINTENDO_BUTTONS_BIT    1024 
#define NINTENDO_NUNCHUCK_BIT	2048
#define NINTENDO_ALL_BITS    	3840            // 2048 + 1024 + 512 + 256

enum {
        IR = 0, TOUCHPAD = 0, GYRO = 1, BUTTONS = 2, NUNCHUCK = 3
};

enum {
        VALVE_STEAM = 0,
        XBOX_360 = 1,
        PS4_WIRED_GYRO = 2, PS4_WIRED_BUTTONS = 3, PS4_WIRED_TOUCH = 4,
        PS4_BT_GYRO = 5, PS4_BT_BUTTONS = 6, PS4_BT_TOUCH = 7,
        WII_GYRO = 8, WII_IR = 9, WII_BUTTONS = 10, WII_NUNCHUCK = 11, 
	MOUSE = 12
};