1 #ifndef _LINUX_MOUSE_H
2 #define _LINUX_MOUSE_H
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #define MOUSE_IRQ 5
18
19 #define MSE_DATA_PORT 0x23c
20 #define MSE_SIGNATURE_PORT 0x23d
21 #define MSE_CONTROL_PORT 0x23e
22 #define MSE_INTERRUPT_PORT 0x23e
23 #define MSE_CONFIG_PORT 0x23f
24
25 #define MSE_ENABLE_INTERRUPTS 0x00
26 #define MSE_DISABLE_INTERRUPTS 0x10
27
28 #define MSE_READ_X_LOW 0x80
29 #define MSE_READ_X_HIGH 0xa0
30 #define MSE_READ_Y_LOW 0xc0
31 #define MSE_READ_Y_HIGH 0xe0
32
33
34 #define MSE_CONFIG_BYTE 0x91
35 #define MSE_DEFAULT_MODE 0x90
36 #define MSE_SIGNATURE_BYTE 0xa5
37
38
39
40 #define MSE_INT_OFF() outb(MSE_DISABLE_INTERRUPTS, MSE_CONTROL_PORT)
41 #define MSE_INT_ON() outb(MSE_ENABLE_INTERRUPTS, MSE_CONTROL_PORT)
42
43 struct mouse_status
44 {
45 char buttons;
46 char latch_buttons;
47 int dx;
48 int dy;
49
50 int present;
51 int ready;
52 int active;
53
54 struct inode *inode;
55 };
56
57
58 extern long mouse_init(long);
59
60 #endif
61