Subversion Repositories shark

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
494 giacomo 1
#ifndef _PSMOUSE_H
2
#define _PSMOUSE_H
3
 
4
#define PSMOUSE_CMD_SETSCALE11  0x00e6
5
#define PSMOUSE_CMD_SETRES      0x10e8
6
#define PSMOUSE_CMD_GETINFO     0x03e9
7
#define PSMOUSE_CMD_SETSTREAM   0x00ea
8
#define PSMOUSE_CMD_POLL        0x03eb  
9
#define PSMOUSE_CMD_GETID       0x02f2
10
#define PSMOUSE_CMD_SETRATE     0x10f3
11
#define PSMOUSE_CMD_ENABLE      0x00f4
12
#define PSMOUSE_CMD_RESET_DIS   0x00f6
13
#define PSMOUSE_CMD_RESET_BAT   0x02ff
14
 
15
#define PSMOUSE_RET_BAT         0xaa
16
#define PSMOUSE_RET_ID          0x00
17
#define PSMOUSE_RET_ACK         0xfa
18
#define PSMOUSE_RET_NAK         0xfe
19
 
20
/* psmouse states */
21
#define PSMOUSE_NEW_DEVICE      0
22
#define PSMOUSE_ACTIVATED       1
23
#define PSMOUSE_IGNORE          2
24
 
25
struct psmouse {
26
        void *private;
27
        struct input_dev dev;
28
        struct serio *serio;
29
        char *vendor;
30
        char *name;
31
        unsigned char cmdbuf[8];
32
        unsigned char packet[8];
33
        unsigned char cmdcnt;
34
        unsigned char pktcnt;
35
        unsigned char type;
36
        unsigned char model;
37
        unsigned long last;
38
        unsigned char state;
39
        char acking;
40
        volatile char ack;
41
        char error;
42
        char devname[64];
43
        char phys[32];
44
};
45
 
46
#define PSMOUSE_PS2             1
47
#define PSMOUSE_PS2PP           2
48
#define PSMOUSE_PS2TPP          3
49
#define PSMOUSE_GENPS           4
50
#define PSMOUSE_IMPS            5
51
#define PSMOUSE_IMEX            6
52
#define PSMOUSE_SYNAPTICS       7
53
 
54
int psmouse_command(struct psmouse *psmouse, unsigned char *param, int command);
55
 
56
extern int psmouse_smartscroll;
57
extern unsigned int psmouse_resetafter;
58
 
59
#endif /* _PSMOUSE_H */