lib/sw_apps/imgsel/src/xis_i2c.c
static int XIs_IicPsConfig(u16 DeviceId)
{
	int Status = XST_FAILURE;
	XIicPs_Config *ConfigPtr;	/* Pointer to configuration data */

	/*
	 * Initialize the IIC driver so that it is ready to use.
	 */
	ConfigPtr = XIicPs_LookupConfig(DeviceId);
	if (ConfigPtr == NULL) {
		Status = XIS_IICPS_LKP_CONFIG_ERROR;
		goto END;
	}

	Status = XIicPs_CfgInitialize(&IicInstance, ConfigPtr,
			ConfigPtr->BaseAddress);
	if (Status != XST_SUCCESS) {
		Status = XIS_IICPS_CONFIG_INIT_ERROR;
		goto END;
	}
	/*
	 * Set the IIC serial clock rate.
	 */
	Status = XIicPs_SetSClk(&IicInstance, XIS_IIC_SCLK_RATE);
	if (Status != XST_SUCCESS) {
		Status = XIS_IICPS_SET_SCLK_ERROR;
		goto END;
	}

END:
	return Status;
}
/*****************************************************************************/
/**
 * This function perform the initial configuration for the IICPS Device.
 *
 * @param	DeviceId instance.
 *
 * @return	XST_SUCCESS if pass, otherwise XST_FAILURE.
 *
 ****************************************************************************/
This function perform the initial configuration for the IICPS Device.


This function perform the initial configuration for the IICPS Device .
static int XIs_IicPsConfig(u16 DeviceId)
{
	int Status = XST_FAILURE;
	XIicPs_Config *ConfigPtr;	
	ConfigPtr = XIicPs_LookupConfig(DeviceId);
	if (ConfigPtr == NULL) {
		Status = XIS_IICPS_LKP_CONFIG_ERROR;
		goto END;
	}
	Status = XIicPs_CfgInitialize(&IicInstance, ConfigPtr,
			ConfigPtr->BaseAddress);
	if (Status != XST_SUCCESS) {
		Status = XIS_IICPS_CONFIG_INIT_ERROR;
		goto END;
	}
	Status = XIicPs_SetSClk(&IicInstance, XIS_IIC_SCLK_RATE);
	if (Status != XST_SUCCESS) {
		Status = XIS_IICPS_SET_SCLK_ERROR;
		goto END;
	}
END:
	return Status;
}
static int XIs_IicPsConfig ( u16 DeviceId ) { int Status = XST_FAILURE ; XIicPs_Config * ConfigPtr ; ConfigPtr = XIicPs_LookupConfig ( DeviceId ) ; if ( ConfigPtr == NULL ) { Status = XIS_IICPS_LKP_CONFIG_ERROR ; goto END ; } Status = XIicPs_CfgInitialize ( & IicInstance , ConfigPtr , ConfigPtr -> BaseAddress ) ; if ( Status != XST_SUCCESS ) { Status = XIS_IICPS_CONFIG_INIT_ERROR ; goto END ; } Status = XIicPs_SetSClk ( & IicInstance , XIS_IIC_SCLK_RATE ) ; if ( Status != XST_SUCCESS ) { Status = XIS_IICPS_SET_SCLK_ERROR ; goto END ; } END : return Status ; }
This function perform the initial configuration for the IICPS Device.
This function perform the initial configuration for the IICPS Device .
/* Pointer to configuration data */ /*
	 * Initialize the IIC driver so that it is ready to use.
	 */ /*
	 * Set the IIC serial clock rate.
	 */