XilinxProcessorIPLib/drivers/dp14txss/examples/src/tx_only/idt_8t49n24x.c
int IDT_8T49N24x_Init(u32 I2CBaseAddress, u8 I2CSlaveAddress)
{
	int Result=0;

	/* Check device ID. */
//	Result = IDT_8T49N24x_CheckDeviceID(I2CBaseAddress, I2CSlaveAddress);


	if (Result == XST_SUCCESS) {

		/* Disable DPLL and APLL calibration
		 * The i2c interface is clocked by the APLL.
		 * During the PLL parameters update, the i2c
		 * might become unresponsive.
		 * To prevent this, the DPLL and APLL calibration
		 * are disabled during the i2c transactions
		 * */
		//MB_Sleep(300);
		usleep(300);
		Result = IDT_8T49N24x_Enable(I2CBaseAddress,
					     I2CSlaveAddress, FALSE);
		//MB_Sleep(300);
		usleep(300);

		/* Configure device */
		Result = IDT_8T49N24x_Configure_JA(I2CBaseAddress,
						   I2CSlaveAddress);
		//MB_Sleep(300);
		usleep(300);

		/* Enable DPLL and APLL calibration */
		Result = IDT_8T49N24x_Enable(I2CBaseAddress,
					     I2CSlaveAddress, TRUE);
		//MB_Sleep(300);
		usleep(300);

		return Result;
	}

	return XST_FAILURE;
}
/*****************************************************************************/
/**
*
* This function initializes the IDT 8TN49N24x with default values
* for use with the Video FMC.
*
* @param I2CBaseAddress is the baseaddress of the I2C core.
* @param I2CSlaveAddress is the 7-bit I2C slave address.
*
* @return
*    - XST_SUCCESS Initialization was successful.
*    - XST_FAILURE I2C write error.
*
* @note None.
*
******************************************************************************/
This function initializes the IDT 8TN49N24x with default values
for use with the Video FMC.
This function initializes the IDT 8TN49N24x with default values for use with the Video FMC .
int IDT_8T49N24x_Init(u32 I2CBaseAddress, u8 I2CSlaveAddress)
{
	int Result=0;
	if (Result == XST_SUCCESS) {
		usleep(300);
		Result = IDT_8T49N24x_Enable(I2CBaseAddress,
					     I2CSlaveAddress, FALSE);
		usleep(300);
		Result = IDT_8T49N24x_Configure_JA(I2CBaseAddress,
						   I2CSlaveAddress);
		usleep(300);
		Result = IDT_8T49N24x_Enable(I2CBaseAddress,
					     I2CSlaveAddress, TRUE);
		usleep(300);
		return Result;
	}
	return XST_FAILURE;
}
int IDT_8T49N24x_Init ( u32 I2CBaseAddress , u8 I2CSlaveAddress ) { int Result = 0 ; if ( Result == XST_SUCCESS ) { usleep ( 300 ) ; Result = IDT_8T49N24x_Enable ( I2CBaseAddress , I2CSlaveAddress , FALSE ) ; usleep ( 300 ) ; Result = IDT_8T49N24x_Configure_JA ( I2CBaseAddress , I2CSlaveAddress ) ; usleep ( 300 ) ; Result = IDT_8T49N24x_Enable ( I2CBaseAddress , I2CSlaveAddress , TRUE ) ; usleep ( 300 ) ; return Result ; } return XST_FAILURE ; }
This function initializes the IDT 8TN49N24x with default values
for use with the Video FMC.
This function initializes the IDT 8TN49N24x with default values for use with the Video FMC .
/* Check device ID. */ //	Result = IDT_8T49N24x_CheckDeviceID(I2CBaseAddress, I2CSlaveAddress); /* Disable DPLL and APLL calibration
		 * The i2c interface is clocked by the APLL.
		 * During the PLL parameters update, the i2c
		 * might become unresponsive.
		 * To prevent this, the DPLL and APLL calibration
		 * are disabled during the i2c transactions
		 * */ //MB_Sleep(300); //MB_Sleep(300); /* Configure device */ //MB_Sleep(300); /* Enable DPLL and APLL calibration */ //MB_Sleep(300);