Subversion Repositories HelenOS

Rev

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

Rev 3924 Rev 3947
Line 61... Line 61...
61
 
61
 
62
/* Mouse constants */
62
/* Mouse constants */
63
#define MOUSE_OUT_INIT  0xf4
63
#define MOUSE_OUT_INIT  0xf4
64
#define MOUSE_ACK       0xfa
64
#define MOUSE_ACK       0xfa
65
 
65
 
66
static irq_cmd_t i8042_cmds[2] = {
66
static irq_cmd_t i8042_cmds[] = {
-
 
67
    {
-
 
68
        .cmd = CMD_PIO_READ_8,
67
    { CMD_PORT_READ_1, (void *) 0x64, 0, 1 },
69
        .addr = (void *) 0x64,
-
 
70
        .dstarg = 1
-
 
71
    },
-
 
72
    {
-
 
73
        .cmd = CMD_BTEST,
-
 
74
        .value = i8042_OUTPUT_FULL,
-
 
75
        .srcarg = 1,
-
 
76
        .dstarg = 3
-
 
77
    },
-
 
78
    {
-
 
79
        .cmd = CMD_PREDICATE,
-
 
80
        .value = 2,
-
 
81
        .srcarg = 3
-
 
82
    },
-
 
83
    {
-
 
84
        .cmd = CMD_PIO_READ_8,
68
    { CMD_PORT_READ_1, (void *) 0x60, 0, 2 }
85
        .addr = (void *) 0x60,
-
 
86
        .dstarg = 2
-
 
87
    },
-
 
88
    {
-
 
89
        .cmd = CMD_ACCEPT
-
 
90
    }
69
};
91
};
70
 
92
 
71
static irq_code_t i8042_kbd = {
93
static irq_code_t i8042_kbd = {
72
    2,
94
    sizeof(i8042_cmds) / sizeof(irq_cmd_t),
73
    i8042_cmds
95
    i8042_cmds
74
};
96
};
75
 
97
 
76
static void wait_ready(void) {
98
static void wait_ready(void) {
77
    while (i8042_status_read() & i8042_INPUT_FULL)
99
    while (i8042_status_read() & i8042_INPUT_FULL)