Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

keyboard.h

Go to the documentation of this file.
00001 /*!     \file include/kernel/keyboard.h
00002  *      \brief Low level keyboard driver header.
00003  *      \author Andrea Righi <drizzt@inwind.it>
00004  *      \date Last update: 2003-11-08
00005  *      \note Copyright (&copy;) 2003 Andrea Righi
00006  */
00007 
00008 #ifndef KEYBOARD_H
00009 #define KEYBOARD_H
00010 
00011 // --- Keyboard registers --------------------------------------------- //
00012 
00013 //! Keyboard base address port.
00014 #define KEYB_PORT               0x60
00015 //! Keyboard acknowledge register.
00016 #define KEYB_ACK                0x61
00017 //! Keyboard status register.
00018 #define KEYB_STATUS             0x64
00019 //! Keyboard LED register.
00020 #define KEYB_LED_CODE           0xED
00021 
00022 // --- Keyboard register values --------------------------------------- //
00023 
00024 //! The keyboard controller is busy.
00025 #define KEYB_BUSY               0x02
00026 //! Command to set the typematic delay and rate.
00027 #define KEYB_SET_TYPEMATIC      0xF3
00028 
00029 // --- Key codes ------------------------------------------------------ //
00030 
00031 //! DEL scan code.
00032 #define DEL_SCAN                83
00033 
00034 //! CTRL+C ASCII code.
00035 #define CTRL_C                  0x2E03
00036 //! CTRL+X ASCII code.
00037 #define CTRL_X                  0x2D18
00038 
00039 //! ALT+F1 ASCII code.
00040 #define ALT_F1                  0x6800
00041 //! ALT+F2 ASCII code.
00042 #define ALT_F2                  0x6900
00043 //! ALT+F3 ASCII code.
00044 #define ALT_F3                  0x6A00
00045 //! ALT+F4 ASCII code.
00046 #define ALT_F4                  0x6B00
00047 //! ALT+F5 ASCII code.
00048 #define ALT_F5                  0x6C00
00049 //! ALT+F6 ASCII code.
00050 #define ALT_F6                  0x6D00
00051 //! ALT+F7 ASCII code.
00052 #define ALT_F7                  0x6E00
00053 //! ALT+F8 ASCII code.
00054 #define ALT_F8                  0x6F00
00055 //! ALT+F9 ASCII code.
00056 #define ALT_F9                  0x7000
00057 //! ALT+F10 ASCII code.
00058 #define ALT_F10                 0x7100
00059 //! ALT+F11 ASCII code.
00060 #define ALT_F11                 0x8B00
00061 //! ALT+F12 ASCII code.
00062 #define ALT_F12                 0x8C00
00063 
00064 // --- Prototypes ----------------------------------------------------- //
00065 
00066 void update_leds();
00067 void keyb_wait();
00068 void init_keyboard();
00069 word scan_key();
00070 void keyboard_handler();
00071 int kgetchar();
00072 int keyb_read();
00073 
00074 #endif

Generated on Fri Feb 20 15:32:16 2004 for Minirighi by doxygen1.2.18