Rev 4296 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4296 | Rev 4420 | ||
---|---|---|---|
Line 153... | Line 153... | ||
153 | #ifdef CONFIG_PC_KBD |
153 | #ifdef CONFIG_PC_KBD |
154 | /* |
154 | /* |
155 | * Initialize the i8042 controller. Then initialize the keyboard |
155 | * Initialize the i8042 controller. Then initialize the keyboard |
156 | * module and connect it to i8042. Enable keyboard interrupts. |
156 | * module and connect it to i8042. Enable keyboard interrupts. |
157 | */ |
157 | */ |
158 | indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD); |
158 | i8042_instance_t *i8042_instance = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD); |
- | 159 | if (i8042_instance) { |
|
- | 160 | kbrd_instance_t *kbrd_instance = kbrd_init(); |
|
159 | if (kbrdin) { |
161 | if (kbrd_instance) { |
160 | kbrd_init(kbrdin); |
162 | indev_t *sink = stdin_wire(); |
- | 163 | indev_t *kbrd = kbrd_wire(kbrd_instance, sink); |
|
- | 164 | i8042_wire(i8042_instance, kbrd); |
|
161 | trap_virtual_enable_irqs(1 << IRQ_KBD); |
165 | trap_virtual_enable_irqs(1 << IRQ_KBD); |
162 | } |
166 | } |
- | 167 | } |
|
163 | 168 | ||
164 | /* |
169 | /* |
165 | * This is the necessary evil until the userspace driver is entirely |
170 | * This is the necessary evil until the userspace driver is entirely |
166 | * self-sufficient. |
171 | * self-sufficient. |
167 | */ |
172 | */ |