8144_wait_single_gpio_interrupt – ADLINK PCI-8144 User Manual

Page 146

Advertising
background image

136

Function Library

_8144_wait_single_gpio_interrupt

Wait a single digital input interrupt

Description:

When the user enabled the Interrupt function and set the inter-
rupt factors by _8144_set_gpio_int_factor(). The user
could use this function to wait a specific interrupt. When this
function was running, the process would never stop until evens
were triggered or the function was time out. This function
returns when one of the following occurs:

1. The specified GPIO interrupt factor is in the signaled

state.

2. The TimeOutMs interval elapses.

This function checks the current state of the GPIO interrupt. If
the state is nonsignaled, the calling thread enters the wait
state. It uses no processor time while waiting for the INT state
to become signaled or the time-out interval to elapse.

Syntax:

I16 _8144_wait_single_gpio_interrupt( I16 CardId,

I16 GpioIntFactorBitNum, I32 TimeOutMs )

B_8144_wait_single_gpio_interrupt(ByVal CardId As

Integer, ByVal GpioIntFactorBitNum As

Integer, ByVal TimeOutMs As Long ) As

Integer

Parameters:

I16 CardId

: Specify the index of target PCI-8144 card. The

card_id could be decided by DIP switch (SW1) or depend on
slot sequence.Please refer to “_8144_initial”.

I16 GpioIntFactorBitNum

: Specifies the bit number of the

INT factor

Z

Eg. GpioIntFactorBitNum = 10, wait DI_2 rising edge INT
factor

I32 TimeOutMs

: Specifies the time-out interval, in millisec-

onds.

Advertising