-/* dmfreg.h 6.1 83/07/29 */
+/*
+ * Copyright (c) 1982, 1986 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ * @(#)dmfreg.h 7.1 (Berkeley) 6/5/86
+ */
/*
* DMF-32 definitions.
u_short dmfirw; /* indirect register word */
u_char dmfirc[2]; /* " " bytes */
} dmfun;
- short dmfl[2];
- short dmfd[4];
+ short dmfl_ctrl; /* line printer control register */
+ short dmfl_indrct; /* line printer indirect register */
+ short dmfd[4]; /* for dr11 (not implemented) */
};
#define dmfrsp dmfrbuf /* receive silo parameter register (wo) */
#define dmftbuf dmfun.dmfirc[0] /* transmit buffer */
#define dmftsc dmfun.dmfirc[0] /* transmit silo count */
#define dmfrms dmfun.dmfirc[1] /* receive modem status */
-#define dmflcr dmfun.dmfirc[0] /* line control register */
-#define dmftms dmfun.dmfirc[1] /* transmit modem status */
+#define dmflctms dmfun.dmfirw /* line control, transmit modem status */
#define dmftba dmfun.dmfirw /* transmit buffer address */
#define dmftcc dmfun.dmfirw /* transmit character count */
#define DMF_ON (DMF_DTR|DMF_RTS)
#define DMF_OFF 0
-/* bits in dmflcr */
+/* bits in dmflctms */
#define DMF_MIE 0040 /* modem interrupt enable */
#define DMF_FLUSH 0020 /* flush transmit silo */
#define DMF_RBRK 0010 /* real break bit */
#define DML_DTR 0000002 /* data terminal ready */
#define DML_LE 0000001 /* line enable */
-#define SETLCR(pt, exp) \
- pt->dmfun.dmfirw = (((pt)->dmftms)<<8) | ((exp)&0xff)
+/* dmf line printer csr def */
+#define DMFL_PEN (1<<0) /* print enable */
+#define DMFL_RESET (1<<1) /* master reset */
+#define DMFL_FORMAT (1<<2) /* format control */
+#define DMFL_UNUSED (3<<3)
+#define DMFL_MAINT (1<<5) /* maintenance mode on */
+#define DMFL_IE (1<<6) /* intr enable */
+#define DMFL_PDONE (1<<7) /* print done bit */
+#define DMFL_INDIR (7<<8) /* indirect reg */
+#define DMFL_UNUSED2 (1<<11)
+#define DMFL_CONV (1<<12) /* connect verify */
+#define DMFL_DAVRDY (1<<13) /* davfu ready */
+#define DMFL_OFFLINE (1<<14) /* printer offline */
+#define DMFL_DMAERR (1<<15) /* dma error bit */
+#define DMFL_BUFSIZ 512 /* max chars per dma */
+#define DMFL_DEFCOLS 132 /* default # of cols/line <=255 */
+#define DMFL_DEFLINES 66 /* default # of lines/page <=255 */
+#define DMFL_OPTIONS ((1 << 8) | (1 << 9) | (1 << 15))
+ /* auto cr, real ff, no lower to upper */
+
+/*
+ * Bits in the configuration register
+ */
+#define DMFC_CONFMASK 0xf000 /* picks off the configuration bits */
+#define DMFC_DR 0x1000 /* DR11 parallel interface */
+#define DMFC_LP 0x2000 /* LP dma parallel lineprinter i'face */
+#define DMFC_SYNC 0x4000 /* Synchronous serial interface */
+#define DMFC_ASYNC 0x8000 /* 8 Serial ports */