8144_set_gpio_interrupt_factor – ADLINK PCI-8144 User Manual
Page 144
134
Function Library
_8144_set_gpio_interrupt_factor
Set factors of digital input interrupt
Description:
This function allows users to select GPIO related factors to ini-
tiate the event int. Once the Interrupt function is enabled, you
can use _8144_wait_single_gpio_interrupt or
_8144_wait_multiple_gpio_interrupt
to wait event. To
disable the GPIO interrupt function set the GPIO interrupt fac-
tor to 0.
Syntax:
I16 _8144_set_gpio_interrupt_factor( I16 CardId,
I32 GpioIntFactorInBit )
B_8144_set_gpio_interrupt_factor( ByVal CardId As
Integer, ByVal GpioIntFactorInBit As Long
)As Integer
Parameters:
I16 CardId
: The card ID number.
I32 GpioIntFactorInBit
: The GPIO interrupt factor in bit
format
Z
Bit0 - bit7 : DI0 - DI7 Falling edge
Z
Bit8 - bit15: DI0 - DI7 Rising edge
Return Values:
ERR_ParametersInvalid
ERR_DeviceNotInitial
ERR_NoError
Example:
I32 factorInBits = 0x01; //Wait DI Ch0 falling
edge
ret = _8144_set_gpio_interrupt_factor( CardId,
factorInBits );
// wait single GPIO interrupt…
I32 TimeOutMs = 10000; //10 sec timeout