Subversion Repositories HelenOS

Rev

Rev 3951 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3951 Rev 4148
Line 37... Line 37...
37
#include <ipc/ipc.h>
37
#include <ipc/ipc.h>
38
#include <async.h>
38
#include <async.h>
39
#include <sysinfo.h>
39
#include <sysinfo.h>
40
#include <kbd_port.h>
40
#include <kbd_port.h>
41
#include <kbd.h>
41
#include <kbd.h>
-
 
42
#include <ddi.h>
42
 
43
 
43
static irq_cmd_t gxemul_cmds[] = {
44
static irq_cmd_t gxemul_cmds[] = {
44
    {
45
    {
45
        .cmd = CMD_PIO_READ_8,
46
        .cmd = CMD_PIO_READ_8,
46
        .addr = (void *) 0,     /* will be patched in run-time */
47
        .addr = (void *) 0,     /* will be patched in run-time */
Line 61... Line 62...
61
/** Initializes keyboard handler. */
62
/** Initializes keyboard handler. */
62
int kbd_port_init(void)
63
int kbd_port_init(void)
63
{
64
{
64
    async_set_interrupt_received(gxemul_irq_handler);
65
    async_set_interrupt_received(gxemul_irq_handler);
65
    gxemul_cmds[0].addr = (void *) sysinfo_value("kbd.address.virtual");
66
    gxemul_cmds[0].addr = (void *) sysinfo_value("kbd.address.virtual");
66
    ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"),
67
    ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(),
67
        0, &gxemul_kbd);
68
        0, &gxemul_kbd);
68
    return 0;
69
    return 0;
69
}
70
}
70
 
71
 
71
/** Process data sent when a key is pressed.
72
/** Process data sent when a key is pressed.