APCI-/CPCI-1500 Technical
description Chapter 9
62
ASYNCHRONOUS-MODE
The user can debug the user interrupt routine provided he has not
programmed in Visual Basic 5
ADVANTAGE
The user routine can call Windows API functions.
The user routine can call functions which give access to global variables.
The user routine can call all xPCI-1500 driver functions with the following
extension: "i_APCI1500_XXXX"
RESTRICTION
The code of the user interrupt routine is called by driver interrupt thread
routine (ring 3). The time between interrupt and the user interrupt routine is
increased.
Shared memory
If you have selected the APCI1500_SYNCHRONOUS_MODE you cannot have
access to global variables. But you have the possibility to create a shared
memory (
ppv_UserSharedMemory
). The user shared memory can have all
predefined compiler types or user define types.
The variable ul_UserSharedMemorySize indicates the size in bytes of the
selected user type. A pointer of the variable
ppv_UserSharedMemory
is given to
the user interrupt routine with the variable
pv_UserSharedMemory .
This is not
possible for Visual Basic.
The user interrupt routine must have the following syntax:
VOID
v_FunctionName
(BYTE
b_BoardHandle
,
BYTE
b_InterruptMask
,
BYTE
b_InputChannelNbr,
BYTE
b_UserCallingMode
,
VOID *
pv_UserSharedMemory
)
v_FunctionName
Name of the user interrupt routine
b_BoardHandle
Handle of the
xPCI-1500
which has generated the
interrupt
b_InterruptMask
Mask of the events which have generated the
interrupt.
b_InputChannelNbr
If an interrupt is generated with a Mask 0000 000
1
and if
you use the OR-PRIORITY logic, this variable gives the
input number, which has generated the interrupt.
b_UserCallingMode
APCI1500_SYNCHRONOUS_MODE:
The user routine is directly called by
the
driver
interrupt
routine.
APCI1500_ASYNCHRONOUS_MODE:
The user routine is called by driver
the interrupt thread
pv_UserSharedMemory
Pointer of the user shared memory.