Changeset 41d33ac in mainline for genarch/src/i8042/i8042.c
- Timestamp:
- 2006-05-31T22:18:40Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e7ed9868
- Parents:
- 018f95a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
genarch/src/i8042/i8042.c
r018f95a r41d33ac 268 268 static void i8042_wait(void); 269 269 270 /** Initialize i8042. */ 271 void i8042_init(void) 272 { 273 int i; 274 275 exc_register(VECTOR_KBD, "i8042_interrupt", (iroutine) i8042_interrupt); 270 static iroutine oldvector; 271 /** Initialize keyboard and service interrupts using kernel routine */ 272 void i8042_grab(void) 273 { 274 oldvector = exc_register(VECTOR_KBD, "i8042_interrupt", (iroutine) i8042_interrupt); 276 275 i8042_wait(); 277 276 i8042_command_write(i8042_SET_COMMAND); … … 279 278 i8042_data_write(i8042_COMMAND); 280 279 i8042_wait(); 280 } 281 /** Resume the former interrupt vector */ 282 void i8042_release(void) 283 { 284 if (oldvector) 285 exc_register(VECTOR_KBD, "user_interrupt", oldvector); 286 } 287 288 /** Initialize i8042. */ 289 void i8042_init(void) 290 { 291 int i; 292 293 i8042_grab(); 294 /* Prevent user from accidentaly releasing calling i8042_resume 295 * and disabling keyboard 296 */ 297 oldvector = NULL; 281 298 282 299 trap_virtual_enable_irqs(1<<IRQ_KBD);
Note:
See TracChangeset
for help on using the changeset viewer.