Changeset 287920f in mainline for kernel/genarch/src/kbd/i8042.c


Ignore:
Timestamp:
2006-08-09T13:27:55Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d46c6ecd
Parents:
da74747
Message:

i8042 and z8530 separated, the tree compiles again.
Now there is some duplicated code in i8042.c and z8530.c,
but that can be eliminated in slower pace.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/kbd/i8042.c

    rda74747 r287920f  
    3737 */
    3838
    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>
    4042#include <arch/drivers/i8042.h>
    4143#include <arch/interrupt.h>
     
    7981#define KEY_RELEASE     0x80
    8082
    81 /**
    82  * These codes read from i8042 data register are silently ignored.
    83  */
    84 #define IGNORE_CODE     0x7f
    85 
    8683static void key_released(uint8_t sc);
    8784static void key_pressed(uint8_t sc);
     
    391388                        ;
    392389                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);
    399394        }
    400395        return ch;
     
    411406        while (((x = i8042_status_read() & i8042_BUFFER_FULL_MASK))) {
    412407                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);
    419412        }
    420413}
     
    422415/** @}
    423416 */
    424 
Note: See TracChangeset for help on using the changeset viewer.