Subversion Repositories HelenOS

Rev

Rev 4296 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4296 Rev 4420
Line 195... Line 195...
195
#ifdef CONFIG_PC_KBD
195
#ifdef CONFIG_PC_KBD
196
    /*
196
    /*
197
     * Initialize the i8042 controller. Then initialize the keyboard
197
     * Initialize the i8042 controller. Then initialize the keyboard
198
     * module and connect it to i8042. Enable keyboard interrupts.
198
     * module and connect it to i8042. Enable keyboard interrupts.
199
     */
199
     */
200
    indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD);
200
    i8042_instance_t *i8042_instance = i8042_init((i8042_t *) I8042_BASE, IRQ_KBD);
-
 
201
    if (i8042_instance) {
-
 
202
        kbrd_instance_t *kbrd_instance = kbrd_init();
201
    if (kbrdin) {
203
        if (kbrd_instance) {
202
        kbrd_init(kbrdin);
204
            indev_t *sink = stdin_wire();
-
 
205
            indev_t *kbrd = kbrd_wire(kbrd_instance, sink);
-
 
206
            i8042_wire(i8042_instance, kbrd);
203
        trap_virtual_enable_irqs(1 << IRQ_KBD);
207
            trap_virtual_enable_irqs(1 << IRQ_KBD);
-
 
208
        }
204
    }
209
    }
205
   
210
   
206
    /*
211
    /*
207
     * This is the necessary evil until the userspace driver is entirely
212
     * This is the necessary evil until the userspace driver is entirely
208
     * self-sufficient.
213
     * self-sufficient.