1: /* @(#)vsreg.h	7.1 (MIT) 6/5/86 */
   2:  /****************************************************************************
   3:  *									    *
   4:  *  Copyright (c) 1983, 1984 by						    *
   5:  *  DIGITAL EQUIPMENT CORPORATION, Maynard, Massachusetts.		    *
   6:  *  All rights reserved.						    *
   7:  * 									    *
   8:  *  This software is furnished on an as-is basis and may be used and copied *
   9:  *  only with inclusion of the above copyright notice. This software or any *
  10:  *  other copies thereof may be provided or otherwise made available to     *
  11:  *  others only for non-commercial purposes.  No title to or ownership of   *
  12:  *  the software is hereby transferred.					    *
  13:  * 									    *
  14:  *  The information in this software is  subject to change without notice   *
  15:  *  and  should  not  be  construed as  a commitment by DIGITAL EQUIPMENT   *
  16:  *  CORPORATION.							    *
  17:  * 									    *
  18:  *  DIGITAL assumes no responsibility for the use  or  reliability of its   *
  19:  *  software on equipment which is not supplied by DIGITAL.		    *
  20:  * 									    *
  21:  *									    *
  22:  ****************************************************************************/
  23: 
  24: /*
  25:  * vsreg.h - VS100 Registers and Bits
  26:  *
  27:  * Author:	Christopher A. Kent
  28:  *		Digital Equipment Corporation
  29:  *		Western Research Lab
  30:  * Date:	Tue Jun 14 1983
  31:  */
  32: 
  33: struct vsdevice{
  34:     u_short vs_csr0;        /* Control and Status */
  35:     u_short vs_csr1;        /* Interrupt Reason */
  36:     u_short vs_csr2;        /* Keyboard Receive */
  37:     u_short vs_csr3;        /* Function Parameter Low */
  38:     u_short vs_csr4;        /* Function Parameter High */
  39:     u_short vs_csr5;        /* Cursor Position X */
  40:     u_short vs_csr6;        /* Cursor Position Y */
  41:     u_short vs_csr7;        /* Interrupt Vector */
  42:     u_short vs_csr8;        /* Spare 1 */
  43:     u_short vs_csr9;        /* Spare 2 */
  44:     u_short vs_csra;        /* Spare 3 */
  45:     u_short vs_csrb;        /* Spare 4 */
  46:     u_short vs_csrc;        /* Spare 5 */
  47:     u_short vs_csrd;        /* Spare 6 */
  48:     u_short vs_csre;        /* Spare 7 */
  49:     u_short vs_csrf;        /* Interrupt Vector (2Bs) */
  50: };
  51: 
  52: /*
  53:  * CSR0 - Control and Status
  54:  */
  55: 
  56: #define VS_LNK_TRNS 0100000     /* Link Transition */
  57: #define VS_LNK_AVL  0040000     /* Link Available */
  58: #define VS_LNK_ERR  0020000     /* Link Error */
  59: #define VS_XMIT_ON  0010000     /* Transmitter On */
  60: #define VS_MNT_MODE 0004000     /* Maintenance Mode */
  61: #define VS_CRC_DIS  0002000     /* CRC Disable */
  62: #define VS_MNT_DONE 0001000     /* Maintenance Done */
  63: #define VS_SPARE    0000400     /* Spare */
  64: #define VS_OWN      0000200     /* Owner */
  65: #define VS_IE       0000100     /* Interrupt Enable */
  66: #define VS_FCN      0000076     /* Function Code */
  67: #define VS_GO       0000001     /* GO! */
  68: 
  69: struct vs_csr{
  70:     union{
  71:     u_short _register;
  72:     struct{
  73:         unsigned _go : 1;
  74:         unsigned _function : 5;
  75:         unsigned _ie : 1;
  76:         unsigned _own : 1;
  77:         unsigned _spare : 1;
  78:         unsigned _mainDone : 1;
  79:         unsigned _CRCdisable : 1;
  80:         unsigned _mainMode : 1;
  81:         unsigned _xmitOn : 1;
  82:         unsigned _linkErr : 1;
  83:         unsigned _linkAvail : 1;
  84:         unsigned _linkTran : 1;
  85:     }_bits;
  86:     }_X;
  87: };
  88: 
  89: #define csr_reg     _X._register
  90: #define csr_go      _X._bits._go
  91: #define csr_ie      _X._bits._ie
  92: #define csr_own     _X._bits._own
  93: #define csr_mainDone    _X._bits._mainDone
  94: #define csr_CRCdisable  _X._bits._CRCdisable
  95: #define csr_mainMode    _X._bits._mainMode
  96: #define csr_xmitOn  _X._bits._xmitOn
  97: #define csr_linkErr _X._bits._linkErr
  98: #define csr_linkAvail   _X._bits._linkAvail
  99: #define csr_linkTran    _X._bits._linkTran
 100: 
 101: /* Function Codes */
 102: 
 103: #define VS_INIT     01      /* Initialize Display */
 104: #define VS_SEND     02      /* Send Packet */
 105: #define VS_START    03      /* Start Microcode */
 106: #define VS_ABORT    04      /* Abort Command Chain */
 107: #define VS_PWRUP    05      /* Power Up Reset */
 108: /**/
 109: #define VS_ENABBA   020     /* Enable BBA */
 110: #define VS_DISBBA   021     /* Disable BBA */
 111: #define VS_INFINITE 022     /* Inifinite Retries */
 112: #define VS_FINITE   023     /* Finite Retries */
 113: 
 114: /* amount to shift to get function code into right place */
 115: 
 116: #define VS_FCSHIFT  01
 117: 
 118: /*
 119:  * CSR1 - Interrupt Reason
 120:  */
 121: 
 122: #define vs_irr      vs_csr1
 123: 
 124: #define VS_ERROR    0100000     /* Any error */
 125: #define VS_REASON   0077777     /* Reason Mask */
 126: #define VSIRR_BITS \
 127: "\20\20ERROR\10PWRUP\6TABLET\5MOUSE\4BUTTON\3START\2DONE\1INIT"
 128: 
 129: #define VS_INT_US   0
 130: #define VS_INT_ID   01
 131: #define VS_INT_CD   02
 132: #define VS_INT_SE   04
 133: #define VS_INT_BE   010
 134: #define VS_INT_MM   020
 135: #define VS_INT_TM   040
 136: #define VS_INT_PWR  0200
 137: 
 138: struct vs_intr{
 139:     union{
 140:     u_short  _register;     /* whole register */
 141:     struct{
 142:         unsigned _reason : 14;  /* Reason bits */
 143:         unsigned _diagnostic : 1;   /* Diagnostic Error bit */
 144:         unsigned _error : 1;    /* Error bit */
 145:     }_bits;
 146:     }_X;
 147: };
 148: 
 149: #define intr_reg    _X._register
 150: #define intr_reason _X._bits._reason
 151: #define intr_diagnostic _X._bits._diagnostic    /* not in rev 2b */
 152: #define intr_error  _X._bits._error
 153: 
 154: /*
 155:  * CSR2 - Keyboard Receive
 156:  */
 157: 
 158: #define vs_krr      vs_csr2
 159: 
 160: #define VS_KBDEV    0007000     /* Device mask */
 161: #define VS_KBT      0000400     /* Transition direction */
 162: #define VS_KBKEY    0000377     /* Key mask */
 163: 
 164: struct vs_kbd{
 165:     union{
 166:     u_short  _register;     /* whole register */
 167:     struct{
 168:         unsigned _key : 8;      /* Key number */
 169:         unsigned _transition : 1;   /* Transition direction */
 170:         unsigned _device : 3;   /* Device */
 171:         unsigned _x : 4;        /* Unused */
 172:     }_bits;
 173:     }_X;
 174: };
 175: 
 176: #define kbd_reg     _X._register
 177: #define kbd_key     _X._bits._key
 178: #define kbd_transition  _X._bits._transition
 179: #define kbd_device  _X._bits._device
 180: 
 181: #define VS_KBTUP    0       /* up */
 182: #define VS_KBTDOWN  1       /* down */
 183: 
 184: /*
 185:  * CSR3/4 Function Parameter Address
 186:  */
 187: 
 188: #define vs_pr1      vs_csr3
 189: #define vs_pr2      vs_csr4
 190: 
 191: struct vs_fparm{
 192:     union{
 193:     struct{
 194:         u_short _plow;  /* low 16 bits of address */
 195:         u_short _phigh; /* high 16 bits of address */
 196:     }_parts;
 197:     caddr_t _pall;
 198:     }_X;
 199: };
 200: #define fparm_low   _X._parts._plow
 201: #define fparm_high  _X._parts._phigh
 202: #define fparm_all   _X._pall
 203: 
 204: /*
 205:  * CSR5/6 - Cursor position
 206:  */
 207: 
 208: #define vs_cxr      vs_csr5
 209: #define vs_cyr      vs_csr6
 210: 
 211: 
 212: /*
 213:  * CSR 7 - Interrupt vector in fiber cable machines
 214:  */
 215: 
 216: #define vs_ivr      vs_csr7
 217: 
 218: /*
 219:  * CSR 8 through 14 Spare
 220:  */
 221: 
 222: #define vs_spr2     vs_csr8
 223: #define vs_spr3     vs_csr9
 224: #define vs_spr4     vs_csra
 225: #define vs_spr5     vs_csrb
 226: #define vs_spr6     vs_csrc
 227: #define vs_spr7     vs_csrd
 228: #define vs_spr8     vs_csre
 229: 
 230: /*
 231:  * CSR 15 - Interrupt vector in rev 2B
 232:  */
 233: 
 234: #define vs_ivr2     vs_csrf

Defined struct's

vs_csr defined in line 69; used 2 times
vs_fparm defined in line 191; used 14 times
vs_intr defined in line 138; used 2 times
vs_kbd defined in line 164; used 2 times
vsdevice defined in line 33; used 34 times

Defined macros

VSIRR_BITS defined in line 126; used 2 times
VS_ABORT defined in line 106; used 1 times
VS_CRC_DIS defined in line 61; never used
VS_DISBBA defined in line 110; used 1 times
VS_ENABBA defined in line 109; used 1 times
VS_ERROR defined in line 124; used 1 times
VS_FCN defined in line 66; used 9 times
VS_FCSHIFT defined in line 116; used 9 times
VS_FINITE defined in line 112; used 1 times
VS_GO defined in line 67; used 9 times
VS_IE defined in line 65; used 13 times
VS_INFINITE defined in line 111; used 1 times
VS_INIT defined in line 103; used 1 times
VS_INT_BE defined in line 133; never used
VS_INT_CD defined in line 131; never used
VS_INT_ID defined in line 130; never used
VS_INT_MM defined in line 134; never used
VS_INT_PWR defined in line 136; never used
VS_INT_SE defined in line 132; never used
VS_INT_TM defined in line 135; never used
VS_INT_US defined in line 129; never used
VS_KBDEV defined in line 160; never used
VS_KBKEY defined in line 162; never used
VS_KBT defined in line 161; never used
VS_KBTDOWN defined in line 182; never used
VS_KBTUP defined in line 181; never used
VS_LNK_AVL defined in line 57; used 1 times
VS_LNK_ERR defined in line 58; never used
VS_LNK_TRNS defined in line 56; used 3 times
VS_MNT_DONE defined in line 62; never used
VS_MNT_MODE defined in line 60; never used
VS_OWN defined in line 64; used 1 times
VS_PWRUP defined in line 107; used 1 times
VS_REASON defined in line 125; used 1 times
VS_SEND defined in line 104; used 3 times
VS_SPARE defined in line 63; never used
VS_START defined in line 105; used 1 times
VS_XMIT_ON defined in line 59; used 5 times
csr_CRCdisable defined in line 94; never used
csr_go defined in line 90; never used
csr_ie defined in line 91; never used
csr_linkAvail defined in line 98; used 4 times
csr_linkErr defined in line 97; used 1 times
csr_linkTran defined in line 99; used 1 times
csr_mainDone defined in line 93; never used
csr_mainMode defined in line 95; never used
csr_own defined in line 92; never used
csr_reg defined in line 89; used 1 times
csr_xmitOn defined in line 96; never used
fparm_all defined in line 202; used 13 times
fparm_high defined in line 201; used 5 times
fparm_low defined in line 200; used 5 times
intr_diagnostic defined in line 151; never used
intr_error defined in line 152; used 2 times
intr_reason defined in line 150; used 4 times
intr_reg defined in line 149; used 8 times
kbd_device defined in line 179; used 2 times
kbd_key defined in line 177; used 1 times
kbd_reg defined in line 176; used 1 times
kbd_transition defined in line 178; used 1 times
vs_cxr defined in line 208; used 1 times
vs_cyr defined in line 209; used 1 times
vs_irr defined in line 122; used 10 times
vs_ivr defined in line 216; used 1 times
vs_ivr2 defined in line 234; never used
vs_krr defined in line 158; used 1 times
vs_pr1 defined in line 188; used 6 times
vs_pr2 defined in line 189; used 6 times
vs_spr2 defined in line 222; never used
vs_spr3 defined in line 223; never used
vs_spr4 defined in line 224; never used
vs_spr5 defined in line 225; never used
vs_spr6 defined in line 226; never used
vs_spr7 defined in line 227; never used
vs_spr8 defined in line 228; never used

Usage of this include

vsreg.h used 1 times
Last modified: 1986-06-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1270
Valid CSS Valid XHTML 1.0 Strict