Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / dev / qbus / dlreg.h
blob7a7753c721280267a5c8ee027722cf256d08d124
1 /* $NetBSD: dlreg.h,v 1.4.28.1 2005/03/04 16:49:52 skrll Exp $ */
2 /*
3 * Ben Harris, 1997
5 * This file is in the Public Domain.
6 */
7 /*
8 * dlreg.h -- Definitions for the DL11 and DLV11 serial cards.
10 * Style in imitation of dzreg.h.
13 #ifdef notdef
14 union w_b
16 u_short word;
17 struct {
18 u_char byte_lo;
19 u_char byte_hi;
20 } bytes;
23 struct DLregs
25 volatile u_short dl_rcsr; /* Receive Control/Status Register (R/W) */
26 volatile u_short dl_rbuf; /* Receive Buffer (R) */
27 volatile u_short dl_xcsr; /* Transmit Control/Status Register (R/W) */
28 volatile union w_b u_xbuf; /* Transmit Buffer (W) */
29 #define dl_xbuf u_xbuf.bytes.byte_lo
32 typedef struct DLregs dlregs;
33 #endif
35 #define DL_UBA_RCSR 0
36 #define DL_UBA_RBUF 2
37 #define DL_UBA_XCSR 4
38 #define DL_UBA_XBUFL 6
40 /* RCSR bits */
42 #define DL_RCSR_RX_DONE 0x0080 /* Receiver Done (R) */
43 #define DL_RCSR_RXIE 0x0040 /* Receiver Interrupt Enable (R/W) */
44 #define DL_RCSR_READER_ENABLE 0x0001 /* [paper-tape] Reader Enable (W) */
45 #define DL_RCSR_BITS "\20\1READER_ENABLE\7RXIE\10RX_DONE\n"
47 /* RBUF bits */
49 #define DL_RBUF_ERR 0x8000 /* Error (R) */
50 #define DL_RBUF_OVERRUN_ERR 0x4000 /* Overrun Error (R) */
51 #define DL_RBUF_FRAMING_ERR 0x2000 /* Framing Error (R) */
52 #define DL_RBUF_PARITY_ERR 0x1000 /* Parity Error (R) */
53 #define DL_RBUF_DATA_MASK 0x00FF /* Receive Data (R) */
54 #define DL_RBUF_BITS "\20\15PARITY_ERR\16FRAMING_ERR\17OVERRUN_ERR\20ERR\n"
56 /* XCSR bits */
58 #define DL_XCSR_TX_READY 0x0080 /* Transmitter Ready (R) */
59 #define DL_XCSR_TXIE 0x0040 /* Transmit Interrupt Enable (R/W) */
60 #define DL_XCSR_TX_BREAK 0x0001 /* Transmit Break (R/W) */
61 #define DL_XCSR_BITS "\20\1TX_BREAK\7TXIE\10TX_READY\n"
63 /* XBUF is just data byte right justified. */