No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / acorn26 / ioc / arckbdreg.h
blob9972ebb0ba8cf31b9cf8d383bd23cdc79d67d115
1 /* $NetBSD: arckbdreg.h,v 1.1 2002/03/24 15:47:15 bjh21 Exp $ */
2 /*-
3 * Copyright (c) 1997, 1998 Ben Harris
4 * All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 * arckbdreg.h - Archimedes keyboard codes
32 #ifndef _ARCKBDREG_H
33 #define _ARCKBDREG_H
35 #define ARCKBD_HRST 0xff /* keyboard reset */
36 #define ARCKBD_RAK1 0xfe /* first reset acknowledge */
37 #define ARCKBD_RAK2 0xfd /* second reset acknowledge */
38 #define ARCKBD_RQPD 0x40 /* reserved */
39 #define ARCKBD_PDAT 0xe0 /* response to RQPD */
40 #define ARCKBD_IS_PDAT(d) (((d) & 0xf0) == ARCKBD_PDAT)
41 #define ARCKBD_RQID 0x20 /* request keyboard ID */
42 #define ARCKBD_KBID 0x80 /* keyboard ID (bottom 6 bits) */
43 #define ARCKBD_IS_KBID(d) (((d) & 0xc0) == ARCKBD_KBID)
44 #define ARCKBD_KDDA 0xc0 /* key down data (bottom 4 bits plus next byte) */
45 #define ARCKBD_IS_KDDA(d) (((d) & 0xf0) == ARCKBD_KDDA)
46 #define ARCKBD_KUDA 0xd0 /* key up data (bottom 4 bits plus next byte) */
47 #define ARCKBD_IS_KUDA(d) (((d) & 0xf0) == ARCKBD_KUDA)
48 #define ARCKBD_RQMP 0x22 /* request mouse position */
49 #define ARCKBD_MDAT 0x00 /* mouse movement data */
50 #define ARCKBD_IS_MDAT(d) (((d) & 0x80) == ARCKBD_MDAT)
51 #define ARCKBD_BACK 0x3f /* acknowledge first byte of pair */
52 #define ARCKBD_NACK 0x30 /* acknowledge -- send no more */
53 #define ARCKBD_SACK 0x31 /* acknowledge -- send only keyup/down */
54 #define ARCKBD_MACK 0x32 /* acknowledge -- send only mouse events */
55 #define ARCKBD_SMAK 0x33 /* acknowledge -- send mouse or kbd events */
56 #define ARCKBD_LEDS 0x00 /* Set LEDs: */
57 #define ARCKBD_LEDS_CAPSLOCK 0x01 /* Caps lock */
58 #define ARCKBD_LEDS_NUMLOCK 0x02 /* Num lock */
59 #define ARCKBD_LEDS_SCROLLLOCK 0x04 /* Scroll lock */
60 #define ARCKBD_PRST 0x21 /* reserved */
62 #define ARCKBD_BAUD 31250 /* Data rate on keyboard serial link */
64 /* Keyboard ID codes */
66 /* Inferred from the ARMsi documentation */
67 #define ARCKBD_KBID_A500 0x80 /* A500 prototype keyboard */
68 /* Determined by experiment */
69 #define ARCKBD_KBID_UK 0x81 /* Archimedes UK keyboard */
70 /* These are from the RISC OS 2 PRM, page 1666: */
71 #define ARCKBD_KBID_MASTER 0x82
72 #define ARCKBD_KBID_COMPACT 0x83
73 #define ARCKBD_KBID_IT 0x84
74 #define ARCKBD_KBID_ES 0x85
75 #define ARCKBD_KBID_FR 0x86
76 #define ARCKBD_KBID_DE 0x87
77 #define ARCKBD_KBID_PT 0x88
78 #define ARCKBD_KBID_ESPERANTO 0x89
79 #define ARCKBD_KBID_GR 0x8a
80 #define ARCKBD_KBID_SE 0x8b
81 #define ARCKBD_KBID_FI 0x8c
82 #define ARCKBD_KBID_DK 0x8e
83 #define ARCKBD_KBID_NO 0x8f
84 #define ARCKBD_KBID_IS 0x90
85 #define ARCKBD_KBID_CA1 0x91
86 #define ARCKBD_KBID_CA2 0x92
87 #define ARCKBD_KBID_CA 0x93
88 #define ARCKBD_KBID_TR 0x94
89 #define ARCKBD_KBID_ARABIC 0x95
90 #define ARCKBD_KBID_IE 0x96
91 #define ARCKBD_KBID_HK 0x97
93 #endif /* !_ARCKBDREG_H */