source: svn/trunk/newcon3bcm2_21bu/toolchain/mipsel-linux-uclibc/include/linux/kd.h @ 2

Last change on this file since 2 was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 5.7 KB
Line 
1#ifndef _LINUX_KD_H
2#define _LINUX_KD_H
3#include <linux/types.h>
4
5/* 0x4B is 'K', to avoid collision with termios and vt */
6
7#define GIO_FONT        0x4B60  /* gets font in expanded form */
8#define PIO_FONT        0x4B61  /* use font in expanded form */
9
10#define GIO_FONTX       0x4B6B  /* get font using struct consolefontdesc */
11#define PIO_FONTX       0x4B6C  /* set font using struct consolefontdesc */
12struct consolefontdesc {
13        unsigned short charcount;       /* characters in font (256 or 512) */
14        unsigned short charheight;      /* scan lines per character (1-32) */
15        char *chardata;                 /* font data in expanded form */
16};
17
18#define PIO_FONTRESET   0x4B6D  /* reset to default font */
19
20#define GIO_CMAP        0x4B70  /* gets colour palette on VGA+ */
21#define PIO_CMAP        0x4B71  /* sets colour palette on VGA+ */
22
23#define KIOCSOUND       0x4B2F  /* start sound generation (0 for off) */
24#define KDMKTONE        0x4B30  /* generate tone */
25
26#define KDGETLED        0x4B31  /* return current led state */
27#define KDSETLED        0x4B32  /* set led state [lights, not flags] */
28#define         LED_SCR         0x01    /* scroll lock led */
29#define         LED_NUM         0x02    /* num lock led */
30#define         LED_CAP         0x04    /* caps lock led */
31
32#define KDGKBTYPE       0x4B33  /* get keyboard type */
33#define         KB_84           0x01
34#define         KB_101          0x02    /* this is what we always answer */
35#define         KB_OTHER        0x03
36
37#define KDADDIO         0x4B34  /* add i/o port as valid */
38#define KDDELIO         0x4B35  /* del i/o port as valid */
39#define KDENABIO        0x4B36  /* enable i/o to video board */
40#define KDDISABIO       0x4B37  /* disable i/o to video board */
41
42#define KDSETMODE       0x4B3A  /* set text/graphics mode */
43#define         KD_TEXT         0x00
44#define         KD_GRAPHICS     0x01
45#define         KD_TEXT0        0x02    /* obsolete */
46#define         KD_TEXT1        0x03    /* obsolete */
47#define KDGETMODE       0x4B3B  /* get current mode */
48
49#define KDMAPDISP       0x4B3C  /* map display into address space */
50#define KDUNMAPDISP     0x4B3D  /* unmap display from address space */
51
52typedef char scrnmap_t;
53#define         E_TABSZ         256
54#define GIO_SCRNMAP     0x4B40  /* get screen mapping from kernel */
55#define PIO_SCRNMAP     0x4B41  /* put screen mapping table in kernel */
56#define GIO_UNISCRNMAP  0x4B69  /* get full Unicode screen mapping */
57#define PIO_UNISCRNMAP  0x4B6A  /* set full Unicode screen mapping */
58
59#define GIO_UNIMAP      0x4B66  /* get unicode-to-font mapping from kernel */
60struct unipair {
61        unsigned short unicode;
62        unsigned short fontpos;
63};
64struct unimapdesc {
65        unsigned short entry_ct;
66        struct unipair *entries;
67};
68#define PIO_UNIMAP      0x4B67  /* put unicode-to-font mapping in kernel */
69#define PIO_UNIMAPCLR   0x4B68  /* clear table, possibly advise hash algorithm */
70struct unimapinit {
71        unsigned short advised_hashsize;  /* 0 if no opinion */
72        unsigned short advised_hashstep;  /* 0 if no opinion */
73        unsigned short advised_hashlevel; /* 0 if no opinion */
74};
75
76#define UNI_DIRECT_BASE 0xF000  /* start of Direct Font Region */
77#define UNI_DIRECT_MASK 0x01FF  /* Direct Font Region bitmask */
78
79#define         K_RAW           0x00
80#define         K_XLATE         0x01
81#define         K_MEDIUMRAW     0x02
82#define         K_UNICODE       0x03
83#define KDGKBMODE       0x4B44  /* gets current keyboard mode */
84#define KDSKBMODE       0x4B45  /* sets current keyboard mode */
85
86#define         K_METABIT       0x03
87#define         K_ESCPREFIX     0x04
88#define KDGKBMETA       0x4B62  /* gets meta key handling mode */
89#define KDSKBMETA       0x4B63  /* sets meta key handling mode */
90
91#define         K_SCROLLLOCK    0x01
92#define         K_NUMLOCK       0x02
93#define         K_CAPSLOCK      0x04
94#define KDGKBLED        0x4B64  /* get led flags (not lights) */
95#define KDSKBLED        0x4B65  /* set led flags (not lights) */
96
97struct kbentry {
98        unsigned char kb_table;
99        unsigned char kb_index;
100        unsigned short kb_value;
101};
102#define         K_NORMTAB       0x00
103#define         K_SHIFTTAB      0x01
104#define         K_ALTTAB        0x02
105#define         K_ALTSHIFTTAB   0x03
106
107#define KDGKBENT        0x4B46  /* gets one entry in translation table */
108#define KDSKBENT        0x4B47  /* sets one entry in translation table */
109
110struct kbsentry {
111        unsigned char kb_func;
112        unsigned char kb_string[512];
113};
114#define KDGKBSENT       0x4B48  /* gets one function key string entry */
115#define KDSKBSENT       0x4B49  /* sets one function key string entry */
116
117struct kbdiacr {
118        unsigned char diacr, base, result;
119};
120struct kbdiacrs {
121        unsigned int kb_cnt;    /* number of entries in following array */
122        struct kbdiacr kbdiacr[256];    /* MAX_DIACR from keyboard.h */
123};
124#define KDGKBDIACR      0x4B4A  /* read kernel accent table */
125#define KDSKBDIACR      0x4B4B  /* write kernel accent table */
126
127struct kbkeycode {
128        unsigned int scancode, keycode;
129};
130#define KDGETKEYCODE    0x4B4C  /* read kernel keycode table entry */
131#define KDSETKEYCODE    0x4B4D  /* write kernel keycode table entry */
132
133#define KDSIGACCEPT     0x4B4E  /* accept kbd generated signals */
134
135struct kbd_repeat {
136        int delay;      /* in msec; <= 0: don't change */
137        int period;     /* in msec; <= 0: don't change */
138                        /* earlier this field was misnamed "rate" */
139};
140
141#define KDKBDREP        0x4B52  /* set keyboard delay/repeat rate;
142                                 * actually used values are returned */
143
144#define KDFONTOP        0x4B72  /* font operations */
145
146struct console_font_op {
147        unsigned int op;        /* operation code KD_FONT_OP_* */
148        unsigned int flags;     /* KD_FONT_FLAG_* */
149        unsigned int width, height;     /* font size */
150        unsigned int charcount;
151        unsigned char *data;    /* font data with height fixed to 32 */
152};
153
154struct console_font {
155        unsigned int width, height;     /* font size */
156        unsigned int charcount;
157        unsigned char *data;    /* font data with height fixed to 32 */
158};
159
160#define KD_FONT_OP_SET          0       /* Set font */
161#define KD_FONT_OP_GET          1       /* Get font */
162#define KD_FONT_OP_SET_DEFAULT  2       /* Set font to default, data points to name / NULL */
163#define KD_FONT_OP_COPY         3       /* Copy from another console */
164
165#define KD_FONT_FLAG_DONT_RECALC        1       /* Don't recalculate hw charcell size [compat] */
166
167/* note: 0x4B00-0x4B4E all have had a value at some time;
168   don't reuse for the time being */
169/* note: 0x4B60-0x4B6D, 0x4B70-0x4B72 used above */
170
171#endif /* _LINUX_KD_H */
Note: See TracBrowser for help on using the repository browser.