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 34... | Line 34... | ||
34 | /** @file |
34 | /** @file |
35 | */ |
35 | */ |
36 | #include <arch/kbd.h> |
36 | #include <arch/kbd.h> |
37 | #include <ipc/ipc.h> |
37 | #include <ipc/ipc.h> |
38 | #include <sysinfo.h> |
38 | #include <sysinfo.h> |
39 | - | ||
- | 39 | #include <kbd.h> |
|
- | 40 | #include <keys.h> |
|
40 | 41 | ||
41 | #define MSIM_KEY_F1 0x504f1bL |
42 | #define MSIM_KEY_F1 0x504f1bL |
42 | #define MSIM_KEY_F2 0x514f1bL |
43 | #define MSIM_KEY_F2 0x514f1bL |
43 | #define MSIM_KEY_F3 0x524f1bL |
44 | #define MSIM_KEY_F3 0x524f1bL |
44 | #define MSIM_KEY_F4 0x534f1bL |
45 | #define MSIM_KEY_F4 0x534f1bL |
Line 68... | Line 69... | ||
68 | 69 | ||
69 | #define FUNCTION_KEYS 0x100 |
70 | #define FUNCTION_KEYS 0x100 |
70 | 71 | ||
71 | 72 | ||
72 | irq_cmd_t msim_cmds[1] = { |
73 | irq_cmd_t msim_cmds[1] = { |
73 | { CMD_MEM_READ_1, (void *)0xB0000000, 0 } |
74 | { CMD_MEM_READ_1, (void *)0xB0000000, 0, 2 } |
74 | }; |
75 | }; |
75 | 76 | ||
76 | irq_code_t msim_kbd = { |
77 | irq_code_t msim_kbd = { |
77 | 1, |
78 | 1, |
78 | msim_cmds |
79 | msim_cmds |
Line 83... | Line 84... | ||
83 | int kbd_arch_init(void) |
84 | int kbd_arch_init(void) |
84 | { |
85 | { |
85 | ipc_register_irq(2, &msim_kbd); |
86 | ipc_register_irq(2, &msim_kbd); |
86 | msim=sysinfo_value("machine.msim"); |
87 | msim=sysinfo_value("machine.msim"); |
87 | gxemul=sysinfo_value("machine.lgxemul"); |
88 | gxemul=sysinfo_value("machine.lgxemul"); |
88 | return 1; |
89 | return 0; |
89 | } |
90 | } |
90 | 91 | ||
91 | 92 | ||
92 | //* |
93 | //* |
93 | //* |
94 | //* |
Line 371... | Line 372... | ||
371 | 372 | ||
372 | } |
373 | } |
373 | return 1; |
374 | return 1; |
374 | } |
375 | } |
375 | 376 | ||
376 | int kbd_arch_process(keybuffer_t *keybuffer, int scan_code) |
377 | int kbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call) |
377 | { |
378 | { |
378 | - | ||
- | 379 | int scan_code = IPC_GET_ARG2(*call); |
|
379 | static int esc_count=0; |
380 | static int esc_count=0; |
380 | 381 | ||
381 | 382 | ||
382 | if ( scan_code == 0x1b ) { |
383 | if ( scan_code == 0x1b ) { |
383 | esc_count++; |
384 | esc_count++; |