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
UnmaskLptIrq
Go to RapidDriver Main Page

Installs a hardware interrupt handler for the LPT device and unmasks the Irq at hardware level. UnmaskLptIrq allows to handle the
"edge triggered" interrupts.

Language

Description

C/C++
void UnmaskLptIrq ( HANDLE hLpt, TOnHwInterruptHandler InterruptHandler )
Delphi
procedure UnmaskLptIrq ( hLpt: THandle; InterruptHandler TOnHwInterruptHandler ); stdcall;
VB
Sub UnmaskLptIrq ( ByVal hlpt As Long, ByVal HWHandler As Long)


Parameters:

hLpt - the handle returned by a successful call to OpenRapidLpt ;
InterruptHandler - address of the callback procedure that handles hardware interrupts for this Irq (use AddressOf specification in VB)

Return Value : None.

Comments:

1. The interrupt handler function must be declared as:

typedef
void (__stdcall * TOnHwInterruptHandler)(ULONG TimeStampLowPart, ULONG TimeStampHighPart);

2. This function helps to handle "edge triggered" interrupts.


See also: MaskLptIrq GetInterruptCounter