kernel tree reorganization stage 1: Major cvs repository work (not logged as
[dragonfly.git] / sys / bus / canbus / canbusvars.h
1 /*-
2  * Copyright (c) 2000 KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
3  * Copyright (c) 2000 Takanori Watanabe <takawata@jp.FreeBSD.org>
4  * All rights reserved.
5  *
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  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25  * SUCH DAMAGE.
26  *
27  * $FreeBSD: src/sys/pc98/pc98/canbusvars.h,v 1.3.2.1 2003/02/10 13:11:51 nyan Exp $
28  * $DragonFly: src/sys/bus/canbus/Attic/canbusvars.h,v 1.2 2003/06/17 04:28:55 dillon Exp $
29  */
30
31 #ifndef _PC98_PC98_CANBUSVARS_H_
32 #define _PC98_PC98_CANBUSVARS_H_
33
34
35 /* CanBe I/O register */
36 #define CANBE_IOPORT_INDEX 0xf4a
37 #define CANBE_IOPORT_DATA 0xf4b
38
39 /*
40  * following registor purpose for spending -- unknown.
41  */
42 #define CANBE_IOPORT1 0x0c24
43 #define CANBE_IOPORT2 0x0c2b
44 #define CANBE_IOPORT3 0x0c2d
45
46
47 /* CanBe register number */
48 #define CANBE_SOUND_INTR_ADDR   0x01
49 #define CANBE_RC_RESET          0x03
50 #define CANBE_MUTE_CTRL         0x04
51 #define CANBE_RC_DATA_STATUS    0x10
52 #define CANBE_RC_RECV_CODE      0x11
53 #define CANBE_POWER_CTRL        0x13
54 #define CANBE_RC_USED_INTR      0x14
55
56
57 /* CanBe sound interrupt address value */
58 #define CANBE_SOUND_INTR_VAL0   0x00
59 #define CANBE_SOUND_INTR_VAL1   0x02
60 #define CANBE_SOUND_INTR_VAL2   0x03
61 #define CANBE_SOUND_INTR_VAL3   0x08
62
63 /* CanBe remote controler reset */
64 #define CANBE_MIKE_THRUE        0x04
65 #define CANBE_CTRLR_RESET       0x01
66
67 /* CanBe mute control */
68 #define CANBE_MUTE              0x01
69
70 /* CanBe remote controler data status */
71 #define CANBE_RC_BUSY           0x02
72 #define CANBE_RC_STATUS         0x01
73
74 /* CanBe remote controler receive code */
75 #define CANBE_RC_DATA_CHUP      0x00
76 #define CANBE_RC_DATA_CHDOWN    0x01
77 #define CANBE_RC_DATA_VOLUP     0x02
78 #define CANBE_RC_DATA_VOLDOWN   0x03
79 #define CANBE_RC_DATA_EJECT     0x04
80 #define CANBE_RC_DATA_PLAY      0x05
81 #define CANBE_RC_DATA_MUTE      0x09
82 #define CANBE_RC_DATA_VIDEO     0x0a
83 #define CANBE_RC_DATA_NEXT      0x0c
84 #define CANBE_RC_DATA_PREVIOUS  0x0d
85 #define CANBE_RC_DATA_M_S       0x1d
86 #define CANBE_RC_DATA_UP        0x40
87 #define CANBE_RC_DATA_DOWN      0x41
88 #define CANBE_RC_DATA_LEFT      0x42
89 #define CANBE_RC_DATA_RIGHT     0x43
90 #define CANBE_RC_DATA_SIZE      0x4d
91 #define CANBE_RC_DATA_ESC       0x4e
92 #define CANBE_RC_DATA_CR        0x4f
93 #define CANBE_RC_DATA_TV        0x53
94 #define CANBE_RC_DATA_FREEZE    0x5d
95 #define CANBE_RC_DATA_CAPTURE   0x5e
96
97 /* CanBe power off data */
98 #define CANBE_POWEROFF_DATA {           \
99         0x80, 0x06, 0x00, 0x00,         \
100         0x80, 0x07, 0x00, 0x01,         \
101         0x80, 0x01, 0x00, 0x00          \
102 }
103
104 /* CanBe remote controler used intr */
105 #define CANBE_RC_INTR           0x04
106 #define CANBE_RC_INTR_INT41     0x03 /* irq 10 */
107 #define CANBE_RC_INTR_INT1      0x02 /* irq  5 */
108 #define CANBE_RC_INTR_INT2      0x01 /* irq  6 */
109 #define CANBE_RC_INTR_INT0      0x00 /* irq  3 */
110
111 #endif  /* _PC98_PC98_CANBUSVARS_H_ */