Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1841 → Rev 1842

/trunk/kernel/genarch/src/kbd/i8042.c
36,7 → 36,9
* It takes care of low-level keyboard functions.
*/
 
#include <genarch/i8042/i8042.h>
#include <genarch/kbd/i8042.h>
#include <genarch/kbd/scanc.h>
#include <genarch/kbd/scanc_pc.h>
#include <arch/drivers/i8042.h>
#include <arch/interrupt.h>
#include <cpu.h>
78,11 → 80,6
 
#define KEY_RELEASE 0x80
 
/**
* These codes read from i8042 data register are silently ignored.
*/
#define IGNORE_CODE 0x7f
 
static void key_released(uint8_t sc);
static void key_pressed(uint8_t sc);
static char key_read(chardev_t *d);
390,12 → 387,10
while (!(i8042_status_read() & i8042_BUFFER_FULL_MASK))
;
x = i8042_data_read();
if (x != IGNORE_CODE) {
if (x & KEY_RELEASE)
key_released(x ^ KEY_RELEASE);
else
active_read_key_pressed(x);
}
if (x & KEY_RELEASE)
key_released(x ^ KEY_RELEASE);
else
active_read_key_pressed(x);
}
return ch;
}
410,15 → 405,12
 
while (((x = i8042_status_read() & i8042_BUFFER_FULL_MASK))) {
x = i8042_data_read();
if (x != IGNORE_CODE) {
if (x & KEY_RELEASE)
key_released(x ^ KEY_RELEASE);
else
key_pressed(x);
}
if (x & KEY_RELEASE)
key_released(x ^ KEY_RELEASE);
else
key_pressed(x);
}
}
 
/** @}
*/