Subversion Repositories HelenOS-historic

Rev

Rev 1708 | Rev 1754 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1708 Rev 1753
Line 322... Line 322...
322
 */
322
 */
323
void i8042_interrupt(int n, istate_t *istate)
323
void i8042_interrupt(int n, istate_t *istate)
324
{
324
{
325
    __u8 x;
325
    __u8 x;
326
 
326
 
-
 
327
    while ((i8042_status_read() & i8042_BUFFER_FULL_MASK)) {
-
 
328
        x = i8042_data_read();
-
 
329
        if (x & KEY_RELEASE)
-
 
330
            key_released(x ^ KEY_RELEASE);
-
 
331
        else
-
 
332
            key_pressed(x);
-
 
333
    }
327
    trap_virtual_eoi();
334
    trap_virtual_eoi();
328
    x = i8042_data_read();
-
 
329
    if (x & KEY_RELEASE)
-
 
330
        key_released(x ^ KEY_RELEASE);
-
 
331
    else
-
 
332
        key_pressed(x);
-
 
333
}
335
}
334
 
336
 
335
/** Wait until the controller reads its data. */
337
/** Wait until the controller reads its data. */
336
void i8042_wait(void) {
338
void i8042_wait(void) {
337
    while (i8042_status_read() & i8042_WAIT_MASK) {
339
    while (i8042_status_read() & i8042_WAIT_MASK) {
Line 539... Line 541...
539
{
541
{
540
    char ch;   
542
    char ch;   
541
 
543
 
542
    while(!(ch = active_read_buff_read())) {
544
    while(!(ch = active_read_buff_read())) {
543
        __u8 x;
545
        __u8 x;
544
        while (!((x=i8042_status_read() & i8042_BUFFER_FULL_MASK)))
546
        while (!(i8042_status_read() & i8042_BUFFER_FULL_MASK))
545
            ;
547
            ;
546
        x = i8042_data_read();
548
        x = i8042_data_read();
547
        if (x != IGNORE_CODE) {
549
        if (x != IGNORE_CODE) {
548
            if (x & KEY_RELEASE)
550
            if (x & KEY_RELEASE)
549
                key_released(x ^ KEY_RELEASE);
551
                key_released(x ^ KEY_RELEASE);