xPCI-1710 API
xPCI-1710 general functions

Functions

_INT_ i_PCI1710_GetModuleConfiguration (HANDLE h_DeviceHandle, BYTE b_ModuleNbr, PDWORD pdw_ModuleConfiguration)
 
_INT_ i_PCI1710_ConfigureAllModule (HANDLE h_DeviceHandle, PCHAR_ pc_FileName1, PCHAR_ pc_FileName2, PCHAR_ pc_FileName3, PCHAR_ pc_FileName4, PDWORD pdw_WriteAddressError)
 
_INT_ i_PCI1710_GetNumberOfBoards (PBYTE pb_NbrOfBoards)
 
_INT_ i_PCI1710_GetBoardInformation (BYTE b_BoardIndex, PCHAR pc_Identifier, DWORD dw_IdentifierStringSize, PDWORD pdw_UINumber, PDWORD pdw_DeviceNumber, PDWORD pdw_BusNumber, PDWORD pdw_BaseAddress0, PDWORD pdw_BaseAddress1, PBYTE pb_Interrupt)
 
_INT_ i_PCI1710_OpenBoardViaIndex (BYTE b_BoardIndex, PHANDLE ph_DeviceHandle)
 
_INT_ i_PCI1710_OpenBoardViaIdentifier (PCHAR pc_Identifier, PHANDLE ph_DeviceHandle)
 
_INT_ i_PCI1710_CloseBoard (HANDLE h_DeviceHandle)
 
_INT_ i_PCI1710_GetBoardHardwareType (HANDLE b_DeviceHandle, PBYTE_ pb_HardwareType)
 

Detailed Description

Function Documentation

_INT_ i_PCI1710_GetModuleConfiguration ( HANDLE  h_DeviceHandle,
BYTE  b_ModuleNbr,
PDWORD  pdw_ModuleConfiguration 
)

Get the configuration of the module

Parameters
[in]h_DeviceHandleHandle of the board
[in]b_ModuleNbrModule selection
[out]pdw_ModuleConfigurationContains the 4 ASCII codes of the configuration
  • bits 0 -> 7 ASCII code (version low)
  • bits 8 -> 15 ASCII code (version high)
  • bits 16 -> 23 ASCII code (functionality second digit)
  • bits 24 -> 31 ASCII code (functionality first digit)
Return values
0: No error
-1: The device handle parameter is wrong
-2: Wrong module selection
-100: IOCTL failed
_INT_ i_PCI1710_ConfigureAllModule ( HANDLE  h_DeviceHandle,
PCHAR_  pc_FileName1,
PCHAR_  pc_FileName2,
PCHAR_  pc_FileName3,
PCHAR_  pc_FileName4,
PDWORD  pdw_WriteAddressError 
)

Configure the four module of the PCI-1710 board.
The available files are :

  • 82X54.CFG
  • CHRONOS.CFG
  • DGI_IO.CFG
  • ETM.CFG
  • IMP_CPT.CFG
  • INC_CPT.CFG
  • PWM.CFG
  • SSI.CFG
  • SSI_MON.CFG
  • TOR.CFG
  • TTL_IO.CFG
Parameters
[in]h_DeviceHandleHandle of the board
[in]pc_FileName1Name of the configuration file for function module 1
[in]pc_FileName2Name of the configuration file for function module 2
[in]pc_FileName3Name of the configuration file for function module 3
[in]pc_FileName4Name of the configuration file for function module 4
[out]pdw_WriteAddressErrorIf an error occurs, return the address of the read/write register
Returns
> 0 : Warning
0 : No Error
-1 : The device handle parameter is wrong
-2 : Error while loading the file
-3 : Error while decoding Altera file
-4 : Error while erasing flash
-5 : Program flash error
-6 : Error while reading the flash
-7 : Comparison between reading and writing of the flash is not correct
-8 : Error while loading Flex component
-9 : Wrong loading of the flex component
-10 : Error while updating the configuration
_INT_ i_PCI1710_GetNumberOfBoards ( PBYTE  pb_NbrOfBoards)

Return the number of xPCI-1710 board found (pb_NbrOfBoard)

Parameters
[out]pb_NbrOfBoardsReturn the number of board found
Returns
> 0 : Warning
0 : No Error
_INT_ i_PCI1710_GetBoardInformation ( BYTE  b_BoardIndex,
PCHAR  pc_Identifier,
DWORD  dw_IdentifierStringSize,
PDWORD  pdw_UINumber,
PDWORD  pdw_DeviceNumber,
PDWORD  pdw_BusNumber,
PDWORD  pdw_BaseAddress0,
PDWORD  pdw_BaseAddress1,
PBYTE  pb_Interrupt 
)

Get device information of the board.

Parameters
[in]b_BoardIndexIndex of the board
[in]dw_IdentifierStringSizesize of the identifier parameter
[out]pc_IdentifierIdentifier of the board
[out]pdw_UINumberThis 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_DeviceNumberDevice number.
[out]pdw_BusNumberBus number.
[out]pdw_BaseAddress0Base address 0 of the board
[out]pdw_BaseAddress1Base address 1 of the board
[out]pb_InterruptInterrupt number of the board
Returns
> 0 : Warning
0 : No Error
-1 : No device available
-2 : Wrong device index parameter
-3 : Get the classe device information error
-4 : Enum Interface error
-5 : Memory allocation error
-6 : Get device interface detail error
-7 : Open the device error
-8 : Get device information error
_INT_ i_PCI1710_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_BoardIndexIndex of the board to open
[out]ph_DeviceHandleHandle of the selected xPCI-1710 board for using the functions
Returns
> 0 : Warning
0 : No Error
-1 : Not available board index
-2 : Board not present
-3 : No handle is available for the board
_INT_ i_PCI1710_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.
Handles allow to operate several boards.

Parameters
[in]pc_IdentifierIdentifier of the board to open
[out]ph_DeviceHandleHandle of the board xPCI-1710 for using the functions
Returns
> 0 : Warning
0 : No Error
-1 : No device available
-2 : Wrong identifier parameter
-3 : Device already opened
-4 : Wrong GUID Class code
-5 : Instance does not exist
-6 : Memory allocation error
-7 : Symbolic link name error
-8 : Create file error
-9 : Get identifier error
-10 : no device found with this identifier
_INT_ i_PCI1710_CloseBoard ( HANDLE  h_DeviceHandle)

Releases the handle of the board. Blocks the access to the board.

Parameters
[in]h_DeviceHandleHandle of the board
Returns
> 0 : Warning
0 : No Error
-1 : The device handle parameter is wrong
_INT_ i_PCI1710_GetBoardHardwareType ( HANDLE  b_DeviceHandle,
PBYTE_  pb_HardwareType 
)

Return the type of the hardware of the PCI-1710

Parameters
[in]b_DeviceHandleHandle of the board
[out]pb_HardwareTypeType of the hardware (0 -> 10K10, 1 -> 10K20)
The hardware type is necessessary to be known, for the user to configure the modules. There is two subdirectories containing the config files. The path given to the function must be the good one, or the card could be destroyed.
Returns
> 0 : Warning
0 : No Error
-1 : The device handle parameter is wrong