Changeset 8bb9540 in mainline for uspace/drv/char/i8042
- Timestamp:
- 2012-01-01T22:01:47Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1ff1ee1
- Parents:
- 1dea6d7
- Location:
- uspace/drv/char/i8042
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/i8042/i8042.c
r1dea6d7 r8bb9540 57 57 static int i8042_write_aux(ddf_fun_t *, char *, size_t); 58 58 static int i8042_read_aux(ddf_fun_t *, char *, size_t); 59 /*----------------------------------------------------------------------------*/ 59 60 60 /** Primary port interface structure. */ 61 61 static char_dev_ops_t kbd_iface = { … … 63 63 .write = i8042_write_kbd, 64 64 }; 65 /*----------------------------------------------------------------------------*/ 65 66 66 /** Auxiliary port interface structure. */ 67 67 static char_dev_ops_t aux_iface = { … … 69 69 .write = i8042_write_aux, 70 70 }; 71 /*----------------------------------------------------------------------------*/ 71 72 72 /** Primary port function operations. */ 73 73 static ddf_dev_ops_t kbd_ops = { 74 74 .interfaces[CHAR_DEV_IFACE] = &kbd_iface 75 75 }; 76 /*----------------------------------------------------------------------------*/ 76 77 77 /** Auxiliary port function operations. */ 78 78 static ddf_dev_ops_t aux_ops = { … … 123 123 } 124 124 }; 125 /*----------------------------------------------------------------------------*/ 125 126 126 /** Wait until it is safe to write to the device. */ 127 127 static void wait_ready(i8042_t *dev) … … 130 130 while (pio_read_8(&dev->regs->status) & i8042_INPUT_FULL); 131 131 } 132 /*----------------------------------------------------------------------------*/ 132 133 133 /** Interrupt handler routine. 134 134 * Writes new data to the corresponding buffer. … … 150 150 buffer_write(buffer, data); 151 151 } 152 /*----------------------------------------------------------------------------*/ 152 153 153 /** Initialize i8042 driver structure. 154 154 * @param dev Driver structure to initialize. … … 287 287 return EOK; 288 288 } 289 /*----------------------------------------------------------------------------*/ 289 290 290 /** Write data to i8042 primary port. 291 291 * @param fun DDF function. … … 307 307 return size; 308 308 } 309 /*----------------------------------------------------------------------------*/ 309 310 310 /** Read data from i8042 primary port. 311 311 * @param fun DDF function. … … 327 327 return size; 328 328 } 329 /*----------------------------------------------------------------------------*/ 329 330 330 /** Write data to i8042 auxiliary port. 331 331 * @param fun DDF function. … … 348 348 return size; 349 349 } 350 /*----------------------------------------------------------------------------*/ 350 351 351 /** Read data from i8042 auxiliary port. 352 352 * @param fun DDF function. -
uspace/drv/char/i8042/main.c
r1dea6d7 r8bb9540 49 49 uintptr_t *io_reg_address, size_t *io_reg_size, int *kbd, int *mouse); 50 50 static int i8042_dev_add(ddf_dev_t *device); 51 /*----------------------------------------------------------------------------*/ 51 52 52 /** DDF driver operations. */ 53 53 static driver_ops_t i8042_driver_ops = { 54 54 .dev_add = i8042_dev_add, 55 55 }; 56 /*----------------------------------------------------------------------------*/ 56 57 57 /** DDF driver. */ 58 58 static driver_t i8042_driver = { … … 60 60 .driver_ops = &i8042_driver_ops 61 61 }; 62 /*----------------------------------------------------------------------------*/ 62 63 63 /** Initialize global driver structures (NONE). 64 64 * … … 75 75 return ddf_driver_main(&i8042_driver); 76 76 } 77 /*----------------------------------------------------------------------------*/ 77 78 78 /** Initialize a new ddf driver instance of i8042 driver 79 79 * … … 115 115 return EOK; 116 116 } 117 /*----------------------------------------------------------------------------*/ 117 118 118 /** Get address of I/O registers. 119 119 *
Note:
See TracChangeset
for help on using the changeset viewer.
