Changeset 287920f in mainline for kernel/genarch


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.

Location:
kernel/genarch
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/Makefile.inc

    rda74747 r287920f  
    6868ifeq ($(CONFIG_I8042),y)
    6969        GENARCH_SOURCES += \
    70                 genarch/src/i8042/i8042.c
    71                
    72         ifeq ($(CONFIG_I8042_PC),y)
    73                 GENARCH_SOURCES += \
    74                         genarch/src/i8042/scanc_pc.c
    75         endif
    76         ifeq ($(CONFIG_I8042_SUN),y)
    77                 GENARCH_SOURCES += \
    78                         genarch/src/i8042/scanc_sun.c
    79         endif
    80        
     70                genarch/src/kbd/i8042.c \
     71                genarch/src/kbd/scanc_pc.c
    8172endif
     73
     74## z8530 controller
     75ifeq ($(CONFIG_Z8530),y)
     76        GENARCH_SOURCES += \
     77                genarch/src/kbd/z8530.c \
     78                genarch/src/kbd/scanc_sun.c
     79endif
  • kernel/genarch/include/kbd/i8042.h

    rda74747 r287920f  
    3636#define KERN_I8042_H_
    3737
    38 #include <genarch/kbd/scanc_pc.h>
    39 
    40 #define SPECIAL         '?'
    41 
    42 extern char sc_primary_map[];
    43 extern char sc_secondary_map[];
    44 
    4538extern void i8042_init(void);
    4639extern void i8042_poll(void);
  • kernel/genarch/include/kbd/z8530.h

    rda74747 r287920f  
    3838#define KERN_Z8530_H_
    3939
    40 #include <genarch/kbd/scanc_sun.h>
    41 
    42 #define SPECIAL         '?'
    43 
    44 extern char sc_primary_map[];
    45 extern char sc_secondary_map[];
    46 
    4740extern void z8530_init(void);
    4841extern void z8530_poll(void);
  • 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 
  • kernel/genarch/src/kbd/scanc_pc.c

    rda74747 r287920f  
    3535 */
    3636
    37 #include <genarch/i8042/i8042.h>
     37#include <genarch/kbd/scanc.h>
    3838
    3939/** Primary meaning of scancodes. */
  • kernel/genarch/src/kbd/scanc_sun.c

    rda74747 r287920f  
    3535 */
    3636
    37 #include <genarch/i8042/i8042.h>
     37#include <genarch/kbd/scanc.h>
    3838
    3939/** Primary meaning of scancodes. */
Note: See TracChangeset for help on using the changeset viewer.