1: struct dudevice {
2: short durcsr; /* receiver status register */
3: short durdbuf; /* receiver data buffer register */
4: #define duparcsr durdbuf /* (parameter control register on write) */
5: short dutcsr; /* transmitter status register */
6: short dutdbuf; /* transmitter data buffer register */
7: };
8:
9: /* bits in durcsr */
10: #define DU_DSCHG 0100000 /* data set change in du11 */
11: #define DU_DSCHGA DU_DSCHG /* data set change A in dup11 */
12: #define DU_RING 0040000 /* ring indicator */
13: #define DU_CTS 0020000 /* clear to send */
14: #define DU_CAR 0010000 /* carrier */
15: #define DU_RACT 0004000 /* receiver active */
16: #define DU_SRDATA 0002000 /* secondary received data */
17: #define DU_DSRDY 0001000 /* data set ready */
18: #define DU_STSYNC 0000400 /* strip sync */
19: #define DU_RDONE 0000200 /* receiver done */
20: #define DU_RIE 0000100 /* receiver interrupt enable */
21: #define DU_DSIE 0000040 /* data set interrupt enable */
22: #define DU_SSYNC 0000020 /* search sync in du11 */
23: #define DU_RCVEN DU_SSYNC /* receiver interrupt enable in dup11 */
24: #define DU_STD 0000010 /* secondary transmit data */
25: #define DU_RTS 0000004 /* request to send */
26: #define DU_DTR 0000002 /* data terminal ready */
27: /* bit 0 is unused in du11 */
28: #define DU_DSCHGB 0000001 /* data set change B in dup11 */
29: #define DU_BITS \
30: "\10\20DSCHG\17RING\16CTS\15CAR\14RACT\13SRDATA\12DSRDY\11STSYNC\10RDONE\
31: \7RIE\6DSIE\5SSYNC\4STD\3RTS\2DTR"
32: #define DU_PBITS \
33: "\10\20DSCHGA\17RING\16CTS\15CAR\14RACT\13SRDATA\12DSRDY\11STSYNC\10RDONE\
34: \7RIE\6DSIE\5RCVEN\4STD\3RTS\2DTR\1DSCHGB"
35:
36: /* bits in durdbuf */
37: #define DURDBUF_ERR 0100000 /* error */
38: #define DURDBUF_OVERRUN 0040000 /* overrun */
39: /* bit 13 is unused in dup11 */
40: #define DURDBUF_FE 0020000 /* framing error in du11 */
41: #define DURDBUF_PE 0010000 /* parity error in du11 */
42: #define DURDBUF_RCRC DURDBUF_PE /* RCRC error + Zero in dup11 */
43: /* bit 11 is unused */
44: /* bits 10-8 are unused in dup11 */
45: #define DURDBUF_RABORT 0002000 /* received ABORT in dup11 */
46: #define DURDBUF_REOM 0001000 /* end of received message in dup11 */
47: #define DURDBUF_RSOM 0000400 /* start of received message in dup11 */
48: /* bits 7-0 are the receiver data buffer */
49: #define DURDBUF_BITS "\10\20ERR\17OVERRUN\16\FE\15PE"
50: #define DURDBUF_PBITS "\10\20ERR\17OVERRUN\15RCRC\13RABORT\12REOM\11RSOM"
51:
52: /* bits in duparcsr */
53: /* bit 15 is unused in du11 */
54: #define DUPARCSR_DEC 0100000 /* DEC mode in dup11 */
55: /* bit 14 is unused */
56: /* bit 13 is unused in dup11 */
57: /* bits 13-12 are mode select in du11 */
58: #define DUPARCSR_SMSEL 0010000 /* secondary mode select in dup11 */
59: /* bits 11-10 are word length select in du11 and unused in dup11 */
60: #define DUPARCSR_PE 0001000 /* parity error in du11 */
61: #define DUPARCSR_CRCINH DUPARCSR_PE /* CRC inhibit in dup11 */
62: /* bit 8 is unused in dup11 */
63: #define DUPARCSR_EVEN 0000400 /* select even parity in du11 */
64: /* bits 7-0 are the sync register */
65: #define DUPARCSR_BITS "\10\12PE\11EVEN"
66: #define DUPARCSR_PBITS "\10\20DEC\15SMSEL\12CRCINH"
67:
68: /* duparcsr mode select bits in du11 */
69: #define DUPARCSR_XSYNC 0020000 /* synchronous external */
70: #define DUPARCSR_ISYNC 0030000 /* synchronous internal */
71:
72: /* duparcsr word length select bits in du11 */
73: #define DUPARCSR_8BITS 0006000 /* eight bits per character */
74: #define DUPARCSR_7BITS 0004000 /* seven bits per character */
75: #define DUPARCSR_6BITS 0002000 /* six bits per character */
76: #define DUPARCSR_5BITS 0000000 /* five bits per character */
77:
78: /* bits in dutcsr */
79: #define DUTCSR_NODATA 0100000 /* data not available in du 11 */
80: #define DUTCSR_DATALATE DUTCSR_NODATA /* data late error in dup11 */
81: #define DUTCSR_MD 0040000 /* maintenance data */
82: #define DUTCSR_MC 0020000 /* maintenance clock */
83: /* bits 12-11 are maintenance mode select in du11*/
84: /* bits 12-11 are maintenance mode select A and B in dup11*/
85: /* bit 10 is called ``maintenance bit window'' in earlier du11 manuals */
86: #define DUTCSR_RI 0002000 /* receiver input in du11 */
87: #define DUTCSR_MMSELECT DUTCSR_RI /* maintenance mode select A and B in dup11 */
88: /* bit 9 is unused in du11 */
89: #define DUTCSR_TACT 0001000 /* transmitter active in dup11 */
90: #define DUTCSR_MR 0000400 /* master reset */
91: #define DUTCSR_TDONE 0000200 /* transmitter done */
92: #define DUTCSR_TIE 0000100 /* transmitter interrupt enable */
93: /* bit 5 is unused in dup11 */
94: #define DUTCSR_DNAIE 0000040 /* data not available interrupt enable in du11 */
95: #define DUTCSR_SEND 0000020 /* send */
96: #define DUTCSR_HDX 0000010 /* half/full duplex */
97: /* bits 2-1 are unused */
98: /* bit 0 is unused in dup11 */
99: #define DUTCSR_BRK 0000001 /* break in du11 */
100: #define DUTCSR_BITS \
101: "\10\20NODATA\17MD\16MC\13RI\11MR\10TDONE\7TIE\6DNAIE\5SEND\4HDX\1BRK"
102: #define DUTCSR_PBITS \
103: "\10\20DATALATE\17MD\16MC\13MMSELECT\12TACT\11MR\10TDONE\7TIE\5SEND\4HDX"
104:
105: /* dutcsr maintenance mode select bits in du11 */
106: #define DUTCSR_MSYSTST 0014000 /* internal mode for systems testing */
107: #define DUTCSR_MEXTERN 0010000 /* external */
108: #define DUTCSR_MINTERN 0004000 /* internal */
109: #define DUTCSR_MNORMAL 0000000 /* normal */
110:
111: /* dutcsr maintenance mode select A and B bits in dup11 (some are the same) */
112: #define DUTCSR_MPSYSTST DUTCSR_MINTERN
113: #define DUTCSR_MPINTERN DUTCSR_MSYSTST
Defined struct's
Defined macros