Install an interrupt callback function.
The interrupt callback is called after each hardware interrupt, and can access and process the data read during the interrupt The value of b_InterruptMask will enable you to determine the source of the interruption:
-
0x1: End of sequence when calling i_PCI3001_Read1AnalogInput or i_PCI3001_ReadMoreAnalogInputs. Value are available thanks to pw_Args.
-
0x4: Internal FIFO overflow. If your computer is too slow to handle all the data, after a while you will have an internal data fifo overflow (dw_InterruptMask will be 0x4). You can change the size of the internal data fifo in the driver's configuration pages.
-
0x8: DMA interrupt. You will receive this interrupt when using i_PCI3001_InitAndStartAnalogInputSequence. When you get this interrupt, you have to read the data measured by the board by calling the function i_PCI3001_ReadSequenceData (see its own documentation).
-
0x10: Timer interrupt.
- Parameters
-
[in] | h_DeviceHandle | Handle of the board |
[in] | v_FunctionName | Address of the callback function
- h_DeviceHandle : Handle of the board
- b_FIFOOverflow : Indicates the status of the kernel interrupt FIFO (0 : no overflow, 1 : overflow, loss of data)
- b_InterruptMask : Indicates the event that generated this interrupt
- pw_Args : Values read during the interrupt
- dw_ArgsCount : Number of values read during the interrupt
|
- Returns
- 0 : No Error -1 : The device handle parameter is wrong
-2 : An interrupt routine was still isntalled. Remove it with i_PCI3001_ResetBoardIntRoutine and retry
-3 : Error while creating kill event
-4 : Error while creating interrupt event
-5 : Error while creating interrupt thread
-6 : Error while changing the priority class of the thread
-7 : Error while changing the priority of the thread
-8 : Error while calling the IOCTL command
-9 : Error in the interrupt callback function