ADLINK PCI-8144 User Manual

Page 147

Advertising
background image

Function Library

137

If TimeOut_ms is zero, the function tests the states of the spec-
ified objects and returns immediately. If TimeOut_ms is -1, the
function's time-out interval never elapses (infinate).

Return Values:

ERR_ParametersInvalid

ERR_DeviceNotInitial

ERR_ParametersInvalid

ERR_InterruptNotEnable

ERR_TimeOut

ERR_Win32Error

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

I16 GpioIntFactorBitNum = 0; //wait INT factor

bit number 0

ret = _8144_wait_single_gpio_interrupt( CardId,

GpioIntFactorBitNum, TimeOutMs );

if( ret == ERR_NoError ){

// Interrupt be triggered

}else{

//Timeout or wait failed

}

_8144_set_gpio_interrupt_factor( gCardId, 0 ); //

Disable GPIO interrupt

See also:

_8144_wait_multiple_gpio_interrupt

_8144_set_gpio_interrupt_factor

Advertising