Rev 1757 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1757 | Rev 1759 | ||
---|---|---|---|
Line 68... | Line 68... | ||
68 | * | `---------- IBM scancode translation 0=AT, 1=PC/XT |
68 | * | `---------- IBM scancode translation 0=AT, 1=PC/XT |
69 | * `----------- reserved, should be 0 |
69 | * `----------- reserved, should be 0 |
70 | */ |
70 | */ |
71 | 71 | ||
72 | #define i8042_SET_COMMAND 0x60 |
72 | #define i8042_SET_COMMAND 0x60 |
73 | #define i8042_COMMAND 0x49 |
73 | #define i8042_COMMAND 0x69 |
74 | 74 | ||
75 | #define i8042_BUFFER_FULL_MASK 0x01 |
75 | #define i8042_BUFFER_FULL_MASK 0x01 |
76 | #define i8042_WAIT_MASK 0x02 |
76 | #define i8042_WAIT_MASK 0x02 |
- | 77 | #define i8042_MOUSE_DATA 0x20 |
|
77 | 78 | ||
78 | #define SPECIAL '?' |
79 | #define SPECIAL '?' |
79 | #define KEY_RELEASE 0x80 |
80 | #define KEY_RELEASE 0x80 |
80 | 81 | ||
81 | /** |
82 | /** |
Line 320... | Line 321... | ||
320 | * @param istate Interrupted state. |
321 | * @param istate Interrupted state. |
321 | */ |
322 | */ |
322 | void i8042_interrupt(int n, istate_t *istate) |
323 | void i8042_interrupt(int n, istate_t *istate) |
323 | { |
324 | { |
324 | __u8 x; |
325 | __u8 x; |
- | 326 | __u8 status; |
|
325 | 327 | ||
326 | while ((i8042_status_read() & i8042_BUFFER_FULL_MASK)) { |
328 | while (((status=i8042_status_read()) & i8042_BUFFER_FULL_MASK)) { |
327 | x = i8042_data_read(); |
329 | x = i8042_data_read(); |
- | 330 | ||
- | 331 | if ((status & i8042_MOUSE_DATA)) |
|
- | 332 | continue; |
|
- | 333 | ||
328 | if (x & KEY_RELEASE) |
334 | if (x & KEY_RELEASE) |
329 | key_released(x ^ KEY_RELEASE); |
335 | key_released(x ^ KEY_RELEASE); |
330 | else |
336 | else |
331 | key_pressed(x); |
337 | key_pressed(x); |
332 | } |
338 | } |