XilinxProcessorIPLib/drivers/mipicsiss/examples/xmipi_vck_example/mipi_cfg.c
int InitIIC(void) {
	int Status;
	XIic_Config *ConfigPtr; /* Pointer to configuration data */

	memset(&IicSensor, 0, sizeof(XIic));

	/*
	 * Initialize the IIC driver so that it is ready to use.
	 */
	ConfigPtr = XIic_LookupConfig(IIC_SENSOR_DEV_ID);
	if (ConfigPtr == NULL) {
		return XST_FAILURE;
	}

	Status = XIic_CfgInitialize(&IicSensor, ConfigPtr,
					ConfigPtr->BaseAddress);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	/*
	 * Perform a self-test to ensure that the hardware was built
	 * correctly.
	 */
	Status = XIic_SelfTest(&IicSensor);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	return Status;
}
/*****************************************************************************/
/**
 * This function initializes IIC controller and gets config parameters.
 *
 * @return	XST_SUCCESS if successful else XST_FAILURE.
 *
 * @note	None.
 *
 *****************************************************************************/
This function initializes IIC controller and gets config parameters.

@note        None.
This function initializes IIC controller and gets config parameters . @note None .
int InitIIC(void) {
	int Status;
	XIic_Config *ConfigPtr; 
	memset(&IicSensor, 0, sizeof(XIic));
	ConfigPtr = XIic_LookupConfig(IIC_SENSOR_DEV_ID);
	if (ConfigPtr == NULL) {
		return XST_FAILURE;
	}
	Status = XIic_CfgInitialize(&IicSensor, ConfigPtr,
					ConfigPtr->BaseAddress);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	Status = XIic_SelfTest(&IicSensor);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	return Status;
}
int InitIIC ( void ) { int Status ; XIic_Config * ConfigPtr ; memset ( & IicSensor , 0 , sizeof ( XIic ) ) ; ConfigPtr = XIic_LookupConfig ( IIC_SENSOR_DEV_ID ) ; if ( ConfigPtr == NULL ) { return XST_FAILURE ; } Status = XIic_CfgInitialize ( & IicSensor , ConfigPtr , ConfigPtr -> BaseAddress ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } Status = XIic_SelfTest ( & IicSensor ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } return Status ; }
This function initializes IIC controller and gets config parameters.
This function initializes IIC controller and gets config parameters .
/* Pointer to configuration data */ /*
	 * Initialize the IIC driver so that it is ready to use.
	 */ /*
	 * Perform a self-test to ensure that the hardware was built
	 * correctly.
	 */