Rev 549 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
538 | mauro | 1 | /* |
2 | * Project: S.Ha.R.K. |
||
3 | * |
||
4 | * Coordinators: |
||
5 | * Giorgio Buttazzo <giorgio@sssup.it> |
||
6 | * Paolo Gai <pj@gandalf.sssup.it> |
||
7 | * |
||
8 | * Authors : |
||
9 | * Mauro Marinoni <mauro.marinoni@unipv.it> |
||
10 | * |
||
11 | * |
||
12 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
13 | * |
||
14 | * http://www.sssup.it |
||
15 | * http://retis.sssup.it |
||
16 | * http://shark.sssup.it |
||
17 | */ |
||
18 | |||
19 | /* Game Header Linux Input Driver*/ |
||
20 | |||
21 | #ifndef __SHARK_JOY26_H__ |
||
22 | #define __SHARK_JOY26_H__ |
||
23 | |||
548 | mauro | 24 | /* Flag Codes */ |
25 | #define BTN1_BIT 0x01 |
||
26 | #define BTN2_BIT 0x02 |
||
27 | #define BTN3_BIT 0x04 |
||
28 | #define BTN4_BIT 0x08 |
||
29 | |||
826 | mauro | 30 | #define isButton1Pressed(b) (b & BTN1_BIT) |
31 | #define isButton2Pressed(b) (b & BTN2_BIT) |
||
32 | #define isButton3Pressed(b) (b & BTN3_BIT) |
||
33 | #define isButton4Pressed(b) (b & BTN4_BIT) |
||
34 | #define isButtonPressed(b, n) (b & (1<<n)) |
||
548 | mauro | 35 | |
36 | void joy_getstatus(int *axe0, int *axe1, int *axe2, int *axe3, int *button); |
||
37 | void joy_setstatus(int axe0, int axe1, int axe2, int axe3, int button); |
||
38 | |||
547 | mauro | 39 | void joy_enable(void); |
40 | void joy_disable(void); |
||
41 | |||
549 | mauro | 42 | int JOY26_installed(void); |
538 | mauro | 43 | int JOY26_init(void); |
44 | int JOY26_close(void); |
||
45 | #endif |
||
46 |