Class TlptCtrl (unit LptCtrl)

Inherits from

TComponent

Constructors


constructor Create(AOwner: TComponent);

Public declarations

constructor



Functions

destructor Destroy;

destructor - just as a placeholder if cleanup will be necessary

procedure FindLptAddr;

FindLptAddr - Will find the addresses of LPT port (1-3).

function GetCtrl: byte;

read data from LPT status lines

function GetStatus: byte;

put data on LPT data lines

procedure SetCtrl(Value: byte);

to read what was put on the Ctrl lines

procedure SetData(Value: byte);

for those who hate automation : )

procedure SetLptPort(Value: Tlpt);

will only be used to make 'Status' published

Yes, I know, this could have been coded as a loop.


procedure SetPortAddress(Value: word);

SetPortAddress will usually be automatically handled through SetLptPort.

Properties

property Ctrl : byte


property Data : byte


property LptPort : TLpt

Published declarations

property PortAdress : word


property Status : byte


property LptAvail : TLptAvail


Events

Variables

FData : byte;


FDummy : byte;

LPT data out

FLpt : TLpt;

Private declarations

FLptAvail : TLptAvail;

selected LPT port address

FPortAddr : word;

LPT port addresses

FPortAddrArr : TPortAddrArr;



Constructors


constructor Create(AOwner: TComponent);

Public declarations

constructor


Functions


destructor Destroy;

destructor - just as a placeholder if cleanup will be necessary


procedure FindLptAddr;

FindLptAddr - Will find the addresses of LPT port (1-3). Non valid ports will result in address 0. Note FLptPortAddr[] and FLptAvail will be affected.


function GetCtrl: byte;

read data from LPT status lines


function GetStatus: byte;

put data on LPT data lines


procedure SetCtrl(Value: byte);

to read what was put on the Ctrl lines


procedure SetData(Value: byte);

for those who hate automation : )


procedure SetLptPort(Value: Tlpt);

will only be used to make 'Status' published

Yes, I know, this could have been coded as a loop...


procedure SetPortAddress(Value: word);

SetPortAddress will usually be automatically handled through SetLptPort.

To set up the choosen port


Properties


property Ctrl : byte


property Data : byte


property LptPort : TLpt

Published declarations


property PortAdress : word


property Status : byte


property LptAvail : TLptAvail


Events


Variables


FData : byte;


FDummy : byte;

LPT data out


FLpt : TLpt;

Private declarations


FLptAvail : TLptAvail;

selected LPT port address


FPortAddr : word;

LPT port addresses


FPortAddrArr : TPortAddrArr;