XilinxProcessorIPLib/drivers/v_sdirxss/examples/vck190_av_pt/fzetta_fmc/fzetta_fmc_spi.c
int fzetta_fmc_spi_init(u8 Dev_ID) {
	int Status;
	/*
	 * Initialize the SPI driver so that it is  ready to use.
	 */
   fzetta_fmc_Spi_ConfigPtr = XSpi_LookupConfig(Dev_ID);
	if (fzetta_fmc_Spi_ConfigPtr == NULL) {
		return XST_DEVICE_NOT_FOUND;
	}

	Status = XSpi_CfgInitialize(&fzetta_fmc_Spi, fzetta_fmc_Spi_ConfigPtr, fzetta_fmc_Spi_ConfigPtr->BaseAddress);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}

	/*
	 * Set the SPI device as a master and in manual slave select mode such
	 * that the slave select signal does not toggle for every byte of a
	 * transfer, this must be done before the slave select is set.
	 */
	Status = XSpi_SetOptions(&fzetta_fmc_Spi, XSP_MASTER_OPTION | XSP_MANUAL_SSELECT_OPTION);
	if(Status != XST_SUCCESS) {
		return XST_FAILURE;
	}

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
 *
 * This function Initialize SPI IP and its corresponding drivers and configptr instances
 *
 * @param	Dev_ID  Device ID.
 *
 * @return	XST_SUCCESS if initialization is successful else XST_FAILURE
 *
 * @note	None.
 *
 ******************************************************************************/
This function Initialize SPI IP and its corresponding drivers and configptr instances
@param       Dev_ID  Device ID.

@return      XST_SUCCESS if initialization is successful else XST_FAILURE

@note        None.
This function Initialize SPI IP and its corresponding drivers and configptr instances @param Dev_ID Device ID . @return XST_SUCCESS if initialization is successful else XST_FAILURE @note None .
int fzetta_fmc_spi_init(u8 Dev_ID) {
	int Status;
   fzetta_fmc_Spi_ConfigPtr = XSpi_LookupConfig(Dev_ID);
	if (fzetta_fmc_Spi_ConfigPtr == NULL) {
		return XST_DEVICE_NOT_FOUND;
	}
	Status = XSpi_CfgInitialize(&fzetta_fmc_Spi, fzetta_fmc_Spi_ConfigPtr, fzetta_fmc_Spi_ConfigPtr->BaseAddress);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	Status = XSpi_SetOptions(&fzetta_fmc_Spi, XSP_MASTER_OPTION | XSP_MANUAL_SSELECT_OPTION);
	if(Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	return XST_SUCCESS;
}
int fzetta_fmc_spi_init ( u8 Dev_ID ) { int Status ; fzetta_fmc_Spi_ConfigPtr = XSpi_LookupConfig ( Dev_ID ) ; if ( fzetta_fmc_Spi_ConfigPtr == NULL ) { return XST_DEVICE_NOT_FOUND ; } Status = XSpi_CfgInitialize ( & fzetta_fmc_Spi , fzetta_fmc_Spi_ConfigPtr , fzetta_fmc_Spi_ConfigPtr -> BaseAddress ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } Status = XSpi_SetOptions ( & fzetta_fmc_Spi , XSP_MASTER_OPTION | XSP_MANUAL_SSELECT_OPTION ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } return XST_SUCCESS ; }
This function Initialize SPI IP and its corresponding drivers and configptr instances
 @param       Dev_ID  Device ID.
This function Initialize SPI IP and its corresponding drivers and configptr instances @param Dev_ID Device ID .
/*
	 * Initialize the SPI driver so that it is  ready to use.
	 */ /*
	 * Set the SPI device as a master and in manual slave select mode such
	 * that the slave select signal does not toggle for every byte of a
	 * transfer, this must be done before the slave select is set.
	 */