8144_wait_multiple_gpio_interrupt – ADLINK PCI-8144 User Manual

Page 148

Advertising
background image

138

Function Library

_8144_wait_multiple_gpio_interrupt

Wait multiple digital input interrupts

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 multiple specifid interrupts.
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. Either any one or all of the specified GPIO interrupts are

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_multiple_gpio_interrupt( I16

CardId, I32 GpioIntFactorInBits, I16

WaitOption, I32 TimeOutMs, I32

*GpioIntTriggeredInBits )

B_8144_wait_multiple_gpio_interrupt( ByVal CardId

As Integer, ByVal GpioIntFactorInBits As

Long, ByVal WaitOption As Integer, ByVal

TimeOutMs As Long, GpioIntTriggeredInBits 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”.

I32 GpioIntFactorInBits

:

I16 WaitOption

: Specifies the wait option. If WaitOption = 1,

the function returns when the state all interrupt factors you
specified in GpioIntFactorInBits is signaled. If WaitOption = 0,

Advertising