From de8a3b6141cea1e8cd1aa9aaeaac0911430cd23c Mon Sep 17 00:00:00 2001 From: Richard Burgess <> Date: Tue, 24 Jan 1995 09:34:08 +0000 Subject: [PATCH] autocommit for file dated 1995-01-24 09:34:08 --- ossource/parallel.h | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 ossource/parallel.h diff --git a/ossource/parallel.h b/ossource/parallel.h new file mode 100644 index 0000000..0e99b39 --- /dev/null +++ b/ossource/parallel.h @@ -0,0 +1,47 @@ +/* This defines the status record and pertinent data masks + for values form the parallel port driver. +*/ + +struct statRecL{ + unsigned long lptJob; /* Owner of this lpt port, 0 for not in use */ + unsigned long LastErc; /* Result of last device operation */ + unsigned long LastTotal; /* Total bytes moved in last operation */ + unsigned char status; /* Status Byte - Bits defined in Parallel.h */ + unsigned long BufCnt; /* Bytes left in buffer to send */ + unsigned char resvd1; /* */ + unsigned char resvd2; /* */ + unsigned char resvd3; /* */ + unsigned char IRQNum; /* IRQNum for this channel */ + unsigned long IOBase; /* IO base address for hardware */ + unsigned long XBufSize; /* Size of Xmit buffer */ + unsigned long XTimeOut; /* Xmit Timeout in 10ms increments */ + unsigned long resvd4; /* Recv Timeout in 10ms increments */ + unsigned long resvd[6]; /* out to 64 bytes */ + }; + +/* Device Driver interface commands (Op numbers) + NOTE: No "Read" commands are defined for this driver. + This is a WRITE-ONLY device. +*/ + +#define CmdWriteRec 2 /* Write one or more bytes */ +#define CmdOpenL 10 /* Open Comm Channel */ +#define CmdCloseL 11 /* Close Comm Channel */ +#define CmdCloseLU 12 /* Close Comm Channel UNCONDITIONALLY */ +#define CmdSetXTO 14 /* Set Xmit timeout 10ms incs in dLBA */ +#define CmdWriteB 32 /* write a single byte */ + +#define LPTBUSY 0x80 /* 1 = NOT Busy */ +#define LPTACK 0x40 /* 1 = Acknowledge */ +#define LPTPAPER 0x20 /* 1 = Out of paper */ +#define LPTSELECT 0x10 /* 1 = Selected */ +#define LPTIOERR 0x08 /* 1 = I/O Error */ + +#define ErcBadOpNum 503 /* Standard Device error for bad cmd number */ +#define ErcXmitTimeoutL 901 /* Xmit Buffer never Emptied */ +#define ErcDataNotSent 902 /* Xmit buffer not empty */ +#define ErcNotOpenL 907 /* Channel not open... */ +#define ErcChannelOpenL 909 /* It's already open... */ +#define ErcNotOwnerL 912 /* It's opened by someone else... */ +#define ErcBadIOBaseL 924 /* if 0 */ +#define ErcBadInitSizeL 927 /* At least 40 bytes for this version */ -- 2.40.0