xPCIe-1016 API
|
Functions | |
_INT_ | i_PCIe1016_GetNumberOfBoards (OUT BYTE *pb_NbrOfBoards) |
_INT_ | i_PCIe1016_GetBoardInformation (IN BYTE b_BoardIndex, IN DWORD dw_IdentifierStringSize, OUT CHAR *pc_Identifier, OUT DWORD *pdw_UINumber, OUT DWORD *pdw_DeviceNumber, OUT DWORD *pdw_BusNumber, OUT DWORD *pdw_BaseAddress0, OUT DWORD *pdw_BaseAddress1, OUT DWORD *pdw_BaseAddress2, OUT DWORD *pdw_BaseAddress3, OUT BYTE *pb_Interrupt) |
_INT_ | i_PCIe1016_OpenBoardViaIndex (IN BYTE b_BoardIndex, OUT HANDLE *ph_DeviceHandle) |
_INT_ | i_PCIe1016_OpenBoardViaIdentifier (IN CHAR pc_Identifier[], OUT HANDLE *ph_DeviceHandle) |
_INT_ | i_PCIe1016_CloseBoard (HANDLE h_DeviceHandle) |
_INT_ | i_PCIe1016_GetDLLVersion (OUT DWORD *pdw_Version) |
_INT_ | i_PCIe1016_GetDeviceDriverVersion (IN HANDLE h_DeviceHandle, OUT DWORD *pdw_Version) |
const _PCHAR_ | pc_PCIe1016_GetLastError (IN HANDLE h_DeviceHandle) |
_INT_ | i_PCIe1016_SetBoardIntRoutine (IN HANDLE h_DeviceHandle, IN void(*v_FunctionName)(INHANDLE h_DeviceHandle, INBYTEb_FifoOverflow, INDWORDdw_InterruptSource, INDWORDdw_InterruptMask, OUT WORD *pw_Args, INDWORDdw_ArgsCount)) |
_INT_ | i_PCIe1016_ResetBoardIntRoutine (IN HANDLE h_DeviceHandle) |
_INT_ i_PCIe1016_GetNumberOfBoards | ( | OUT BYTE * | pb_NbrOfBoards | ) |
Returns the number of xPCIe1016 boards present in the system.
The function fills the value pointed by pb_NbrOfBoards with the number of boards present.
[out] | pb_NbrOfBoards | Value that will be filled with the number of boards |
0 | No error |
-1 | Error while getting the number of boards |
_INT_ i_PCIe1016_GetBoardInformation | ( | IN BYTE | b_BoardIndex, |
IN DWORD | dw_IdentifierStringSize, | ||
OUT CHAR * | pc_Identifier, | ||
OUT DWORD * | pdw_UINumber, | ||
OUT DWORD * | pdw_DeviceNumber, | ||
OUT DWORD * | pdw_BusNumber, | ||
OUT DWORD * | pdw_BaseAddress0, | ||
OUT DWORD * | pdw_BaseAddress1, | ||
OUT DWORD * | pdw_BaseAddress2, | ||
OUT DWORD * | pdw_BaseAddress3, | ||
OUT BYTE * | pb_Interrupt | ||
) |
Gets generic device information.
[in] | b_BoardIndex | Index of the board |
[in] | dw_IdentifierStringSize | Size of the identifier parameter buffer |
[out] | pc_Identifier | Identifier 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 |
0 | No error |
-1 | Unable to open the board via index |
-2 | Error when calling driver's IOCTL |
_INT_ i_PCIe1016_OpenBoardViaIndex | ( | IN BYTE | b_BoardIndex, |
OUT HANDLE * | ph_DeviceHandle | ||
) |
Opens the board with the specified index. A handle is returned to the
user which allows driver functions to be used.
[in] | b_BoardIndex | Index of the board to open |
[out] | ph_DeviceHandle | Handle of the selected xPCIe1016 board |
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 |
_INT_ i_PCIe1016_OpenBoardViaIdentifier | ( | IN CHAR | pc_Identifier[], |
OUT HANDLE * | ph_DeviceHandle | ||
) |
Opens the board with the specified identifier. A handle is returned to the
user which allows driver functions to be used.
[in] | pc_Identifier | Identifier of the board to open |
[out] | ph_DeviceHandle | Handle of the xPCIe1016 board |
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 |
_INT_ i_PCIe1016_CloseBoard | ( | HANDLE | h_DeviceHandle | ) |
Releases the handle to the board. Block the access to the board.
[in] | h_DeviceHandle | Handle of the board |
0 | No Error |
-1 | The device handle parameter is wrong |
-2 | Unable to close the device handle |
_INT_ i_PCIe1016_GetDLLVersion | ( | OUT DWORD * | pdw_Version | ) |
Gets the version of the DLL.
[out] | pdw_Version | Version. For example: 0x01010910 -> Version 1.01, September 2010 |
0 | No Error |
_INT_ i_PCIe1016_GetDeviceDriverVersion | ( | IN HANDLE | h_DeviceHandle, |
OUT DWORD * | pdw_Version | ||
) |
Gets the version of the device driver.
[in] | h_DeviceHandle | Handle of the board |
[out] | pdw_Version | Version. For example: 0x01011211 -> Version 1.01, December 2011 |
0 | No Error |
-1 | Error while calling IOCTL function |
const _PCHAR_ pc_PCIe1016_GetLastError | ( | IN HANDLE | h_DeviceHandle | ) |
Gets a pointer to a string describing the last error that occurred.
[in] | h_DeviceHandle | Handle of the board |
_INT_ i_PCIe1016_SetBoardIntRoutine | ( | IN HANDLE | h_DeviceHandle, |
IN void(*)(INHANDLE h_DeviceHandle, INBYTEb_FifoOverflow, INDWORDdw_InterruptSource, INDWORDdw_InterruptMask, OUT WORD *pw_Args, INDWORDdw_ArgsCount) | v_FunctionName | ||
) |
Registers an interrupt callback function. This callback function will be called each time the board generates an interruption.
The value of dw_InterruptSource will enable you to determine the source of the interruption:
[in] | h_DeviceHandle | Handle of the board |
[in] | v_FunctionName | Address of the callback function h_DeviceHandle: Handle of the board b_FIFOOverflow: If uc_FIFOOverflow != 0, there are too many unprocessed interrupts in the kernel FIFO, and any new information is lost dw_InterruptMask: Source of the interrupt pw_Args: Values read during the interrupt. If DMA interrupt, this pointer will be set to NULL. dw_ArgsCount: Number of values read during the interrupt |
0 | No Error |
-1 | The device handle parameter is wrong |
-2 | An interrupt routine is already installed. Remove it with 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 |
_INT_ i_PCIe1016_ResetBoardIntRoutine | ( | IN HANDLE | h_DeviceHandle | ) |
Deregisters the current interrupt callback function.
[in] | h_DeviceHandle | Handle of the board |
0 | No Error |
-1 | The device handle parameter is wrong |
-2 | No interrupt routine installed |
-3 | Error in the reset interrupt callback function |