Rev 4026 | Rev 4329 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4026 | Rev 4148 | ||
---|---|---|---|
Line 41... | Line 41... | ||
41 | #include <async.h> |
41 | #include <async.h> |
42 | #include <unistd.h> |
42 | #include <unistd.h> |
43 | #include <sysinfo.h> |
43 | #include <sysinfo.h> |
44 | #include <kbd_port.h> |
44 | #include <kbd_port.h> |
45 | #include <kbd.h> |
45 | #include <kbd.h> |
- | 46 | #include <ddi.h> |
|
46 | #include "i8042.h" |
47 | #include "i8042.h" |
47 | 48 | ||
48 | /* Interesting bits for status register */ |
49 | /* Interesting bits for status register */ |
49 | #define i8042_OUTPUT_FULL 0x1 |
50 | #define i8042_OUTPUT_FULL 0x1 |
50 | #define i8042_INPUT_FULL 0x2 |
51 | #define i8042_INPUT_FULL 0x2 |
Line 134... | Line 135... | ||
134 | (void) pio_read_8(&i8042->data); |
135 | (void) pio_read_8(&i8042->data); |
135 | 136 | ||
136 | /* Enable kbd */ |
137 | /* Enable kbd */ |
137 | i8042_kbd.cmds[0].addr = &((i8042_t *) i8042_kernel)->status; |
138 | i8042_kbd.cmds[0].addr = &((i8042_t *) i8042_kernel)->status; |
138 | i8042_kbd.cmds[3].addr = &((i8042_t *) i8042_kernel)->data; |
139 | i8042_kbd.cmds[3].addr = &((i8042_t *) i8042_kernel)->data; |
139 | ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"), 0, &i8042_kbd); |
140 | ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(), 0, &i8042_kbd); |
140 | 141 | ||
141 | int newcontrol = i8042_KBD_IE | i8042_KBD_TRANSLATE; |
142 | int newcontrol = i8042_KBD_IE | i8042_KBD_TRANSLATE; |
142 | if (mouseenabled) |
143 | if (mouseenabled) |
143 | newcontrol |= i8042_MOUSE_IE; |
144 | newcontrol |= i8042_MOUSE_IE; |
144 | 145 |