(FILECREATED "25-Oct-85 22:01:11" {ERIS}<LISPCORE>LIBRARY>DOVERS232C.;7 13768  

      changes to:  (VARS DOVERS232CCOMS)

      previous date: "20-Oct-85 18:27:11" {ERIS}<LISPCORE>LIBRARY>DOVERS232C.;6)


(* Copyright (c) 1985 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT DOVERS232CCOMS)

(RPAQQ DOVERS232CCOMS ((COMS (* Dove Rs232 Opie definitions)
			       (DECLARE: DONTCOPY (FILES (SYSLOAD FROM VALUEOF LISPUSERSDIRECTORIES)
							 MESATYPES
							 (LOADCOMP FROM {ERIS}<LISPCORE>SOURCES>)
							 DOVEINPUTOUTPUT
							 (SOURCE FROM {ERIS}<LISPCORE>SOURCES>)
							 DOVEDECLS
							 (LOADCOMP FROM {ERIS}<LISPCORE>SOURCES>)
							 DOVEMISC)
					 (EXPORT (RECORDS Dove.RSIOPSystemInputPort 
							  Dove.RSLatchedStatus Dove.RS232FlowControl)
						 (RECORDS Dove.i8274.WR1 Dove.i8274.WR3 
							  Dove.i8274.WR4 Dove.i8274.WR5 
							  Dove.i8274.RR0 Dove.i8274.RR1)
						 (RECORDS Dove.RS232DCB Dove.RS232FCB 
							  Dove.RS232HdlOnlyRecord Dove.RS232IOCB)
						 (CONSTANTS * Dove.RS232CommandListConstants)
						 (CONSTANTS * Dove.RS232MiscConstants)
						 (CONSTANTS * Dove.RS232WorkListConstants)
						 (CONSTANTS * Dove.RS232IOCBTypes)
						 (CONSTANTS * Dove.i8274.WR1.Constants)
						 (CONSTANTS * Dove.i8274.WR4.Constants)
						 (CONSTANTS * Dove.i8274.WR5.Constants)
						 (CONSTANTS * Dove.i8274.RR1.Constants)
						 (CONSTANTS (DVRS232C.IOCB.SIZE 12)))))))



(* Dove Rs232 Opie definitions)

(DECLARE: DONTCOPY 
(FILESLOAD (SYSLOAD FROM VALUEOF LISPUSERSDIRECTORIES)
	   MESATYPES
	   (LOADCOMP FROM {ERIS}<LISPCORE>SOURCES>)
	   DOVEINPUTOUTPUT
	   (SOURCE FROM {ERIS}<LISPCORE>SOURCES>)
	   DOVEDECLS
	   (LOADCOMP FROM {ERIS}<LISPCORE>SOURCES>)
	   DOVEMISC)

(* FOLLOWING DEFINITIONS EXPORTED)


[DECLARE: EVAL@COMPILE 

(BLOCKRECORD Dove.RSIOPSystemInputPort ((NIL BYTE)
					  (NIL BITS 5)
					  (dataSetReady FLAG)
                                                             (* active low)
					  (ringIndicator FLAG)
                                                             (* active low)
					  (dataTerminalReady FLAG)
                                                             (* active low)
					  ))

(BLOCKRECORD Dove.RSLatchedStatus ((NIL BITS 5)
				     (ringHeard FLAG)
				     (dataLost FLAG)
				     (breakDetected FLAG)))

(MESARECORD Dove.RS232FlowControl ((type WORD)
				     (XOn WORD)
				     (XOff WORD)))
]
[DECLARE: EVAL@COMPILE 

(BLOCKRECORD Dove.i8274.WR1 ((NIL BYTE)                    (* Padding so we can access this with 
							     (LOCF (fetch (Dove.RS232DCB rsWR1ofi8274) ...)))
			       (waitEnable FLAG)
			       (NIL FLAG)
			       (waitOnRxOrTx BITS 1)
			       (interruptCondition BITS 2)
			       (statusAffectsVector FLAG)
			       (txIntDMAenable FLAG)
			       (extInterruptEnable FLAG)))

(BLOCKRECORD Dove.i8274.WR3 ((rxCharLength BITS 2)
			       (autoEnable FLAG)
			       (enterHuntMode FLAG)
			       (rxCRCenable FLAG)
			       (addrSearchMode FLAG)
			       (syncCharLoadInhibit FLAG)
			       (rxEnable FLAG)))

(BLOCKRECORD Dove.i8274.WR4 ((NIL BYTE)
			       (clockRate BITS 2)
			       (synchCharControl BITS 2)
			       (stopBits BITS 2)
			       (parityOddOrEven BITS 1)
			       (enableParity FLAG)))

(BLOCKRECORD Dove.i8274.WR5 ((dtr FLAG)
			       (txCharLength BITS 2)
			       (sendBreak FLAG)
			       (txEnable FLAG)
			       (modeSDLCOrCRC16 BITS 1)
			       (rts FLAG)
			       (txCRCenable FLAG)))

(BLOCKRECORD Dove.i8274.RR0 ((NIL BYTE)
			       (break FLAG)
			       (syncOnlyTxUnderrun FLAG)
			       (cts FLAG)
			       (synDetect FLAG)
			       (carrierDetect FLAG)
			       (txBufferEmpty FLAG)
			       (chAIntPending FLAG)
			       (rxCharAvailable FLAG))
			      (ACCESSFNS ((ctsReally (NOT (fetch (Dove.i8274.RR0 cts)
								 of DATUM)))
					    (synDetectReally (NOT (fetch (Dove.i8274.RR0 
											synDetect)
								       of DATUM)))
					    (carrierDetectReally (NOT (fetch (Dove.i8274.RR0
										   carrierDetect)
									   of DATUM))))))

(BLOCKRECORD Dove.i8274.RR1 ((endOfFrameSDLCMode FLAG)
			       (crcFramingError FLAG)
			       (rxOverrunError FLAG)
			       (parityError FLAG)
			       (bitCharMode BITS 3)
			       (allSent FLAG)))
]
[DECLARE: EVAL@COMPILE 

(MESARECORD Dove.RS232DCB ((rsIOPSystemInputPort WORD)
			     (rsWorkList WORD)
			     (rsCommandWorkList WORD)
			     (rsBaudRateChA WORD)
			     (rsWR0ofi8274 BYTE)
			     (rsWR1ofi8274 BYTE)
			     (rsWR3ofi8274 BYTE)
			     (rsWR4ofi8274 BYTE)
			     (rsWR5ofi8274 BYTE)
			     (rsWR6ofi8274 BYTE)
			     (rsWR7ofi8274 BYTE)
			     (rsReadRegister0 BYTE)
			     (rsReadRegister1 BYTE)
			     (rsReadRegister2 BYTE)
			     (rsLatchedStatus BYTE)
			     (rsTTYHost BYTE)
			     (rsClientType BYTE)
			     (rs232Mode BYTE)
			     (rs232FlowControl Dove.RS232FlowControl)
			     (rsFrameTimeoutValue WORD)
			     (rsClientConditionChA DoveIO.ClientCondition)
			     (rs232ChAWork WORD)
			     (txChAWork WORD)
			     (txChAWaitXOn WORD)
			     (rsEEpromImage 2 BYTE)))

(MESARECORD Dove.RS232FCB ((rs232CMainTaskTcb DoveIO.TaskContextBlock)
			     (txTaskChATcb DoveIO.TaskContextBlock)
			     (specRxTaskChATcb DoveIO.TaskContextBlock)
			     (rxTaskChATcb DoveIO.TaskContextBlock)
			     (extStatChATcb DoveIO.TaskContextBlock)
			     (rsQueueTxChA Dove.QueueBlock)
                                                             (* Rs232 transmitter queue)
			     (rsQueueRxChA Dove.QueueBlock)
                                                             (* Rs232 receiver queue)
			     (rs232LockMask WORD)
			     (rs232WorkMask WORD)))

(BLOCKRECORD Dove.RS232HdlOnlyRecord ((currentTxIOCBES WORD)
                                                             (* Info on state of tx IOCB's)
					(currentTxIOCBDI WORD)
					(rsTxBufferES WORD)
					(rsTxBufferDI WORD)
					(rsBytesTransfered WORD)
                                                             (* SIC!)
					(currentRxIOCBES WORD)
                                                             (* Info on state of rx IOCB's)
					(currentRxIOCBDI WORD)
					(rsRxBufferES WORD)
					(rsRxBufferDI WORD)
					(rsBytesReceived WORD)
					(rsTxIOCBs WORD)     (* error and status counters)
					(rsRxIOCBs WORD)
					(rsRxCRCErrorCnt WORD)
					(specErrorCount WORD)
					(rsOverRunErrors WORD)
					(badTxIntCnts WORD)
					(badRxIntCnts WORD)
					(badSpecRxIntCnts WORD)
					(badExtStatIntCnts WORD)
					(badTxIntTimeout WORD)))

(BLOCKRECORD Dove.RS232IOCB ((rsOperation 3 WORD)          (* Contains a data buffer and a length word)
			       (rsTransferCountChA WORD)     (* byte count in the buffer)
			       (rsNextIocbChA 2 WORD)        (* address of next IOCB)
			       (currentOpStatus BYTE)        (* current operation status)
			       (rsIocbStatusByte0 BYTE)      (* Read register 0 of the 8274)
			       (rsIocbStatusByte1 BYTE)      (* Read register 1 of the 8274)
			       (rsIocbStatusByte2 BYTE)      (* Read register 2 of the 8274)
			       (rsBufferPtr 2 WORD)          (* Pointer to the buffer)
			       (rsBufferSize WORD)           (* Size of buffer)
			       (rsIOCBType BYTE)             (* Tx or Rx IOCB)
			       (rsActiveIOCB BYTE)           (* Set when an IOCB is active, cleared when not)
			       ))
]

(RPAQQ Dove.RS232CommandListConstants ((abortRx 32768)
					 (clearAbortRx 32767)
					 (abortTx 16384)
					 (clearAbortTx 49151)
					 (newTx 8192)
					 (clearNewTx 57343)
					 (getDeviceStatus 4096)
					 (cleargetDevStat 61439)
					 (rsCommandInProgress 2048)
					 (noCommandInProgress 63487)
					 (rtsCommand 1024)
					 (dtrCommand 512)))
(DECLARE: EVAL@COMPILE 

(RPAQQ abortRx 32768)

(RPAQQ clearAbortRx 32767)

(RPAQQ abortTx 16384)

(RPAQQ clearAbortTx 49151)

(RPAQQ newTx 8192)

(RPAQQ clearNewTx 57343)

(RPAQQ getDeviceStatus 4096)

(RPAQQ cleargetDevStat 61439)

(RPAQQ rsCommandInProgress 2048)

(RPAQQ noCommandInProgress 63487)

(RPAQQ rtsCommand 1024)

(RPAQQ dtrCommand 512)

(CONSTANTS (abortRx 32768)
	   (clearAbortRx 32767)
	   (abortTx 16384)
	   (clearAbortTx 49151)
	   (newTx 8192)
	   (clearNewTx 57343)
	   (getDeviceStatus 4096)
	   (cleargetDevStat 61439)
	   (rsCommandInProgress 2048)
	   (noCommandInProgress 63487)
	   (rtsCommand 1024)
	   (dtrCommand 512))
)

(RPAQQ Dove.RS232MiscConstants ((noFlowControl 0)
				  (XOnXOffFlowControl 256)
				  (asynchMode 0)
				  (synchMode 1)
				  (IOCBpollRxOrTx 0)
				  (IOCBcomplete 1)
				  (IOCBaborted 2)
				  (IOCBframeTimeout 3)
				  (IOCBdisaster 4)
				  (rsNoClient 0)
				  (rsNormal 1)
				  (rsDebugger 2)
				  (latchRingHeard 32)
				  (latchDataLost 64)
				  (latchBreakDet 128)))
(DECLARE: EVAL@COMPILE 

(RPAQQ noFlowControl 0)

(RPAQQ XOnXOffFlowControl 256)

(RPAQQ asynchMode 0)

(RPAQQ synchMode 1)

(RPAQQ IOCBpollRxOrTx 0)

(RPAQQ IOCBcomplete 1)

(RPAQQ IOCBaborted 2)

(RPAQQ IOCBframeTimeout 3)

(RPAQQ IOCBdisaster 4)

(RPAQQ rsNoClient 0)

(RPAQQ rsNormal 1)

(RPAQQ rsDebugger 2)

(RPAQQ latchRingHeard 32)

(RPAQQ latchDataLost 64)

(RPAQQ latchBreakDet 128)

(CONSTANTS (noFlowControl 0)
	   (XOnXOffFlowControl 256)
	   (asynchMode 0)
	   (synchMode 1)
	   (IOCBpollRxOrTx 0)
	   (IOCBcomplete 1)
	   (IOCBaborted 2)
	   (IOCBframeTimeout 3)
	   (IOCBdisaster 4)
	   (rsNoClient 0)
	   (rsNormal 1)
	   (rsDebugger 2)
	   (latchRingHeard 32)
	   (latchDataLost 64)
	   (latchBreakDet 128))
)

(RPAQQ Dove.RS232WorkListConstants ((workFori8274 32768)
				      (rsWorkWR7 16384)
				      (rsWorkWR6 8192)
				      (rsWorkWR5 4096)
				      (rsWorkWR4 2048)
				      (rsWorkWR3 1024)
				      (rsWorkWR1 512)
				      (rsWorkWR0 256)
				      (rsNewBaudRate 128)
				      (rsChangeMode 64)))
(DECLARE: EVAL@COMPILE 

(RPAQQ workFori8274 32768)

(RPAQQ rsWorkWR7 16384)

(RPAQQ rsWorkWR6 8192)

(RPAQQ rsWorkWR5 4096)

(RPAQQ rsWorkWR4 2048)

(RPAQQ rsWorkWR3 1024)

(RPAQQ rsWorkWR1 512)

(RPAQQ rsWorkWR0 256)

(RPAQQ rsNewBaudRate 128)

(RPAQQ rsChangeMode 64)

(CONSTANTS (workFori8274 32768)
	   (rsWorkWR7 16384)
	   (rsWorkWR6 8192)
	   (rsWorkWR5 4096)
	   (rsWorkWR4 2048)
	   (rsWorkWR3 1024)
	   (rsWorkWR1 512)
	   (rsWorkWR0 256)
	   (rsNewBaudRate 128)
	   (rsChangeMode 64))
)

(RPAQQ Dove.RS232IOCBTypes ((rsIOCBTypeRx 0)
			      (rsIOCBTypeTx 1)))
(DECLARE: EVAL@COMPILE 

(RPAQQ rsIOCBTypeRx 0)

(RPAQQ rsIOCBTypeTx 1)

(CONSTANTS (rsIOCBTypeRx 0)
	   (rsIOCBTypeTx 1))
)

(RPAQQ Dove.i8274.WR1.Constants ((waitOnTx 0)
				   (waitOnRx 1)
				   (rxIntDMAdisable 0)
				   (rxIntOn1stCharOrSpecCondition 1)
				   (intOnAllRxParityAffectsVector 2)
				   (intOnAllRxParityNotAffectVector 3)))
(DECLARE: EVAL@COMPILE 

(RPAQQ waitOnTx 0)

(RPAQQ waitOnRx 1)

(RPAQQ rxIntDMAdisable 0)

(RPAQQ rxIntOn1stCharOrSpecCondition 1)

(RPAQQ intOnAllRxParityAffectsVector 2)

(RPAQQ intOnAllRxParityNotAffectVector 3)

(CONSTANTS (waitOnTx 0)
	   (waitOnRx 1)
	   (rxIntDMAdisable 0)
	   (rxIntOn1stCharOrSpecCondition 1)
	   (intOnAllRxParityAffectsVector 2)
	   (intOnAllRxParityNotAffectVector 3))
)

(RPAQQ Dove.i8274.WR4.Constants ((enableSyncModes 0)
				   (oneStopBit 1)
				   (oneAndHalfStopBit 2)
				   (twoStopBits 3)
				   (parityOdd 0)
				   (parityEven 1)
				   (bitSync8 0)
				   (BitSync16 1)
				   (SdlcHdlc 2)
				   (extSyncMode 3)
				   (x1clk 0)
				   (x16clk 1)
				   (x32clk 2)
				   (x64clk 3)))
(DECLARE: EVAL@COMPILE 

(RPAQQ enableSyncModes 0)

(RPAQQ oneStopBit 1)

(RPAQQ oneAndHalfStopBit 2)

(RPAQQ twoStopBits 3)

(RPAQQ parityOdd 0)

(RPAQQ parityEven 1)

(RPAQQ bitSync8 0)

(RPAQQ BitSync16 1)

(RPAQQ SdlcHdlc 2)

(RPAQQ extSyncMode 3)

(RPAQQ x1clk 0)

(RPAQQ x16clk 1)

(RPAQQ x32clk 2)

(RPAQQ x64clk 3)

(CONSTANTS (enableSyncModes 0)
	   (oneStopBit 1)
	   (oneAndHalfStopBit 2)
	   (twoStopBits 3)
	   (parityOdd 0)
	   (parityEven 1)
	   (bitSync8 0)
	   (BitSync16 1)
	   (SdlcHdlc 2)
	   (extSyncMode 3)
	   (x1clk 0)
	   (x16clk 1)
	   (x32clk 2)
	   (x64clk 3))
)

(RPAQQ Dove.i8274.WR5.Constants ((ch5bits 0)
				   (ch6bits 1)
				   (ch7bits 2)
				   (ch8bits 3)
				   (SDLC 0)
				   (CRC16 1)))
(DECLARE: EVAL@COMPILE 

(RPAQQ ch5bits 0)

(RPAQQ ch6bits 1)

(RPAQQ ch7bits 2)

(RPAQQ ch8bits 3)

(RPAQQ SDLC 0)

(RPAQQ CRC16 1)

(CONSTANTS (ch5bits 0)
	   (ch6bits 1)
	   (ch7bits 2)
	   (ch8bits 3)
	   (SDLC 0)
	   (CRC16 1))
)

(RPAQQ Dove.i8274.RR1.Constants ((bitSyncResidue0 0)
				   (bitSyncResidue1 1)
				   (bitSyncResidue2 2)
				   (bitSyncResidue3 3)
				   (bitSyncResidue4 4)
				   (bitSyncResidue5 5)
				   (bitSyncResidue6 6)
				   (bitSyncResidue7 7)))
(DECLARE: EVAL@COMPILE 

(RPAQQ bitSyncResidue0 0)

(RPAQQ bitSyncResidue1 1)

(RPAQQ bitSyncResidue2 2)

(RPAQQ bitSyncResidue3 3)

(RPAQQ bitSyncResidue4 4)

(RPAQQ bitSyncResidue5 5)

(RPAQQ bitSyncResidue6 6)

(RPAQQ bitSyncResidue7 7)

(CONSTANTS (bitSyncResidue0 0)
	   (bitSyncResidue1 1)
	   (bitSyncResidue2 2)
	   (bitSyncResidue3 3)
	   (bitSyncResidue4 4)
	   (bitSyncResidue5 5)
	   (bitSyncResidue6 6)
	   (bitSyncResidue7 7))
)
(DECLARE: EVAL@COMPILE 

(RPAQQ DVRS232C.IOCB.SIZE 12)

(CONSTANTS (DVRS232C.IOCB.SIZE 12))
)


(* END EXPORTED DEFINITIONS)

)
(PUTPROPS DOVERS232C COPYRIGHT ("Xerox Corporation" 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL)))
STOP