Changeset 287920f in mainline for kernel/genarch/src/kbd/i8042.c
- Timestamp:
- 2006-08-09T13:27:55Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d46c6ecd
- Parents:
- da74747
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/kbd/i8042.c
rda74747 r287920f 37 37 */ 38 38 39 #include <genarch/i8042/i8042.h> 39 #include <genarch/kbd/i8042.h> 40 #include <genarch/kbd/scanc.h> 41 #include <genarch/kbd/scanc_pc.h> 40 42 #include <arch/drivers/i8042.h> 41 43 #include <arch/interrupt.h> … … 79 81 #define KEY_RELEASE 0x80 80 82 81 /**82 * These codes read from i8042 data register are silently ignored.83 */84 #define IGNORE_CODE 0x7f85 86 83 static void key_released(uint8_t sc); 87 84 static void key_pressed(uint8_t sc); … … 391 388 ; 392 389 x = i8042_data_read(); 393 if (x != IGNORE_CODE) { 394 if (x & KEY_RELEASE) 395 key_released(x ^ KEY_RELEASE); 396 else 397 active_read_key_pressed(x); 398 } 390 if (x & KEY_RELEASE) 391 key_released(x ^ KEY_RELEASE); 392 else 393 active_read_key_pressed(x); 399 394 } 400 395 return ch; … … 411 406 while (((x = i8042_status_read() & i8042_BUFFER_FULL_MASK))) { 412 407 x = i8042_data_read(); 413 if (x != IGNORE_CODE) { 414 if (x & KEY_RELEASE) 415 key_released(x ^ KEY_RELEASE); 416 else 417 key_pressed(x); 418 } 408 if (x & KEY_RELEASE) 409 key_released(x ^ KEY_RELEASE); 410 else 411 key_pressed(x); 419 412 } 420 413 } … … 422 415 /** @} 423 416 */ 424
Note:
See TracChangeset
for help on using the changeset viewer.