Rev 1649 | Go to most recent revision | 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 | #define KEY_F1 0x504f1b |
43 | #define KEY_F1 0x504f1b |
42 | #define KEY_F2 0x514f1b |
44 | #define KEY_F2 0x514f1b |
43 | #define KEY_F3 0x524f1b |
45 | #define KEY_F3 0x524f1b |
44 | #define KEY_F4 0x534f1b |
46 | #define KEY_F4 0x534f1b |
Line 53... | Line 55... | ||
53 | 55 | ||
54 | 56 | ||
55 | #define FUNCTION_KEYS 0x100 |
57 | #define FUNCTION_KEYS 0x100 |
56 | 58 | ||
57 | irq_cmd_t ski_cmds[1] = { |
59 | irq_cmd_t ski_cmds[1] = { |
58 | { CMD_IA64_GETCHAR, 0, 0 } |
60 | { CMD_IA64_GETCHAR, 0, 0, 2 } |
59 | }; |
61 | }; |
60 | 62 | ||
61 | irq_code_t ski_kbd = { |
63 | irq_code_t ski_kbd = { |
62 | 1, |
64 | 1, |
63 | ski_cmds |
65 | ski_cmds |
Line 65... | Line 67... | ||
65 | 67 | ||
66 | int kbd_arch_init(void) |
68 | int kbd_arch_init(void) |
67 | { |
69 | { |
68 | if(sysinfo_value("kbd")) { |
70 | if(sysinfo_value("kbd")) { |
69 | ipc_register_irq(sysinfo_value("kbd.irq"), &ski_kbd); |
71 | ipc_register_irq(sysinfo_value("kbd.irq"), &ski_kbd); |
70 | return 1; |
72 | return 0; |
71 | } |
73 | } |
72 | 74 | return 1; |
|
73 | } |
75 | } |
74 | 76 | ||
75 | /* |
77 | /* |
76 | * Please preserve this code (it can be used to determine scancodes) |
78 | * Please preserve this code (it can be used to determine scancodes) |
77 | * |
79 | * |
Line 79... | Line 81... | ||
79 | { |
81 | { |
80 | return "0123456789ABCDEF"[v]; |
82 | return "0123456789ABCDEF"[v]; |
81 | } |
83 | } |
82 | */ |
84 | */ |
83 | 85 | ||
84 | int kbd_arch_process(keybuffer_t *keybuffer, int scan_code) |
86 | int kbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call) |
85 | { |
87 | { |
86 | static unsigned long long buf=0; |
88 | static unsigned long long buf=0; |
87 | static int count=0; |
89 | static int count=0; |
88 | static int esc_count=0; |
90 | static int esc_count=0; |
- | 91 | int scan_code = IPC_GET_ARG2(*call); |
|
89 | 92 | ||
90 | 93 | ||
91 | /* |
94 | /* |
92 | * Please preserve this code (it can be used to determine scancodes) |
95 | * Please preserve this code (it can be used to determine scancodes) |
93 | */ |
96 | */ |