Rev 130 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 130 | Rev 483 | ||
---|---|---|---|
1 | #if !defined(EVDEV_HANDLER_H) |
1 | #if !defined(EVDEV_HANDLER_H) |
2 | #define EVDEV_HANDLER_H |
2 | #define EVDEV_HANDLER_H |
3 | 3 | ||
4 | #include <stdio.h> |
4 | #include <stdio.h> |
5 | #include <sys/types.h> |
5 | #include <sys/types.h> |
6 | #include <fcntl.h> |
6 | #include <fcntl.h> |
7 | #include <stdlib.h> |
7 | #include <stdlib.h> |
8 | #include <unistd.h>//for close() for socket |
8 | #include <unistd.h>//for close() for socket |
9 | #include <string.h> |
9 | #include <string.h> |
10 | #include <linux/joystick.h> |
10 | #include <linux/joystick.h> |
11 | #include <netinet/in.h> |
11 | #include <netinet/in.h> |
- | 12 | ||
- | 13 | #include <sys/types.h> |
|
- | 14 | #include <sys/dir.h> |
|
- | 15 | #include <sys/param.h> |
|
12 | 16 | ||
13 | 17 | #define MAX_EVDEVS 20 |
|
14 | 18 | ||
15 | #define test_bit(bit, array) (array[bit/8] & (1<<(bit%8))) |
19 | #define test_bit(bit, array) (array[bit/8] & (1<<(bit%8))) |
16 | 20 | ||
17 | int connect_evdev(char* input_evdev_name); |
21 | int connect_evdev(); |
18 | int blink_evdev_led(); |
22 | int blink_evdev_led(); |
19 | int init_evdevstatus_led(); |
23 | int init_evdevstatus_led(); |
20 | int poll_evdev(); |
24 | int poll_evdev(); |
- | 25 | void collect_evdev_devices(); |
|
21 | 26 | ||
22 | extern int *evdev_rel_axis; |
27 | extern int *evdev_rel_axis; |
23 | extern char *evdev_button; |
28 | extern char *evdev_button; |
24 | 29 | ||
- | 30 | ||
- | 31 | ||
- | 32 | typedef struct |
|
- | 33 | { |
|
- | 34 | char name[255]; |
|
- | 35 | char fname[255]; |
|
- | 36 | } evdevs_t ; |
|
- | 37 | ||
- | 38 | evdevs_t evdevs[MAX_EVDEVS]; |
|
- | 39 | extern int evdevs_count; |
|
- | 40 | ||
- | 41 | ||
- | 42 | #define FALSE 0 |
|
- | 43 | #define TRUE 1 |
|
25 | 44 | ||
26 | #endif |
45 | #endif |
27 | 46 |