XilinxProcessorIPLib/drivers/dp14txss/examples/src/dats_dp14/idt_8t49n24x.c
static int IDT_8T49N24x_Mode(u32 I2CBaseAddress, u8 I2CSlaveAddress, u8 Synthesizer)
{
	int Result;
	u8 Value;
	u8 Mask;

	// Digital PLL
	// State[1:0]
	if (Synthesizer) {
		Value = 0x01;		// Force FREERUN
		Value |= (1<<4);	// Disable reference input 0
		Value |= (1<<5);	// Disable reference input 1
	}

	else {
		Value = 0x00;		// Run automatically
		Value |= (1<<5);	// Disable reference input 1
	}
	Mask = 0x33;
	Result = IDT_8T49N24x_ModifyRegister(I2CBaseAddress, I2CSlaveAddress, 0x000a, Value, Mask);

	// Analog PLL
	// SYN_MODE
	if (Synthesizer) {
		Value = (1<<3);		// Synthesizer mode
	}

	else {
		Value = 0x00;		// Jitter attenuator mode
	}
	Mask = (1<<3);
	Result = IDT_8T49N24x_ModifyRegister(I2CBaseAddress, I2CSlaveAddress, 0x0069, Value, Mask);

	return Result;
}
/*****************************************************************************/
/**
*
* This function sets the mode (jitter attenuator / synthesizer)
*
* @param I2CBaseAddress is the baseaddress of the I2C core.
* @param I2CSlaveAddress is the 7-bit I2C slave address.
*
* @return
*    - XST_SUCCESS
*    - XST_FAILURE
*
* @note None.
*
******************************************************************************/
This function sets the mode (jitter attenuator / synthesizer)
This function sets the mode ( jitter attenuator / synthesizer )
static int IDT_8T49N24x_Mode(u32 I2CBaseAddress, u8 I2CSlaveAddress, u8 Synthesizer)
{
	int Result;
	u8 Value;
	u8 Mask;
	if (Synthesizer) {
		Value = 0x01;		
		Value |= (1<<4);	
		Value |= (1<<5);	
	}
	else {
		Value = 0x00;		
		Value |= (1<<5);	
	}
	Mask = 0x33;
	Result = IDT_8T49N24x_ModifyRegister(I2CBaseAddress, I2CSlaveAddress, 0x000a, Value, Mask);
	if (Synthesizer) {
		Value = (1<<3);		
	}
	else {
		Value = 0x00;		
	}
	Mask = (1<<3);
	Result = IDT_8T49N24x_ModifyRegister(I2CBaseAddress, I2CSlaveAddress, 0x0069, Value, Mask);
	return Result;
}
static int IDT_8T49N24x_Mode ( u32 I2CBaseAddress , u8 I2CSlaveAddress , u8 Synthesizer ) { int Result ; u8 Value ; u8 Mask ; if ( Synthesizer ) { Value = 0x01 ; Value |= ( 1 << 4 ) ; Value |= ( 1 << 5 ) ; } else { Value = 0x00 ; Value |= ( 1 << 5 ) ; } Mask = 0x33 ; Result = IDT_8T49N24x_ModifyRegister ( I2CBaseAddress , I2CSlaveAddress , 0x000a , Value , Mask ) ; if ( Synthesizer ) { Value = ( 1 << 3 ) ; } else { Value = 0x00 ; } Mask = ( 1 << 3 ) ; Result = IDT_8T49N24x_ModifyRegister ( I2CBaseAddress , I2CSlaveAddress , 0x0069 , Value , Mask ) ; return Result ; }
This function sets the mode (jitter attenuator / synthesizer)
This function sets the mode ( jitter attenuator / synthesizer )
// Digital PLL // State[1:0] // Force FREERUN // Disable reference input 0 // Disable reference input 1 // Run automatically // Disable reference input 1 // Analog PLL // SYN_MODE // Synthesizer mode // Jitter attenuator mode