Mercurial > remote-gamepad-server
diff uinput.h @ 0:e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 22 Feb 2015 01:38:06 +0100 |
parents | |
children | f362b20de51e |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/uinput.h @@ -0,0 +1,33 @@ +#ifndef UINPUT_H +#define UINPUT_H + + +#include <linux/input.h> +#include <linux/uinput.h> + +#define DS_MIN_X 0 +#define DS_MAX_X 255 +#define DS_MIN_Y 0 +#define DS_MAX_Y 191 + + +/* + Create a new uinput device + Returns: device descriptor + */ +extern int init_uinput_device(void); + + +/* + Send an event into the uinput device + Returns: TRUE, FALSE +*/ +extern int do_uinput(int fd, unsigned short key, int pressed, unsigned short event_type); + + +/* + Synchonize events +*/ +extern void flush_uinput(int fd); + +#endif /* UINPUT_H */