xPCIe-3121 API
xPCIe-3121 general functions

Functions

_INT_ i_PCIe3121_GetNumberOfBoards (PBYTE pb_NbrOfBoards)
 
_INT_ i_PCIe3121_GetBoardInformation (BYTE b_BoardIndex, DWORD dw_IdentifierStringSize, PCHAR pc_Identifier, PDWORD pdw_UINumber, PDWORD pdw_DeviceNumber, PDWORD pdw_BusNumber, PDWORD pdw_BaseAddress0, PDWORD pdw_BaseAddress1, PDWORD pdw_BaseAddress2, PDWORD pdw_BaseAddress3, PBYTE pb_Interrupt)
 
_INT_ i_PCIe3121_GetBoardRevision (BYTE b_BoardIndex, PDWORD pdw_BoardRevision)
 
_INT_ i_PCIe3121_OpenBoardViaIndex (BYTE b_BoardIndex, PHANDLE ph_DeviceHandle)
 
_INT_ i_PCIe3121_OpenBoardViaIdentifier (PCHAR pc_Identifier, PHANDLE ph_DeviceHandle)
 
_INT_ i_PCIe3121_CloseBoard (HANDLE h_DeviceHandle)
 
_INT_ i_PCIe3121_GetDLLVersion (PDWORD pdw_Version)
 
_INT_ i_PCIe3121_GetDeviceDriverVersion (HANDLE h_DeviceHandle, PDWORD pdw_Version)
 

Detailed Description

Function Documentation

◆ i_PCIe3121_GetNumberOfBoards()

_INT_ i_PCIe3121_GetNumberOfBoards ( PBYTE  pb_NbrOfBoards)

Enables to get the number of xPCIe-3121 boards present in the system.
The function fill the value pointed by pb_NbrOfBoards with the number of boards present.

Parameters
[out]pb_NbrOfBoardsValue that will be filled with the number of boards
Returns
0 : No error
-1 : Error while getting the number of boards

◆ i_PCIe3121_GetBoardInformation()

_INT_ i_PCIe3121_GetBoardInformation ( BYTE  b_BoardIndex,
DWORD  dw_IdentifierStringSize,
PCHAR  pc_Identifier,
PDWORD  pdw_UINumber,
PDWORD  pdw_DeviceNumber,
PDWORD  pdw_BusNumber,
PDWORD  pdw_BaseAddress0,
PDWORD  pdw_BaseAddress1,
PDWORD  pdw_BaseAddress2,
PDWORD  pdw_BaseAddress3,
PBYTE  pb_Interrupt 
)

Get device information of the board.

Parameters
[in]b_BoardIndex: Index of the board
[in]dw_IdentifierStringSize: size of the identifier parameter
[out]pc_IdentifierIdentifier of the board
[out]pdw_UINumber: This number is typically a user-perceived slot number, such as a number printed next to the slot on the board, or some other number that makes locating the physical device easier for the user. If the device is on a bus that has no UI number convention, or if the bus driver for the device cannot determine the UI number, this value is 0xFFFFFFFF.
[out]pdw_DeviceNumber: Device number.
[out]pdw_BusNumber: Bus number.
[out]pdw_BaseAddress0: Base address 0 of the board
[out]pdw_BaseAddress1: Base address 1 of the board
[out]pdw_BaseAddress2: Base address 2 of the board
[out]pdw_BaseAddress3: Base address 3 of the board
[out]pb_Interrupt: Interrupt line of the board
Returns
0 : No error
-1 : Unable to open the board via index
-2 : Error when calling driver's IOCTL

◆ i_PCIe3121_GetBoardRevision()

_INT_ i_PCIe3121_GetBoardRevision ( BYTE  b_BoardIndex,
PDWORD  pdw_BoardRevision 
)

Get revision of the board.

Parameters
[in]b_BoardIndex: Index of the board
[out]pdw_BoardRevisionRevision number of the board
Returns
0 : No error
-1 : Unable to open the board via index
-2 : Error when calling driver's IOCTL

◆ i_PCIe3121_OpenBoardViaIndex()

_INT_ i_PCIe3121_OpenBoardViaIndex ( BYTE  b_BoardIndex,
PHANDLE  ph_DeviceHandle 
)

Open the board with the index : b_BoardIndex. A handle is returned to the

user which allows to use the driver functions.

Parameters
[in]b_BoardIndex: Index of the board to open
[out]ph_DeviceHandle: Handle of the selected xPCIe-3121 board for using the functions
Returns
0 : No error -1 : Unable to get the number of available boards

-2 : Wrong device index parameter. The parameter is too high
-3 : Error while getting the device's class
-4 : Error while getting informations about the device
-5 : Memory allocation error
-6 : Get device interface detail error
-7 : Error while creating communication handle
-8 : Error in the initialization callback function

◆ i_PCIe3121_OpenBoardViaIdentifier()

_INT_ i_PCIe3121_OpenBoardViaIdentifier ( PCHAR  pc_Identifier,
PHANDLE  ph_DeviceHandle 
)

Open the board with the indentifier : pc_Identifier. A handle is returned to the

user which allows to use the following functions.

Parameters
[in]pc_Identifier: Identifier of the board to open
[out]ph_DeviceHandle: Handle of the board xPCIe-3121 for using the functions
Returns
0 : No Error
-1 : Unable to get the number of available boards

-2 : Unable to get the board identifier
-3 : Unable to open the board
-4 : Identifier not found

◆ i_PCIe3121_CloseBoard()

_INT_ i_PCIe3121_CloseBoard ( HANDLE  h_DeviceHandle)

Release the handle of the board. Block the access to the board.

Parameters
[in]h_DeviceHandle: Handle of the board
Returns
0 : No Error
-1 : The device handle parameter is wrong

◆ i_PCIe3121_GetDLLVersion()

_INT_ i_PCIe3121_GetDLLVersion ( PDWORD  pdw_Version)

Return the version of the DLL.

Parameters
[out]pdw_Version: Version. sample : 0x01010910 -> version 1.01 september 2010
Returns
0 : No Error

◆ i_PCIe3121_GetDeviceDriverVersion()

_INT_ i_PCIe3121_GetDeviceDriverVersion ( HANDLE  h_DeviceHandle,
PDWORD  pdw_Version 
)

Return the version of the device driver.

Parameters
[in]h_DeviceHandle: Handle of the board
[out]pdw_Version: Version. sample : 0x01011211 -> version 1.01 - 12/2011
Returns
0 : No Error

-1 : Error while calling IOCTL function