forked from mikepurvis/sixad
-
Notifications
You must be signed in to change notification settings - Fork 2
/
uinput.h
41 lines (33 loc) · 1.14 KB
/
uinput.h
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
/*
* uinput.h
*
* This file is part of the QtSixA, the Sixaxis Joystick Manager
* Copyright 2008-2011 Filipe Coelho <falktx@gmail.com>
*
* QtSixA can be redistributed and/or modified under the terms of the GNU General
* Public License (Version 2), as published by the Free Software Foundation.
* A copy of the license is included in the QtSixA source code, or can be found
* online at www.gnu.org/licenses.
*
* QtSixA is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
*/
#ifndef UINPUT_H
#define UINPUT_H
#include <linux/input.h>
#include <linux/uinput.h>
#define MAX_RUMBLE_EFFECTS 16
#define DEV_TYPE_SIXAXIS 1
#define DEV_TYPE_REMOTE 2
#define DEV_TYPE_3IN1 3
#define AXIS_PADDING 10
struct uinput_fd {
int js;
int mk;
};
struct uinput_fd *uinput_open(int DEV_TYPE, const char *mac, struct device_settings settings);
int uinput_close(int fd, int debug=0);
int uinput_send(int fd, unsigned short type, unsigned short code, int value);
#endif // UINPUT_H