source: rtems/c/src/lib/libbsp/i386/pc386/console/kd.h @ f05b2ac

4.104.114.84.9
Last change on this file since f05b2ac was f05b2ac, checked in by Ralf Corsepius <ralf.corsepius@…>, on Apr 21, 2004 at 4:01:48 PM

Remove duplicate white lines.

  • Property mode set to 100644
File size: 4.7 KB
Line 
1/*
2/////////////////////////////////////////////////////////////////////////////
3// $Header$
4//
5// MODULE DESCRIPTION:
6//
7// This module was based on the Linux version kd.h
8//
9//  by: Rosimildo da Silva:  rdasilva@connecttel.com
10//
11// MODIFICATION/HISTORY:
12// $Log$
13// Revision 1.2  2004/04/21 10:42:44  ralf
14// Remove stray white spaces.
15//
16// Revision 1.1  2000/08/30 08:15:30  joel
17// 2000-08-26  Rosimildo da Silva  <rdasilva@connecttel.com>
18//
19//      * Major rework of the "/dev/console" driver.
20//      * Added termios support for stdin ( keyboard ).
21//      * Added ioctls() to support modes similar to Linux( XLATE,
22//      RAW, MEDIUMRAW ).
23//      * Added Keyboard mapping and handling of the keyboard's leds.
24//      * Added Micro FrameBuffer driver ( "/dev/fb0" ) for bare VGA
25//      controller ( 16 colors ).
26//      * Added PS/2 and Serial mouse support for PC386 BSP.
27//      * console/defkeymap.c: New file.
28//      * console/fb_vga.c: New file.
29//      * console/fb_vga.h: New file.
30//      * console/i386kbd.h: New file.
31//      * console/kd.h: New file.
32//      * console/keyboard.c: New file.
33//      * console/keyboard.h: New file.
34//      * console/mouse_parser.c: New file.
35//      * console/mouse_parser.h: New file.
36//      * console/pc_keyb.c: New file.
37//      * console/ps2_drv.h: New file.
38//      * console/ps2_mouse.c: New file.
39//      * console/ps2_mouse.h: New file.
40//      * console/serial_mouse.c: New file.
41//      * console/serial_mouse.h: New file.
42//      * console/vgainit.c: New file.
43//      * console/vt.c: New file.
44//      * console/Makefile.am: Reflect new files.
45//      * console/console.c, console/inch.c, console/outch.c: Console
46//      functionality modifications.
47//      * startup/Makefile.am: Pick up tty_drv.c and gdb_glue.c
48//
49//
50/////////////////////////////////////////////////////////////////////////////
51*/
52
53#ifndef _LINUX_KD_H
54#define _LINUX_KD_H
55#include <sys/types.h>
56
57/* 0x4B is 'K', to avoid collision with termios and vt */
58
59#define KIOCSOUND       0x4B2F  /* start sound generation (0 for off) */
60#define KDMKTONE        0x4B30  /* generate tone */
61
62#define KDGETLED        0x4B31  /* return current led state */
63#define KDSETLED        0x4B32  /* set led state [lights, not flags] */
64#define         LED_SCR         0x01    /* scroll lock led */
65#define         LED_CAP         0x04    /* caps lock led */
66#define         LED_NUM         0x02    /* num lock led */
67
68#define  KDGKBTYPE      0x4B33  /* get keyboard type */
69#define         KB_84              0x01
70#define         KB_101          0x02    /* this is what we always answer */
71#define         KB_OTHER           0x03
72
73#define     KDSETMODE   0x4B3A  /* set text/graphics mode */
74#define         KD_TEXT         0x00
75#define         KD_GRAPHICS     0x01
76#define         KD_TEXT0        0x02    /* obsolete */
77#define         KD_TEXT1        0x03    /* obsolete */
78#define     KDGETMODE   0x4B3B  /* get current mode */
79
80#define         K_RAW              0x00
81#define         K_XLATE         0x01
82#define         K_MEDIUMRAW     0x02
83#define         K_UNICODE       0x03
84#define     KDGKBMODE   0x4B44  /* gets current keyboard mode */
85#define     KDSKBMODE   0x4B45  /* sets current keyboard mode */
86
87#define         K_METABIT       0x03
88#define         K_ESCPREFIX     0x04
89#define     KDGKBMETA   0x4B62  /* gets meta key handling mode */
90#define     KDSKBMETA   0x4B63  /* sets meta key handling mode */
91
92#define         K_SCROLLLOCK    0x01
93#define         K_CAPSLOCK      0x02
94#define         K_NUMLOCK       0x04
95#define    KDGKBLED     0x4B64  /* get led flags (not lights) */
96#define     KDSKBLED    0x4B65  /* set led flags (not lights) */
97
98struct kbentry {
99        unsigned char kb_table;
100        unsigned char kb_index;
101        unsigned short kb_value;
102};
103#define         K_NORMTAB       0x00
104#define         K_SHIFTTAB      0x01
105#define         K_ALTTAB        0x02
106#define         K_ALTSHIFTTAB   0x03
107
108#define KDGKBENT        0x4B46  /* gets one entry in translation table */
109#define KDSKBENT        0x4B47  /* sets one entry in translation table */
110
111struct kbsentry {
112        unsigned char kb_func;
113        unsigned char kb_string[512];
114};
115
116struct kbdiacr {
117        unsigned char diacr, base, result;
118};
119struct kbdiacrs {
120        unsigned int kb_cnt;    /* number of entries in following array */
121        struct kbdiacr kbdiacr[256];    /* MAX_DIACR from keyboard.h */
122};
123#define KDGKBDIACR      0x4B4A  /* read kernel accent table */
124#define KDSKBDIACR      0x4B4B  /* write kernel accent table */
125
126struct kbkeycode {
127        unsigned int scancode, keycode;
128};
129#define KDGETKEYCODE    0x4B4C  /* read kernel keycode table entry */
130#define KDSETKEYCODE    0x4B4D  /* write kernel keycode table entry */
131
132#define KDSIGACCEPT     0x4B4E  /* accept kbd generated signals */
133
134#define KDGHWCLK        0x4B50  /* get hardware clock */
135#define KDSHWCLK        0x4B51  /* set hardware clock */
136
137struct kbd_repeat {
138        int delay;      /* in msec; <= 0: don't change */
139        int rate;       /* in msec; <= 0: don't change */
140};
141
142#define KDKBDREP        0x4B52  /* set keyboard delay/repeat rate;
143                                 * actually used values are returned */
144
145/* note: 0x4B00-0x4B4E all have had a value at some time;
146   don't reuse for the time being */
147/* note: 0x4B60-0x4B6D, 0x4B70-0x4B72 used above */
148
149#endif /* _LINUX_KD_H */
Note: See TracBrowser for help on using the repository browser.