XilinxProcessorIPLib/drivers/dfeccf/examples/xdfesi570_mgt.c
int XDfeSi570_SetMgtOscillator(double CurrentFrequency, double NewFrequency)
{
	if (XST_FAILURE == XDfeSi570_InitI2C()) {
		return XST_FAILURE;
	}
	if (XDfeSi570_SetFrequency(CurrentFrequency, NewFrequency)) {
		return XST_FAILURE;
	} else {
		XDfeSi570_SetPL();
	}
	return XST_SUCCESS;
}
/****************************************************************************/
/**
*
* This function: initialize I2C bus, reads current state of si570, calculates
* parameters for si570 MGT oscillator new frequency, writes them to si570 and
* resets PL to use the new frequency.
*
* @param CurrentFrequency is MGT oscillator current frequency.
* @param NewFrequency is MGT oscillator new frequency.
*
* @return	None
*
* @note		None
*
****************************************************************************/
This function: initialize I2C bus, reads current state of si570, calculates
parameters for si570 MGT oscillator new frequency, writes them to si570 and
resets PL to use the new frequency.
This function : initialize I2C bus reads current state of si570 calculates parameters for si570 MGT oscillator new frequency writes them to si570 and resets PL to use the new frequency .
int XDfeSi570_SetMgtOscillator(double CurrentFrequency, double NewFrequency)
{
	if (XST_FAILURE == XDfeSi570_InitI2C()) {
		return XST_FAILURE;
	}
	if (XDfeSi570_SetFrequency(CurrentFrequency, NewFrequency)) {
		return XST_FAILURE;
	} else {
		XDfeSi570_SetPL();
	}
	return XST_SUCCESS;
}
int XDfeSi570_SetMgtOscillator ( double CurrentFrequency , double NewFrequency ) { if ( XST_FAILURE == XDfeSi570_InitI2C ( ) ) { return XST_FAILURE ; } if ( XDfeSi570_SetFrequency ( CurrentFrequency , NewFrequency ) ) { return XST_FAILURE ; } else { XDfeSi570_SetPL ( ) ; } return XST_SUCCESS ; }
This function: initialize I2C bus, reads current state of si570, calculates
parameters for si570 MGT oscillator new frequency, writes them to si570 and
resets PL to use the new frequency.
This function : initialize I2C bus reads current state of si570 calculates parameters for si570 MGT oscillator new frequency writes them to si570 and resets PL to use the new frequency .