| Class TlptCtrl (unit LptCtrl) |
TComponent
| Constructors |
constructor Create(AOwner: TComponent);constructor
| Functions |
destructor Destroy;
procedure FindLptAddr;
function GetCtrl: byte;
function GetStatus: byte;
procedure SetCtrl(Value: byte);
procedure SetData(Value: byte);
procedure SetLptPort(Value: Tlpt);Yes, I know, this could have been coded as a loop.
procedure SetPortAddress(Value: word);| Properties |
property Ctrl : byte
property Data : byte
property LptPort : TLpt
property PortAdress : word
property Status : byte
property LptAvail : TLptAvail| Events |
| Variables |
FData : byte;
FDummy : byte;
FLpt : TLpt;
FLptAvail : TLptAvail;
FPortAddr : word;
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 : TLptPublished 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;