Changeset c624b96 in mainline
- Timestamp:
- 2006-04-14T15:11:32Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 280a27e
- Parents:
- 8b473ce
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
genarch/src/i8042/i8042.c
r8b473ce rc624b96 272 272 void i8042_init(void) 273 273 { 274 int i; 275 274 276 exc_register(VECTOR_KBD, "i8042_interrupt", (iroutine) i8042_interrupt); 275 277 i8042_wait(); … … 282 284 chardev_initialize("i8042_kbd", &kbrd, &ops); 283 285 stdin = &kbrd; 286 284 287 /* 285 * Clear input buffer 286 */ 287 { 288 int a=0; 289 while((i8042_status_read()&i8042_BUFFER_FULL_MASK)&&(a<20)) { 288 * Clear input buffer. 289 * Number of iterations is limited to prevent infinite looping. 290 */ 291 for (i = 0; (i8042_status_read() & i8042_BUFFER_FULL_MASK) && i < 100; i++) { 290 292 i8042_data_read(); 291 a++; 292 } 293 } 293 } 294 294 } 295 295
Note:
See TracChangeset
for help on using the changeset viewer.