]> git.draconx.ca Git - gentoo-draconx.git/blob - app-misc/ps2emu/files/userio.h
Add ps2emu ebuild.
[gentoo-draconx.git] / app-misc / ps2emu / files / userio.h
1 /*
2  * userio.h
3  * Copyright (C) 2015 Red Hat
4  * Copyright (C) 2015 Lyude (Stephen Chandler Paul) <cpaul@redhat.com>
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License as published by the
8  * Free Software Foundation; either version 2 of the License, or (at your
9  * option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14  * details.
15  *
16  * This is the public header used for user-space communication with the userio
17  * driver. __attribute__((__packed__)) is used  for all structs to keep ABI
18  * compatibility between all architectures.
19  */
20
21 #ifndef _USERIO_H
22 #define _USERIO_H
23
24 #include <linux/types.h>
25
26 #define USERIO_CMD_REGISTER             0
27 #define USERIO_CMD_SET_PORT_TYPE        1
28 #define USERIO_CMD_SEND_INTERRUPT       2
29
30 /*
31  * userio Commands
32  * All commands sent to /dev/userio are encoded using this structure. The type
33  * field should contain a USERIO_CMD* value that indicates what kind of command
34  * is being sent to userio. The data field should contain the accompanying
35  * argument for the command, if there is one.
36  */
37 struct userio_cmd {
38         __u8 type;
39         __u8 data;
40 } __attribute__((__packed__));
41
42 #endif /* !_USERIO_H */