|
|
DataMuseum.dkPresents historical artifacts from the history of: Regnecentalen RC-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Regnecentalen RC-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T U i
Length: 5977 (0x1759)
Types: TextFile
Notes: UNIX file
Names: »icc.h«
└─⟦a6ab2eb36⟧ Bits:30004042/kconfig3.imd SW95705I 386/ix Multi-user Release 1.2
└─⟦a6ab2eb36⟧ UNIX Filesystem
└─⟦this⟧ »kc/new/usr/include/sys/icc.h«
/*
* ICC Driver board interface definitions include file
*/
/*
* Copyrighted as an unpublished work.
* (c) Copyright 1986,1988 INTERACTIVE Systems Corporation
* All rights reserved.
*
* RESTRICTED RIGHTS
*
* These programs are supplied under a license. They may be used,
* disclosed, and/or copied only as permitted under such license
* agreement. Any copy must contain the above copyright notice and
* this restricted rights notice. Use, copying, and/or disclosure
* of the programs is strictly prohibited unless otherwise provided
* in the license agreement.
*/
#ident "@(#)icc.h 1.2 - 88/02/02"
#ident "@(#) (c) Copyright INTERACTIVE Systems Corporation 1986,1988"
#if MPAT || AT386 || (SCO5 && M_I386)
#define far
#endif
#if MPAT
#include <sys/tty.h>
#include <sys/termio.h>
#elif AT386
#include <sys/tty.h>
#include <sys/termio.h>
#define putq iccputq
#define getq iccgetq
#else /* IBM5 || SCO5 */
#ifndef faddr_t
#include <sys/types.h>
#endif
#include <sys/tty.h>
#endif /* IBM5 || SCO5 */
/*
* board level includes for icc board
*/
/* registers */
#define ICCSTAT 0
#define ICCNTRL ICCSTAT
#define SCC1 0x10
#define SCC2 0x20
#define SCC3 0x30
#define ICCPAL 0x40
#define ICCREF 0x50
#define ATWIN 0x60
/* channel addresses */
#define CH0 (SCC1+4)
#define CH1 SCC1
#define CH2 (SCC2+4)
#define CH3 SCC2
#define CH4 (SCC3+4)
#define CH5 SCC3
#define CMDP(base) base
#define DATAP(base) (base+2)
/* status bits (ICCSTAT) */
#define ICCINT1 0x01 /* SCC1 interrupt */
#define ICCINT2 0x02 /* SCC2 interrupt */
#define ICCINT3 0x04 /* SCC3 interrupt */
#define ICCTOICC 0x08 /* interrupt from host */
#define ICCINTREF 0x10 /* refresh timeout */
#define ICCPERR 0x20 /* parity error */
#define ICCTOHOST 0x40 /* interrupt to host */
/*
* control bit addresses (ICCNTRL)
* memory mapped, 1 bit per address, only low order bit significant
* all bits cleared on reset
*/
#define ICCROM ICCNTRL /* 1=ROM disabled in low 4K */
#define ICCPAR (ICCNTRL+4) /* 1=parity enabled */
#define ICCIHOST (ICCNTRL+6) /* 1=interrupt to host */
#define ICCI186 (ICCNTRL+8) /* 1=interrupt to 80186 (from host) */
#define ICCRESET (ICCNTRL+10) /* 1=board not reset */
#define ICCRAMVIS (ICCNTRL+14) /* 1=RAM visible to host */
/* hi memory control bits */
#define ICCDMA (ICCNTRL+2) /* 1=DMA to host in hi memory */
/* 0=ROM/RAM in hi memory */
#define ICCNOROM (ICCNTRL+12) /* 1=RAM in hi memory */
/* 0=ROM in hi memory */
#ifndef B9600
#define B0 0
#define B50 0000001
#define B75 0000002
#define B110 0000003
#define B134 0000004
#define B150 0000005
#define B200 0000006
#define B300 0000007
#define B600 0000010
#define B1200 0000011
#define B1800 0000012
#define B2400 0000013
#define B4800 0000014
#define B9600 0000015
#define B19200 0000016
#define B38400 0000017
#else
#ifndef B19200
#define B19200 EXTA
#define B38400 EXTB
#endif
#endif
/* host/slave mutual definitions */
#define QSIZE 1024
struct q {
unsigned short get;
unsigned short put;
unsigned char buf[QSIZE];
unsigned char stat[QSIZE];
};
struct aux {
unsigned short addr;
unsigned short flags;
unsigned short local;
unsigned short state;
unsigned short hstate;
unsigned short t_iflag; /* copies of tty struct fields */
unsigned short t_oflag;
unsigned short t_cflag;
unsigned short t_lflag;
unsigned char t_cc[NCC];
struct q inq;
struct q outq;
#ifdef VPIX
#ifdef I186 /* FOR COMPILING BOARD LEVEL CODE */
struct ss {
char ss_start;
char ss_stop;
} iccss;
#else
struct termss iccss; /* VPIX start & stop characters */
#endif
#else
short pad;
#endif
long iovflo;
};
/* state bit re-definitions */
#ifdef SCO5
#define AXON EXTDLY
#else
#define AXON EXTPROC
#endif
#define AXOFF TACT
#define ABLOCK CLESC
/* hstate bit re-definitions */
#define OLOCK TTIOW
/* flags bits */
#define BNEXT 0x1000
#define WPARAM 0x100
#define MODOPEN 0x80
#define OUTOPEN 0x40
#define PRTOPEN 0x20
#define NORMOPEN 0x10
#define WCLOSE 0x01
#define RQSIZE 32
struct req { unsigned short dev, code, val; }; /* request structure */
struct rq { /* request q */
unsigned short get;
unsigned short put;
struct req reqs[RQSIZE];
};
#define NEXT(x,size) ((x < (size-1)) ? (x + 1) : 0)
#define QNEXT(x) NEXT(x, QSIZE)
#define RQNEXT(x) NEXT(x, RQSIZE)
#ifdef M_KERNEL
typedef struct aux far *AUXP;
typedef struct q far *QP;
#define ME 0
#define OTHER 1
#define CLI()
#define STI()
#else
typedef struct aux *AUXP;
typedef struct q *QP;
#define ME 1
#define OTHER 0
#if MPAT || AT386
#define CLI() asm(" cli")
#define STI() asm(" sti")
#else /* MPAT */
#define CLI() cli()
#define STI() sti()
#endif /* MPAT */
#endif
/* driver parameters */
#define CTRLDEV 255 /* special control device minor # */
/* minor device defines */
#ifdef ISMODEM
#undef ISMODEM
#endif
#define UNIT(d) (d & 0x1f)
#define MODES(d) (d & 0xe0)
#define ISMODEM(d) (d & MODOPEN)
#define ISOUT(d) (d & OUTOPEN)
#define ISPRT(d) (d & PRTOPEN)
/* request codes */
/* host-to-slave */
/* from tty.h
/* #define T_SUSPEND 2
/* #define T_RESUME 3
/* #define T_BLOCK 4
/* #define T_UNBLOCK 5
/* #define T_RFLUSH 6
/* #define T_WFLUSH 7
/* #define T_BREAK 8
/* #define T_PARM 11
*/
#define OPEN 16
#define MOPEN 17
#define OOPEN 18
#define CLOSE 19
/* special debugging requests */
#define STATE 60 /* print port state */
#define SLEEP 61 /* sleep timing test */
#define SETICK 62 /* set tick length */
#define DEBCPY 63 /* debug copy of 8000:0 to 7000:0 */
#define NOWAIT 0x80 /* code bit indicating no wait or reply */
/* slave-to-host */
#define INIT 64
#define DCDROP 65
#define REPLY NOWAIT /* code bit indicating reply req */
/* slave exchange */
#define SLAVE_BASE 0x2000
struct slave {
short start; /* general stuff */
short heartbeat;
char reset;
char intflg;
char prflg;
char monflg;
struct rq toslave;
struct rq tohost;
short aoff; /* tty specific stuff */
short aseg;
long phystty;
char pbuf[1]; /* off the end */
};