![Terasic Apollo Carrier Board User Manual Download Page 36](http://html1.mh-extra.com/html/terasic/apollo-carrier-board/apollo-carrier-board_user-manual_1088471036.webp)
Apollo Carrier Board
User Manual
35
www.terasic.com
September 22, 2020
device ID.
Return Value:
Return a handle to presents specified PCIe card. A positive value is return if the PCIe card is
opened successfully. A value zero means failed to connect the target PCIe card.
This handle value is used as a parameter for other functions, e.g. PCIE_Read32.
Users need to call PCIE_Close to release handle once the handle is no longer used.
PCIE_Close
Function:
Close a handle associated to the PCIe card.
Prototype:
void PCIE_Close(
PCIE_HANDLE hPCIE);
Parameters:
hPCIE:
A PCIe handle return by PCIE_Open function.
Return Value:
None.
PCIE_Read32
Function:
Read a 32-bit data from the FPGA board.
Prototype:
bool PCIE_Read32(
PCIE_HANDLE hPCIE,
PCIE_BAR PcieBar,
PCIE_ADDRESS PcieAddress,
uint32_t *pdwData);
Parameters:
hPCIE:
A PCIe handle return by PCIE_Open function.
PcieBar:
Specify the target BAR.
PcieAddress:
Specify the target address in FPGA.
pdwData:
A buffer to retrieve the 32-bit data.
Return Value: