Changes in uspace/srv/hid/kbd/port/z8530.c [36e9cd1:d9fae235] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/kbd/port/z8530.c
r36e9cd1 rd9fae235 30 30 * @ingroup kbd 31 31 * @{ 32 */ 32 */ 33 33 /** @file 34 * @brief 34 * @brief Z8530 keyboard port driver. 35 35 */ 36 36 … … 44 44 #include <sys/types.h> 45 45 #include <ddi.h> 46 #include <errno.h> 46 47 47 #define CHAN_A_STATUS 48 #define CHAN_A_DATA 48 #define CHAN_A_STATUS 4 49 #define CHAN_A_DATA 6 49 50 50 #define RR0_RCA 51 #define RR0_RCA 1 51 52 52 53 static irq_cmd_t z8530_cmds[] = { 53 54 { 54 55 .cmd = CMD_PIO_READ_8, 55 .addr = (void *) 0, /* will be patched in run-time */56 .addr = (void *) 0, /* Will be patched in run-time */ 56 57 .dstarg = 1 57 58 }, … … 69 70 { 70 71 .cmd = CMD_PIO_READ_8, 71 .addr = (void *) 0, /* will be patched in run-time */72 .addr = (void *) 0, /* Will be patched in run-time */ 72 73 .dstarg = 2 73 74 }, … … 86 87 int z8530_port_init(void) 87 88 { 89 sysarg_t kaddr; 90 if (sysinfo_get_value("kbd.address.kernel", &kaddr) != EOK) 91 return -1; 92 93 sysarg_t inr; 94 if (sysinfo_get_value("kbd.inr", &inr) != EOK) 95 return -1; 96 97 z8530_cmds[0].addr = (void *) kaddr + CHAN_A_STATUS; 98 z8530_cmds[3].addr = (void *) kaddr + CHAN_A_DATA; 99 88 100 async_set_interrupt_received(z8530_irq_handler); 89 z8530_cmds[0].addr = (void *) sysinfo_value("kbd.address.kernel") + 90 CHAN_A_STATUS; 91 z8530_cmds[3].addr = (void *) sysinfo_value("kbd.address.kernel") + 92 CHAN_A_DATA; 93 ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(), 94 sysinfo_value("kbd.inr"), &z8530_kbd); 101 ipc_register_irq(inr, device_assign_devno(), inr, &z8530_kbd); 102 95 103 return 0; 96 104 }
Note:
See TracChangeset
for help on using the changeset viewer.