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$
28 */
29
30#ifndef _PC98_PC98_CANBUSVARS_H_
31#define _PC98_PC98_CANBUSVARS_H_
32
33
34/* CanBe I/O register */
35#define CANBE_IOPORT_INDEX 0xf4a
36#define CANBE_IOPORT_DATA 0xf4b
37
38/*
39 * following registor purpose for spending -- unknown.
40 */
41#define CANBE_IOPORT1 0x0c24
42#define CANBE_IOPORT2 0x0c2b
43#define CANBE_IOPORT3 0x0c2d
44
45
46/* CanBe register number */
47#define CANBE_SOUND_INTR_ADDR	0x01
48#define CANBE_RC_RESET		0x03
49#define CANBE_MUTE_CTRL		0x04
50#define CANBE_RC_DATA_STATUS	0x10
51#define CANBE_RC_RECV_CODE	0x11
52#define CANBE_POWER_CTRL	0x13
53#define CANBE_RC_USED_INTR	0x14
54
55
56/* CanBe sound interrupt address value */
57#define CANBE_SOUND_INTR_VAL0	0x00
58#define CANBE_SOUND_INTR_VAL1	0x02
59#define CANBE_SOUND_INTR_VAL2	0x03
60#define CANBE_SOUND_INTR_VAL3	0x08
61
62/* CanBe remote controler reset */
63#define CANBE_MIKE_THRUE	0x04
64#define CANBE_CTRLR_RESET	0x01
65
66/* CanBe mute control */
67#define CANBE_MUTE		0x01
68
69/* CanBe remote controler data status */
70#define CANBE_RC_BUSY		0x02
71#define CANBE_RC_STATUS		0x01
72
73/* CanBe remote controler receive code */
74#define CANBE_RC_DATA_CHUP	0x00
75#define CANBE_RC_DATA_CHDOWN	0x01
76#define CANBE_RC_DATA_VOLUP	0x02
77#define CANBE_RC_DATA_VOLDOWN	0x03
78#define CANBE_RC_DATA_EJECT	0x04
79#define CANBE_RC_DATA_PLAY	0x05
80#define CANBE_RC_DATA_MUTE	0x09
81#define CANBE_RC_DATA_VIDEO	0x0a
82#define CANBE_RC_DATA_NEXT	0x0c
83#define CANBE_RC_DATA_PREVIOUS	0x0d
84#define CANBE_RC_DATA_M_S	0x1d
85#define CANBE_RC_DATA_UP	0x40
86#define CANBE_RC_DATA_DOWN	0x41
87#define CANBE_RC_DATA_LEFT	0x42
88#define CANBE_RC_DATA_RIGHT	0x43
89#define CANBE_RC_DATA_SIZE	0x4d
90#define CANBE_RC_DATA_ESC	0x4e
91#define CANBE_RC_DATA_CR	0x4f
92#define CANBE_RC_DATA_TV	0x53
93#define CANBE_RC_DATA_FREEZE	0x5d
94#define CANBE_RC_DATA_CAPTURE	0x5e
95
96/* CanBe power off data */
97#define CANBE_POWEROFF_DATA {		\
98	0x80, 0x06, 0x00, 0x00,		\
99	0x80, 0x07, 0x00, 0x01,		\
100	0x80, 0x01, 0x00, 0x00		\
101}
102
103/* CanBe remote controler used intr */
104#define CANBE_RC_INTR		0x04
105#define CANBE_RC_INTR_INT41	0x03 /* irq 10 */
106#define CANBE_RC_INTR_INT1	0x02 /* irq  5 */
107#define CANBE_RC_INTR_INT2	0x01 /* irq  6 */
108#define CANBE_RC_INTR_INT0	0x00 /* irq  3 */
109
110#endif	/* _PC98_PC98_CANBUSVARS_H_ */
111