home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
pascal
/
vdl020d.zip
/
VFOS.DOC
< prev
next >
Wrap
Text File
|
1993-04-14
|
9KB
|
236 lines
{
════════════════════════════════════════════════════════════════════════════
Visionix Serial Communictions Unit - FOSSIL specification (VFOS)
Version 0.1 - Revision C
Copyright 1991,92,93 Visionix
ALL RIGHTS RESERVED
────────────────────────────────────────────────────────────────────────────
** revision history in reverse chronological order **
Initials Date Comment
──────── ──────── ────────────────────────────────────────────────────────
mep 02/11/93 Cleaned up code for beta release
Fixed for DPMI mode
jrt 02/08/93 Sync with beta 0.12 release
mep 01/31/93 Bug fixes.
jrt 12/07/92 Sync with beta 0.11 release
jrt 11/21/92 Sync with beta 0.08
mep 11/18/92 Code re-implemented to work with VSer. Major changes
completed. Second internal revision.
mep 11/02/92 First logged revision.
────────────────────────────────────────────────────────────────────────────
}
Unit VFos;
Uses
VTypes,
VSerLow,
DOS;
{────────────────────────────────────────────────────────────────────────────}
Const
{---------------}
{ FOSSIL Errors }
{---------------}
ferr_None = 0;
ferr_BadCopy = 1;
{--------------}
{ Miscellanous }
{--------------}
sfct_None = 0;
sfct_RtsCts = 1;
sfct_XonXoff = 2;
Type
TFosStruct = RECORD
StrSiz : WORD; { Size of this structure in bytes }
MajVer : BYTE; { FOSSIL specificiation revision }
MinVer : BYTE; { Revision of this driver }
IDent : POINTER; { Far-pointer to ASCIIZ driver description }
IBufSize : WORD; { Byte size of the receive buffer }
IFree : WORD; { Number of buffered (received) bytes }
OBufSize : WORD; { Byte size of the transmit buffer }
OFree : WORD; { Number of buffered (transmit) bytes }
SWidth : BYTE; { Width of display screen }
SHeight : BYTE; { Height of display screen }
Baud : BYTE; { Baud rate, computer to modem }
End;
{---}
PFosIData = ^TFosIData;
TFosIData = RECORD
ComPort : BYTE; { Communications port }
BaudRate : LONGINT; { Bits per second rate }
Parity : CHAR; { Parity of hardware error checking }
DataBits : BYTE; { Number of data bits }
StopBits : BYTE; { Number of stop bits }
PortStat : WORD; { Condition of UART. LoByte=MSR,HiByte=LSR }
UsingX00 : BOOLEAN; { True if using X00 FOSSIL }
Sig : WORD; { $1954 if FOSSIL installed }
FosStruct : TFosStruct;
END;
{────────────────────────────────────────────────────────────────────────────}
Procedure VFosSetCommParam( ComPort : LONGINT;
BaudRate : WORD;
Parity : CHAR;
DataBits : BYTE;
StopBits : BYTE;
Var PortStat : WORD );
Procedure VFosSendCharW( ComPort : WORD;
Ch : CHAR;
Var PortStat : WORD );
Procedure VFosRecvCharW( ComPort : WORD;
Var Ch : CHAR;
Var PortStat : WORD );
Function VFosGetChar( ComPort : WORD ) : CHAR;
Procedure VFosGetPortStat( ComPort : WORD;
Var PortStat : WORD );
Function VFosChkPortStat( ComPort : WORD;
Bit : BYTE ) : BOOLEAN;
Procedure VFosActivatePort( ComPort : WORD;
Var Sig : WORD;
Var MaxFunc : BYTE;
Var FosRev : BYTE );
Procedure VFosDeActivatePort( ComPort : WORD );
Procedure VFosSetDTR( ComPort : WORD;
OnOff : BOOLEAN );
Procedure VFosGetTimeTickInfo( Var TickNo : BYTE;
Var TickPSec : BYTE;
Var MilPTick : WORD );
Procedure VFosFlushOutBuff( ComPort : WORD );
Procedure VFosPurgeOutBuff( ComPort : WORD );
Procedure VFosPurgeInBuff( ComPort : WORD );
Procedure VFosSendChar( ComPort : WORD;
Ch : CHAR;
Var BuffFull : BOOLEAN );
Procedure VFosPeekAhead( ComPort : WORD;
Var BuffEmpty : BOOLEAN;
Var Ch : CHAR );
Procedure VFosKbRead( Var ScanCode : WORD );
Procedure VFosKbReadW( Var ScanCode : WORD );
Procedure VFosSetFlowControl( ComPort : WORD;
FlowStat : BYTE );
Procedure VFosControlCheck( ComPort : WORD;
CtrlStat : BYTE;
Var CtrlRecv : BOOLEAN );
Procedure VFosSetCurLoc( X : BYTE;
Y : BYTE );
Procedure VFosGetCurLoc( Var X : BYTE;
Var Y : BYTE );
Procedure VFosWriteANSI( Ch : CHAR );
Procedure VFosSetWatchDog( ComPort : WORD;
OnOff : BOOLEAN );
Procedure VFosWriteBIOS( Ch : CHAR );
Procedure VFosReboot( WarmBoot : BOOLEAN );
Procedure VFosRecvBlock( ComPort : WORD;
Buf : POINTER;
Count : LONGINT;
Var Result : LONGINT );
Procedure VFosSendBlock( ComPort : WORD;
Buf : POINTER;
Count : LONGINT;
Var Result : LONGINT );
Procedure VFosSetBreak( ComPort : WORD;
OnOff : BOOLEAN );
Procedure VFosGetInfo( ComPort : WORD;
Buf : POINTER;
Count : WORD;
Var Result : WORD;
Var SigS : ST4 );
Function VFosGetFosStruct( ComPort : WORD;
Var FosStruct : TFosStruct) : LONGINT;
Procedure VX00ActivatePort( ComPort : WORD;
Var Sig : WORD;
Var MaxFunc : BYTE;
Var FosRev : BYTE );
Procedure VX00DeActivatePort( ComPort : WORD );
Procedure VX00SetExtLineCtrl( ComPort : WORD;
Break : BOOLEAN;
ParityB : BYTE;
StopBits : BYTE;
DataBits : BYTE;
BaudRateB : BYTE;
Var PortStat : WORD );
Procedure VX00ExtGetMCR( ComPort : WORD;
Var MCRStat : BYTE;
Var PortStat : WORD );
Procedure VX00ExtSetMCR( ComPort : WORD;
MCRStat : BYTE;
Var PortStat : WORD );
Procedure VX00RecvCh( ComPort : WORD;
Var Result : BOOLEAN;
Var Ch : CHAR );
Procedure VX00StuffInBuff( Ch : CHAR );
{────────────────────────────────────────────────────────────────────────────}
Procedure FosSerDriverProc( SDP : PSerDriverPacket );
{────────────────────────────────────────────────────────────────────────────}