APCIE-3660 API  1719

Typedefs

typedef void(* apcie3660_irqCallback) (PDEVICE_DATA deviceData, uint32_t interruptSource, uint32_t interruptMask, uint32_t *interruptArgs, uint32_t argCount)
 
typedef void(* apcie3660_irqCallback) (uint8_t boardId, uint32_t interruptSource, uint32_t interruptMask, uint32_t *interruptArgs, uint32_t argCount)
 

Functions

int i_APCIE3660_SetBoardIntRoutine (PDEVICE_DATA deviceData, apcie3660_irqCallback irqCallback)
 
int i_APCIE3660_ResetBoardIntRoutine (PDEVICE_DATA deviceData)
 
int i_APCIE3660_SetBoardIntRoutine (uint8_t boardId, apcie3660_irqCallback irqCallback)
 
int i_APCIE3660_ResetBoardIntRoutine (uint8_t boardId)
 

Detailed Description

Typedef Documentation

◆ apcie3660_irqCallback [1/2]

typedef void(* apcie3660_irqCallback)(uint8_t boardId, uint32_t interruptSource, uint32_t interruptMask, uint32_t *interruptArgs, uint32_t argCount)

Prototype of interrupt callback function.

Parameters
[in]deviceDataTarget board PCI device structure
[in]interruptSourceSource of the interrupt
  • bit 0 : Analog input module 0
  • bit 1 : Analog input module 1
  • bit 2 : Analog input module 2
  • bit 3 : Analog input module 3
[in]interruptMaskCause of the interrupt
  • Analog inputs
    • bit 0 -> DMA interrupt : data is available in DMA Buffer
    • bit 1 -> On Board RAM error (overflow)
    • bit 2 -> internal FIFO Overflow error (this buffer is not used in kernel mode)
    • bit 3 -> Compare Interrupt (this interrupt is not dispacthed out of the driver)
    • bit 4 -> Auto stop interrupt (last data are ready then the board stop to send data)
    • bit 5 -> DMA buffer overflow (compareiValue is too high) (cannot happen normally)
    • bit 6 -> on Board Auxiliary fifo error (overflow)
    • bit 7 -> DMA transfer overflow (Compare value is reached before last DMA transfer ended)
    • bit 8 -> Error IRQ raised by module 0 (only suitable when on Board RAM or auxiliary fifo error happen)
    • bit 9 -> Error IRQ raised by module 1 (only suitable when on Board RAM or auxiliary fifo error happen)
    • bit 10 -> Error IRQ raised by module 2 (only suitable when on Board RAM or auxiliary fifo error happen)
    • bit 11 -> Error IRQ raised by module 3 (only suitable when on Board RAM or auxiliary fifo error happen)
[in]interruptArgsValues read during the interrupt. If it is an interrupt error, this value should not be read
  • interruptArgs[0] -> Size in bytes of data sent by the board
  • interruptArgs[1] -> number of buffer containing the data
  • interruptArgs[2] -> Address of the DMA buffer 1
  • interruptArgs[3] -> Address of the DMA buffer 2
  • ...
  • interruptArgs[n+1] -> Address of the DMA buffer n
[in]argCountIs equal to 1 if data is available

Installs an interrupt callback function.

Parameters
[in]boardIdTarget board index
[in]interruptSourceSource of the interrupt
  • bit 0 : Analog output 0
  • bit 1 : Analog output 1
  • bit 2 : Analog input module 0
  • bit 3 : Analog input module 1
  • bit 4 : Analog input module 2
  • bit 5 : Analog input module 3
  • bit 6 : Chronometer 0
  • bit 7 : Chronometer 1
  • bit 8 : Chronometer 2
  • bit 9 : Chronometer 3
[in]interruptMaskCause of the interrupt
  • Analog inputs
    • bit 0 -> DMA interrupt
    • bit 1 -> Internal FIFO error
    • bit 2 -> SDRAM Overflow error
    • bit 3 -> Not used
    • bit 4 -> Auto stop interrupt
[in]interruptArgsValues read during the interrupt. If DMA interrupt, this pointer will be set to NULL.
[in]argCountNumber of values read during the interrupt

◆ apcie3660_irqCallback [2/2]

typedef void(* apcie3660_irqCallback) (uint8_t boardId, uint32_t interruptSource, uint32_t interruptMask, uint32_t *interruptArgs, uint32_t argCount)

Prototype of interrupt callback function.

Parameters
[in]boardIdTarget board index
[in]interruptSourceSource of the interrupt
  • bit 0 : Analog input module 0
  • bit 1 : Analog input module 1
  • bit 2 : Analog input module 2
  • bit 3 : Analog input module 3
[in]interruptMaskCause of the interrupt
  • Analog inputs
    • bit 0 -> DMA interrupt : data is available in DMA Buffer
    • bit 1 -> On Board RAM error (overflow)
    • bit 2 -> internal FIFO Overflow error
    • bit 3 -> Compare Interrupt (this interrupt is not dispacthed out of the driver)
    • bit 4 -> Auto stop interrupt (last data are ready then the board stop to send data)
    • bit 5 -> DMA buffer overflow (compare value is too high) (cannot happen normally)
    • bit 6 -> on Board Auxiliary fifo error (overflow)
    • bit 7 -> DMA transfer overflow (Compare value is reached before last DMA transfer ended)
    • bit 8 -> Error IRQ raised by module 0 (only suitable when on Board RAM or auxiliary fifo error happen)
    • bit 9 -> Error IRQ raised by module 1 (only suitable when on Board RAM or auxiliary fifo error happen)
    • bit 10 -> Error IRQ raised by module 2 (only suitable when on Board RAM or auxiliary fifo error happen)
    • bit 11 -> Error IRQ raised by module 3 (only suitable when on Board RAM or auxiliary fifo error happen)
[in]interruptArgsPointer to buffer containing the data. If it is an interrupt error, this params should not be used.
[in]argCountNumber of values read during the interrupt. If it is an interrupt Error this element is equal to 0.

Installs an interrupt callback function.

Parameters
[in]boardIdTarget board index
[in]interruptSourceSource of the interrupt
  • bit 0 : Analog output 0
  • bit 1 : Analog output 1
  • bit 2 : Analog input module 0
  • bit 3 : Analog input module 1
  • bit 4 : Analog input module 2
  • bit 5 : Analog input module 3
  • bit 6 : Chronometer 0
  • bit 7 : Chronometer 1
  • bit 8 : Chronometer 2
  • bit 9 : Chronometer 3
[in]interruptMaskCause of the interrupt
  • Analog inputs
    • bit 0 -> DMA interrupt
    • bit 1 -> Internal FIFO error
    • bit 2 -> SDRAM Overflow error
    • bit 3 -> Not used
    • bit 4 -> Auto stop interrupt
[in]interruptArgsValues read during the interrupt. If DMA interrupt, this pointer will be set to NULL.
[in]argCountNumber of values read during the interrupt

Function Documentation

◆ i_APCIE3660_SetBoardIntRoutine() [1/2]

int i_APCIE3660_SetBoardIntRoutine ( PDEVICE_DATA  deviceData,
apcie3660_irqCallback  irqCallback 
)

Installs an interrupt callback function.

This function will be called each time the board generates an interrupt.

Parameters
[in]deviceDataTarget board PCI device structure
[in]irqCallbackAddress of the callback function
Return values
0No error

◆ i_APCIE3660_ResetBoardIntRoutine() [1/2]

int i_APCIE3660_ResetBoardIntRoutine ( PDEVICE_DATA  deviceData)

Uninstalls the interrupt callback function.

Parameters
[in]deviceDataTarget board PCI device structure
Return values
0No error
1No interrupt callback function was installed

◆ i_APCIE3660_SetBoardIntRoutine() [2/2]

int i_APCIE3660_SetBoardIntRoutine ( uint8_t  boardId,
apcie3660_irqCallback  irqCallback 
)

Installs an interrupt callback function.

This function will be called each time the board generates an interrupt.

Parameters
[in]boardIdTarget board index
[in]irqCallbackAddress of the callback function
Return values
0No Error
-1The boardId is wrong
-2The irqCallback is equal to NULL
-3An interrupt routine is already installed. Remove it with ResetBoardIntRoutine and retry
-4Error occured while creating interrupt event
-14An error occurred while calling the IOCTL function

◆ i_APCIE3660_ResetBoardIntRoutine() [2/2]

int i_APCIE3660_ResetBoardIntRoutine ( uint8_t  boardId)

Uninstalls the interrupt callback function.

Parameters
[in]boardIdTarget board index
Return values
0No error
-1The boardId is wrong
-2No interrupt callback function was installed
-14An error occurred while calling the IOCTL function