Home | History | Annotate | Line # | Download | only in dev
sioreg.h revision 1.2
      1  1.2       agc /* $NetBSD: sioreg.h,v 1.2 2003/08/07 16:28:04 agc Exp $ */
      2  1.1  nisimura /*
      3  1.1  nisimura  * Copyright (c) 1992, 1993
      4  1.1  nisimura  *	The Regents of the University of California.  All rights reserved.
      5  1.2       agc  *
      6  1.2       agc  * This code is derived from software contributed to Berkeley by
      7  1.2       agc  * OMRON Corporation.
      8  1.2       agc  *
      9  1.2       agc  * Redistribution and use in source and binary forms, with or without
     10  1.2       agc  * modification, are permitted provided that the following conditions
     11  1.2       agc  * are met:
     12  1.2       agc  * 1. Redistributions of source code must retain the above copyright
     13  1.2       agc  *    notice, this list of conditions and the following disclaimer.
     14  1.2       agc  * 2. Redistributions in binary form must reproduce the above copyright
     15  1.2       agc  *    notice, this list of conditions and the following disclaimer in the
     16  1.2       agc  *    documentation and/or other materials provided with the distribution.
     17  1.2       agc  * 3. Neither the name of the University nor the names of its contributors
     18  1.2       agc  *    may be used to endorse or promote products derived from this software
     19  1.2       agc  *    without specific prior written permission.
     20  1.2       agc  *
     21  1.2       agc  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     22  1.2       agc  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23  1.2       agc  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24  1.2       agc  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     25  1.2       agc  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     26  1.2       agc  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     27  1.2       agc  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     28  1.2       agc  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     29  1.2       agc  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     30  1.2       agc  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     31  1.2       agc  * SUCH DAMAGE.
     32  1.2       agc  *
     33  1.2       agc  *	@(#)sioreg.h	8.1 (Berkeley) 6/10/93
     34  1.2       agc  */
     35  1.2       agc 
     36  1.2       agc /*
     37  1.2       agc  * Copyright (c) 1992 OMRON Corporation.
     38  1.1  nisimura  *
     39  1.1  nisimura  * This code is derived from software contributed to Berkeley by
     40  1.1  nisimura  * OMRON Corporation.
     41  1.1  nisimura  *
     42  1.1  nisimura  * Redistribution and use in source and binary forms, with or without
     43  1.1  nisimura  * modification, are permitted provided that the following conditions
     44  1.1  nisimura  * are met:
     45  1.1  nisimura  * 1. Redistributions of source code must retain the above copyright
     46  1.1  nisimura  *    notice, this list of conditions and the following disclaimer.
     47  1.1  nisimura  * 2. Redistributions in binary form must reproduce the above copyright
     48  1.1  nisimura  *    notice, this list of conditions and the following disclaimer in the
     49  1.1  nisimura  *    documentation and/or other materials provided with the distribution.
     50  1.1  nisimura  * 3. All advertising materials mentioning features or use of this software
     51  1.1  nisimura  *    must display the following acknowledgement:
     52  1.1  nisimura  *	This product includes software developed by the University of
     53  1.1  nisimura  *	California, Berkeley and its contributors.
     54  1.1  nisimura  * 4. Neither the name of the University nor the names of its contributors
     55  1.1  nisimura  *    may be used to endorse or promote products derived from this software
     56  1.1  nisimura  *    without specific prior written permission.
     57  1.1  nisimura  *
     58  1.1  nisimura  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     59  1.1  nisimura  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     60  1.1  nisimura  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     61  1.1  nisimura  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     62  1.1  nisimura  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     63  1.1  nisimura  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     64  1.1  nisimura  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     65  1.1  nisimura  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     66  1.1  nisimura  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     67  1.1  nisimura  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     68  1.1  nisimura  * SUCH DAMAGE.
     69  1.1  nisimura  *
     70  1.1  nisimura  *	@(#)sioreg.h	8.1 (Berkeley) 6/10/93
     71  1.1  nisimura  */
     72  1.1  nisimura 
     73  1.1  nisimura #define WR0		0x00
     74  1.1  nisimura #define WR1		0x01
     75  1.1  nisimura #define WR2		0x02
     76  1.1  nisimura #define WR3		0x03
     77  1.1  nisimura #define WR4		0x04
     78  1.1  nisimura #define WR5		0x05
     79  1.1  nisimura #define WR6		0x06
     80  1.1  nisimura #define WR7		0x07
     81  1.1  nisimura 
     82  1.1  nisimura #define	WR2A		WR2
     83  1.1  nisimura #define	WR2B		(WR2|0x10)
     84  1.1  nisimura 
     85  1.1  nisimura #define RR0		0x08
     86  1.1  nisimura #define RR1		0x09
     87  1.1  nisimura #define RR2		0x0A
     88  1.1  nisimura #define RR3		0x0B
     89  1.1  nisimura #define RR4		0x0C
     90  1.1  nisimura 
     91  1.1  nisimura #define RR2A		RR2
     92  1.1  nisimura #define RR2B		(RR2|0x10)
     93  1.1  nisimura 
     94  1.1  nisimura #define WR0_NOP		0x00	/* No Operation */
     95  1.1  nisimura #define WR0_SNDABRT	0x08	/* Send Abort (HDLC) */
     96  1.1  nisimura #define WR0_RSTINT	0x10	/* Reset External/Status Interrupt */
     97  1.1  nisimura #define WR0_CHANRST	0x18	/* Channel Reset */
     98  1.1  nisimura #define WR0_INTNXT	0x20	/* Enable Interrupt on Next Receive Character */
     99  1.1  nisimura #define WR0_RSTPEND	0x28	/* Reset Transmitter Interrput/DMA Pending */
    100  1.1  nisimura #define WR0_ERRRST	0x30	/* Error Reset */
    101  1.1  nisimura #define WR0_ENDINTR	0x38	/* End of Interrupt */
    102  1.1  nisimura 
    103  1.1  nisimura #define WR1_ESENBL	0x01	/* External/Status Interrupt Enable */
    104  1.1  nisimura #define WR1_TXENBL	0x02	/* Tx Interrupt/DMA Enable */
    105  1.1  nisimura #define WR1_STATVEC	0x04	/* Status Affects Vector (Only Chan-B) */
    106  1.1  nisimura #define WR1_RXDSEBL	0x00	/* Rx Interrupt/DMA Disable */
    107  1.1  nisimura #define WR1_RXFIRST	0x08	/* Interrupt only First Character Received */
    108  1.1  nisimura #define WR1_RXALLS	0x10	/* Interrupt Every Characters Received (with Special Char.) */
    109  1.1  nisimura #define WR1_RXALL	0x18	/* Interrupt Every Characters Received (without Special Char.) */
    110  1.1  nisimura 
    111  1.1  nisimura #define WR2_INTR_0	0x00	/* Interrupt Priority: RxA TxA RxB TxB E/SA E/SA */
    112  1.1  nisimura #define WR2_INTR_1	0x04	/* Interrupt Priority: RxA RxB TxA TxB E/SA E/SA */
    113  1.1  nisimura #define WR2_VEC85_1	0x00	/* 8085 Vectored Mode - 1 */
    114  1.1  nisimura #define WR2_VEC85_2	0x08	/* 8085 Vectored Mode - 2 */
    115  1.1  nisimura #define WR2_VEC86	0x10	/* 8086 Vectored */
    116  1.1  nisimura #define WR2_VEC85_3	0x18	/* 8085 Vectored Mode - 3 */
    117  1.1  nisimura 
    118  1.1  nisimura #define WR3_RXENBL	0x01	/* Rx Enable */
    119  1.1  nisimura #define WR3_RXCRC	0x08	/* Rx CRC Check */
    120  1.1  nisimura #define WR3_AUTOEBL	0x20	/* Auto Enable (flow control for MODEM) */
    121  1.1  nisimura #define WR3_RX5BIT	0x00	/* Rx Bits/Character: 5 Bits */
    122  1.1  nisimura #define WR3_RX7BIT	0x40	/* Rx Bits/Character: 7 Bits */
    123  1.1  nisimura #define WR3_RX6BIT	0x80	/* Rx Bits/Character: 6 Bits */
    124  1.1  nisimura #define WR3_RX8BIT	0xc0	/* Rx Bits/Character: 8 Bits */
    125  1.1  nisimura 
    126  1.1  nisimura #define WR4_NPARITY	0x00	/* No Parity */
    127  1.1  nisimura #define WR4_PARENAB	0x01	/* Parity Enable */
    128  1.1  nisimura #define WR4_OPARITY	0x01	/* Parity Odd */
    129  1.1  nisimura #define WR4_EPARITY	0x02	/* Parity Even */
    130  1.1  nisimura #define WR4_STOP1	0x04	/* Stop  Bits (1bit) */
    131  1.1  nisimura #define WR4_STOP15	0x08	/* Stop  Bits (1.5bit) */
    132  1.1  nisimura #define WR4_STOP2	0x0c	/* Stop  Bits (2bit) */
    133  1.1  nisimura #define WR4_BAUD96	0x40	/* Clock Rate (9600 BAUD) */
    134  1.1  nisimura #define WR4_BAUD48	0x80	/* Clock Rate (4800 BAUD) */
    135  1.1  nisimura #define WR4_BAUD24	0xc0	/* Clock Rate (2400 BAUD) */
    136  1.1  nisimura 
    137  1.1  nisimura #define WR5_TXCRC	0x01	/* Tx CRC Check */
    138  1.1  nisimura #define WR5_RTS		0x02	/* Request To Send     [RTS] */
    139  1.1  nisimura #define WR5_TXENBL	0x08	/* Transmit Enable */
    140  1.1  nisimura #define WR5_BREAK	0x10	/* Send Break          [BRK] */
    141  1.1  nisimura #define WR5_TX5BIT	0x00	/* Tx Bits/Character: 5 Bits */
    142  1.1  nisimura #define WR5_TX7BIT	0x20	/* Tx Bits/Character: 7 Bits */
    143  1.1  nisimura #define WR5_TX6BIT	0x40	/* Tx Bits/Character: 6 Bits */
    144  1.1  nisimura #define WR5_TX8BIT	0x60	/* Tx Bits/Character: 8 Bits */
    145  1.1  nisimura #define WR5_DTR		0x80	/* Data Terminal Ready [DTR] */
    146  1.1  nisimura 
    147  1.1  nisimura #define RR0_RXAVAIL	0x01	/* Rx Character Available */
    148  1.1  nisimura #define RR0_INTRPEND	0x02	/* Interrupt Pending (Channel-A Only) */
    149  1.1  nisimura #define RR0_TXEMPTY	0x04	/* Tx Buffer Empty */
    150  1.1  nisimura #define RR0_DCD		0x08	/* Data Carrier Detect [DCD] */
    151  1.1  nisimura #define RR0_SYNC	0x10	/* Synchronization */
    152  1.1  nisimura #define RR0_CTS		0x20	/* Clear To Send       [CTS] */
    153  1.1  nisimura #define RR0_BREAK	0x80	/* Break Detected      [BRK] */
    154  1.1  nisimura 
    155  1.1  nisimura #define RR1_PARITY	0x10	/* Parity Error */
    156  1.1  nisimura #define RR1_OVERRUN	0x20	/* Data Over Run */
    157  1.1  nisimura #define RR1_FRAMING	0x40	/* Framing Error */
    158  1.1  nisimura 
    159  1.1  nisimura #define RR_RXRDY	0x0100	/* Rx Character Available */
    160  1.1  nisimura #define RR_INTRPEND	0x0200	/* Interrupt Pending (Channel-A Only) */
    161  1.1  nisimura #define RR_TXRDY	0x0400	/* Tx Buffer Empty */
    162  1.1  nisimura #define RR_DCD		0x0800	/* Data Carrier Detect [DCD] */
    163  1.1  nisimura #define RR_SYNC		0x1000	/* Synchronization */
    164  1.1  nisimura #define RR_CTS		0x2000	/* Clear To Send       [CTS] */
    165  1.1  nisimura #define RR_BREAK	0x8000	/* Break Detected */
    166  1.1  nisimura #define RR_PARITY	0x0010	/* Parity Error */
    167  1.1  nisimura #define RR_OVERRUN	0x0020	/* Data Over Run */
    168  1.1  nisimura #define RR_FRAMING	0x0040	/* Framing Error */
    169