Changeset 9141377 in mainline for uspace/kbd/arch/sparc64/src/kbd.c
- Timestamp:
- 2006-09-07T19:45:46Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 801579fe
- Parents:
- 9dae51d7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/kbd/arch/sparc64/src/kbd.c
r9dae51d7 r9141377 40 40 #include <kbd.h> 41 41 #include <keys.h> 42 #include <stdio.h> 43 #include <types.h> 44 #include <genarch/kbd.h> 42 45 46 #define KBD_KEY_RELEASE 0x80 47 #define KBD_ALL_KEYS_UP 0x7f 48 49 irq_cmd_t z8530_cmds[] = { 50 { CMD_MEM_READ_1, 0, 0, 1 } 51 }; 52 53 irq_code_t z8530_kbd = { 54 1, 55 z8530_cmds 56 }; 43 57 44 58 int kbd_arch_init(void) 45 59 { 60 z8530_cmds[0].addr = (void *) sysinfo_value("kbd.address.virtual") + 6; 61 ipc_register_irq(sysinfo_value("kbd.irq"), &z8530_kbd); 46 62 return 0; 47 63 } 48 64 65 /** Process keyboard events */ 66 int kbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call) 67 { 68 int scan_code = IPC_GET_ARG1(*call); 49 69 50 int kbd_arch_process(keybuffer_t *keybuffer, ipc_call_t *call) 51 { 70 if (scan_code == KBD_ALL_KEYS_UP) 71 return 1; 72 73 if (scan_code & KBD_KEY_RELEASE) 74 key_released(keybuffer, scan_code ^ KBD_KEY_RELEASE); 75 else 76 key_pressed(keybuffer, scan_code); 77 52 78 return 1; 53 79 }
Note:
See TracChangeset
for help on using the changeset viewer.