XilinxProcessorIPLib/drivers/pciepsu/examples/xpciepsu_ep_enable_example.c
int XPciePsu_InitEndPoint(XPciePsu *PciePsuPtr, u16 DeviceId)
{
	const XPciePsu_Config *ConfigPtr;
	ConfigPtr = XPciePsu_LookupConfig(DeviceId);
	Xil_AssertNonvoid(ConfigPtr != NULL);
	if (ConfigPtr->PcieMode != XPCIEPSU_MODE_ENDPOINT) {
		xil_printf("Psu pcie mode is not configured as endpoint\r\n");
		return XST_FAILURE;
	}
	XPciePsu_EP_CfgInitialize(PciePsuPtr, ConfigPtr);
	return XST_SUCCESS;
}
/******************************************************************************/
/**
* This function initializes a PSU PCIe EndPoint complex.
*
* @param    PciePsuPtr is a pointer to an instance of XPciePsu data
*       structure represents a root complex.
* @param    DeviceId is PSU PCIe root complex unique ID
*
* @return   - XST_SUCCESS if successful.
*		- XST_FAILURE if unsuccessful.
*
* @note     None.
*
*
*******************************************************************************/
This function initializes a PSU PCIe EndPoint complex.
This function initializes a PSU PCIe EndPoint complex .
int XPciePsu_InitEndPoint(XPciePsu *PciePsuPtr, u16 DeviceId)
{
	const XPciePsu_Config *ConfigPtr;
	ConfigPtr = XPciePsu_LookupConfig(DeviceId);
	Xil_AssertNonvoid(ConfigPtr != NULL);
	if (ConfigPtr->PcieMode != XPCIEPSU_MODE_ENDPOINT) {
		xil_printf("Psu pcie mode is not configured as endpoint\r\n");
		return XST_FAILURE;
	}
	XPciePsu_EP_CfgInitialize(PciePsuPtr, ConfigPtr);
	return XST_SUCCESS;
}
int XPciePsu_InitEndPoint ( XPciePsu * PciePsuPtr , u16 DeviceId ) { const XPciePsu_Config * ConfigPtr ; ConfigPtr = XPciePsu_LookupConfig ( DeviceId ) ; Xil_AssertNonvoid ( ConfigPtr != NULL ) ; if ( ConfigPtr -> PcieMode != XPCIEPSU_MODE_ENDPOINT ) { xil_printf ( " \r \n " ) ; return XST_FAILURE ; } XPciePsu_EP_CfgInitialize ( PciePsuPtr , ConfigPtr ) ; return XST_SUCCESS ; }
This function initializes a PSU PCIe EndPoint complex.
This function initializes a PSU PCIe EndPoint complex .