Changeset 8ff0bd2 in mainline for uspace/srv/hid/input/port/msim.c
- Timestamp:
- 2011-09-04T11:30:58Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 03bc76a
- Parents:
- d2c67e7 (diff), deac215e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified uspace/srv/hid/input/port/msim.c ¶
rd2c67e7 r8ff0bd2 1 1 /* 2 2 * Copyright (c) 2006 Josef Cejka 3 * Copyright (c) 2011 Jiri Svoboda 3 4 * All rights reserved. 4 5 * … … 42 43 #include <errno.h> 43 44 44 irq_cmd_t msim_cmds[] = { 45 static int msim_port_init(kbd_dev_t *); 46 static void msim_port_yield(void); 47 static void msim_port_reclaim(void); 48 static void msim_port_write(uint8_t data); 49 50 kbd_port_ops_t msim_port = { 51 .init = msim_port_init, 52 .yield = msim_port_yield, 53 .reclaim = msim_port_reclaim, 54 .write = msim_port_write 55 }; 56 57 static kbd_dev_t *kbd_dev; 58 59 static irq_cmd_t msim_cmds[] = { 45 60 { 46 61 .cmd = CMD_PIO_READ_8, … … 51 66 .cmd = CMD_ACCEPT 52 67 } 53 54 68 }; 55 69 56 irq_code_t msim_kbd = {70 static irq_code_t msim_kbd = { 57 71 sizeof(msim_cmds) / sizeof(irq_cmd_t), 58 72 msim_cmds … … 61 75 static void msim_irq_handler(ipc_callid_t iid, ipc_call_t *call); 62 76 63 int kbd_port_init(void)77 static int msim_port_init(kbd_dev_t *kdev) 64 78 { 79 kbd_dev = kdev; 80 65 81 sysarg_t vaddr; 66 82 if (sysinfo_get_value("kbd.address.virtual", &vaddr) != EOK) … … 78 94 } 79 95 80 void kbd_port_yield(void)96 static void msim_port_yield(void) 81 97 { 82 98 } 83 99 84 void kbd_port_reclaim(void)100 static void msim_port_reclaim(void) 85 101 { 86 102 } 87 103 88 void kbd_port_write(uint8_t data)104 static void msim_port_write(uint8_t data) 89 105 { 90 106 (void) data; … … 93 109 static void msim_irq_handler(ipc_callid_t iid, ipc_call_t *call) 94 110 { 95 int scan_code = IPC_GET_ARG2(*call); 96 kbd_push_scancode(scan_code); 111 kbd_push_data(kbd_dev, IPC_GET_ARG2(*call)); 97 112 } 98 113 99 114 /** @} 100 */115 */
Note:
See TracChangeset
for help on using the changeset viewer.