Annotation of researchv8dc/sys/chaos/dr11c.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Definitions for DR11-C interface used as Chaosnet link.
        !             3:  */
        !             4: 
        !             5: /*
        !             6:  * Structure needed for each transmitter. (member of xminfo union).
        !             7:  */
        !             8: struct dr11cinfo       {
        !             9:        struct dr11c    *dr_addr;       /* Actual UNIBUS address */
        !            10:        short           *dr_tptr;       /* Next short in trans pkt */
        !            11:        short           *dr_rptr;       /* Next short in rcv pkt */
        !            12:        short           dr_tcnt;        /* # of shorts to send in pkt */
        !            13:        short           dr_rcnt;        /* # of shorts to rcve in pkt */
        !            14:        short           dr_tcheck;      /* Transmit block check word */
        !            15:        short           dr_rcheck;      /* Receive block check word */
        !            16:        char            dr_tstate;      /* Framing state of transmitter */
        !            17:        char            dr_rstate;      /* Framing state of receiver */
        !            18:        char            dr_intrup;      /* True during interrupt, used by
        !            19:                                           clock level to suppress checking
        !            20:                                           for hung interface if clock
        !            21:                                           interrupted a dr11c interrupt */
        !            22: };
        !            23: 
        !            24: #ifdef vax
        !            25: #define DR11CBASE      (0176770 + UBA0_DEV)    /* base UNIBUS address for first dr11-c */
        !            26: #else
        !            27: #define DR11CBASE      0167770 /* base UNIBUS address for first dr11-c */
        !            28: #endif
        !            29: #define DR11CINC       -010    /* increment for next dr11-c */
        !            30: /*
        !            31:  * Arrangement of dr11 registers
        !            32:  */
        !            33: struct dr11c   {
        !            34:        short   dr_csr;
        !            35:        short   dr_obuf;
        !            36:        short   dr_ibuf;
        !            37: };
        !            38: /*
        !            39:  * dr_csr bit definitions
        !            40:  */
        !            41: #define DROUT  02      /* I have sent output - set by xmitter (sets DRIRDY) */
        !            42: #define DRORDY 0200    /* He has read output - interrupts (from DRIN) */
        !            43: #define DROE   0100    /* Interrupt enable (allow DRORDY to interrupt me) */
        !            44: 
        !            45: #define DRIN   01      /* I have read input - set by receiver (sets DRORDY)*/
        !            46: #define DRIRDY 0100000 /* He has sent input - interrupts (from DROUT) */
        !            47: #define DRIE   040     /* Interrupt enable (allow DRIRDY to interrupt me) */
        !            48: 
        !            49: /*
        !            50:  * Definitions of framing characters and CRC constants.
        !            51:  */
        !            52: #define DR11CHUNG      (HZ*2)
        !            53: #define DRSYNC (short)0137773
        !            54: #define DRESC  (short)0167776
        !            55: /*
        !            56:  * Framing states
        !            57:  */
        !            58: #define DRIDLE 0       /* Idle, between packets */
        !            59: #define DRSYN1 1       /* After one DRSYNC sent/received */
        !            60: #define DRSYN2 2       /* After two DRSYNC's sent/received */
        !            61: #define DRCNT1 3       /* After count sent/received */
        !            62: #define DRDATA 4       /* In the middle of data */
        !            63: #define DRESC1 5       /* After DRESC escape sent/received */
        !            64: #define DRCHECK        6       /* After last data word sent/received */
        !            65: #define DRTDONE        7       /* After check is transmitted (transmitter only) */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.