Home    Prev Next    
Contents
Programming For Parallel Port Device
Overview
Programmers Guide
Scenario
I/O Ports control
Single read/write operations
Data array read/write operations
Hardware interrupts handling at user level
Common Issues
LPT Support Routines
Common Procedures
OpenRapidLpt
IsRapidLptOpened
CloseRapidLpt
OpenPort
ClosePort
GetNumLPTs
GetPortNumber
GetReadMode
SetReadMode
LPT specific functions
Parallel port info
GetBasePortAddress
GetBaseSpan
GetEcpAddress
GetEcpSpan
GetInterruptVector
GetInterruptLevel
GetInterruptAffinity
GetInterruptMode
Parallel port registers
GetDataPort
SetDataPort
GetStatusPort
SetStatusPort
GetControlPort
SetControlPort
GetEcrPort
SetEcrPort
GetEPPAddressPort
SetEPPAddressPort
GetEPPDataPort
SetEPPDataPort
Centronix signals
GetLptBusy
GetLptPaperEnd
GetLptSlct
GetLptAutofd
SetLptAutofd
GetLptError
LptInit
LptSelectIn
GetPrinterReady
Parallel port modes
GetCurrentLptMode
SetCurrentLptMode
GetIsPresent
GetIsPS2Present
GetIsEcpPresent
Work with pins
GetPin
SetPin
Work with bits
GetDataPortBit
SetDataPortBit
GetStatusPortBit
SetStatusPortBit
GetControlPortBit
SetControlPortBit
GetCfgaPortBit
SetCfgaPortBit
GetCfgbPortBit
SetCfgbPortBit
GetEcrPortBit
SetEcrPortBit
Direct Port I/O
GetPortByte
GetPortWord
GetPortLong
SetPortByte
SetPortWord
SetPortLong
ReadPortBuffer
WritePortBuffer
Hardware Interrupts
UnmaskLptIrq
MaskLptIrq
GetInterruptCounter
GetPin
Go to RapidDriver Main Page

Returns an electrical level from the select pin of curren LPT's D25 connector.  

Language

Description

C/C++
UCHAR GetPin ( HANDLE hLpt , UCHAR nPin );
Delphi
function GetPin ( hLpt : THANDLE, nPin: Byte ) : Byte ; stdcall
VB
Function GetPin ( ByVal hLpt As Long , ByVal nPin As Byte ) As Byte


Parameters:
hLpt - the handle returned by a successful call to OpenRapidLpt
nPin - requested pin number (1..25)

Return Value :
Zero if an electrical level is low, non-zero otherwise.

Comments:
The current LPT must be in read mode:
   SetReadMode(1)