Rev 1649 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1649 | Rev 1694 | ||
---|---|---|---|
Line 35... | Line 35... | ||
35 | */ |
35 | */ |
36 | 36 | ||
37 | #include <arch/kbd.h> |
37 | #include <arch/kbd.h> |
38 | #include <ipc/ipc.h> |
38 | #include <ipc/ipc.h> |
39 | #include <sysinfo.h> |
39 | #include <sysinfo.h> |
- | 40 | #include <kbd.h> |
|
- | 41 | #include <keys.h> |
|
40 | 42 | ||
41 | irq_cmd_t cuda_cmds[1] = { |
43 | irq_cmd_t cuda_cmds[1] = { |
42 | { CMD_PPC32_GETCHAR, 0, 0 } |
44 | { CMD_PPC32_GETCHAR, 0, 0, 2 } |
43 | }; |
45 | }; |
44 | 46 | ||
45 | irq_code_t cuda_kbd = { |
47 | irq_code_t cuda_kbd = { |
46 | 1, |
48 | 1, |
47 | cuda_cmds |
49 | cuda_cmds |
Line 179... | Line 181... | ||
179 | }; |
181 | }; |
180 | 182 | ||
181 | 183 | ||
182 | int kbd_arch_init(void) |
184 | int kbd_arch_init(void) |
183 | { |
185 | { |
184 | return (!ipc_register_irq(sysinfo_value("cuda.irq"), &cuda_kbd)); |
186 | return ipc_register_irq(sysinfo_value("cuda.irq"), &cuda_kbd); |
185 | } |
187 | } |
186 | 188 | ||
187 | 189 | ||
188 | int kbd_arch_process(keybuffer_t *keybuffer, int scan_code) |
190 | int kbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call) |
189 | { |
191 | { |
- | 192 | int param = IPC_GET_ARG2(*call); |
|
- | 193 | ||
190 | if (scan_code != -1) { |
194 | if (param != -1) { |
191 | uint8_t scancode = (uint8_t) scan_code; |
195 | uint8_t scancode = (uint8_t) param; |
192 | 196 | ||
193 | if ((scancode & 0x80) != 0x80) { |
197 | if ((scancode & 0x80) != 0x80) { |
194 | int key = lchars[scancode & 0x7f]; |
198 | int key = lchars[scancode & 0x7f]; |
195 | 199 | ||
196 | if (key != SPECIAL) |
200 | if (key != SPECIAL) |