Changeset c01bb5f9 in mainline for uspace/drv/char/i8042/i8042.c
- Timestamp:
- 2012-02-16T21:21:39Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 39aa8ce, 856a36b, f943dd3
- Parents:
- edd7c63c (diff), 21063c2 (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 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/i8042/i8042.c
redd7c63c rc01bb5f9 105 105 }; 106 106 107 static const irq_pio_range_t i8042_ranges[] = { 108 { 109 .base = 0, 110 .size = sizeof(i8042_regs_t) 111 } 112 }; 113 107 114 /** i8042 Interrupt pseudo-code. */ 108 115 static const irq_cmd_t i8042_cmds[] = { … … 239 246 while (pio_read_8(&dev->regs->status) & i8042_OUTPUT_FULL) 240 247 (void) pio_read_8(&dev->regs->data); 241 248 249 const size_t range_count = sizeof(i8042_ranges) / 250 sizeof(irq_pio_range_t); 251 irq_pio_range_t ranges[range_count]; 252 memcpy(ranges, i8042_ranges, sizeof(i8042_ranges)); 253 ranges[0].base = (uintptr_t) regs; 254 242 255 const size_t cmd_count = sizeof(i8042_cmds) / sizeof(irq_cmd_t); 243 256 irq_cmd_t cmds[cmd_count]; 244 257 memcpy(cmds, i8042_cmds, sizeof(i8042_cmds)); 245 cmds[0].addr = (void *) & dev->regs->status;246 cmds[3].addr = (void *) & dev->regs->data;247 258 cmds[0].addr = (void *) &(((i8042_regs_t *) regs)->status); 259 cmds[3].addr = (void *) &(((i8042_regs_t *) regs)->data); 260 248 261 irq_code_t irq_code = { 262 .rangecount = range_count, 263 .ranges = ranges, 249 264 .cmdcount = cmd_count, 250 265 .cmds = cmds
Note:
See TracChangeset
for help on using the changeset viewer.