XilinxProcessorIPLib/drivers/v_hdmitxss1/examples/xhdmi_example/idt_8t49n24x.c
static int IDT_8T49N24x_OutputDividerFractional(void *IicPtr,
							u8 I2CSlaveAddress, u32 Value, u8 Output)
{
	int Result;
	u8 Data;
	u16 Address;

	switch (Output) {
		case 0 : Address = 0x0000;
			break;
		case 1 : Address = 0x0057;
			break;
		case 2 : Address = 0x005b;
			break;
		case 3 : Address = 0x005f;
			break;
	}
	
	/* NFRAC_Qm[27:24] */
	Data = (Value >> 24) & 0x0f; 
	Result = IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							Address, Data);

	/* NFRAC_Qm[23:16] */
	Data = (Value >> 16); 
	Result = IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							Address+1, Data);

	/* NFRAC_Qm[15:8] */
	Data = (Value >> 8); 
	Result = IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							Address+2, Data);

	/* NFRAC_Qm[7:0] */
	Data = (Value & 0xff); 
	Result = IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							Address+3, Data);

	return Result;
}
/*****************************************************************************/
/**
*
* This function set the Output divider fractional
*
* @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 set the Output divider fractional
This function set the Output divider fractional
static int IDT_8T49N24x_OutputDividerFractional(void *IicPtr,
							u8 I2CSlaveAddress, u32 Value, u8 Output)
{
	int Result;
	u8 Data;
	u16 Address;
	switch (Output) {
		case 0 : Address = 0x0000;
			break;
		case 1 : Address = 0x0057;
			break;
		case 2 : Address = 0x005b;
			break;
		case 3 : Address = 0x005f;
			break;
	}
	Data = (Value >> 24) & 0x0f; 
	Result = IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							Address, Data);
	Data = (Value >> 16); 
	Result = IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							Address+1, Data);
	Data = (Value >> 8); 
	Result = IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							Address+2, Data);
	Data = (Value & 0xff); 
	Result = IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							Address+3, Data);
	return Result;
}
static int IDT_8T49N24x_OutputDividerFractional ( void * IicPtr , u8 I2CSlaveAddress , u32 Value , u8 Output ) { int Result ; u8 Data ; u16 Address ; switch ( Output ) { case 0 : Address = 0x0000 ; break ; case 1 : Address = 0x0057 ; break ; case 2 : Address = 0x005b ; break ; case 3 : Address = 0x005f ; break ; } Data = ( Value >> 24 ) & 0x0f ; Result = IDT_8T49N24x_SetRegister ( IicPtr , I2CSlaveAddress , Address , Data ) ; Data = ( Value >> 16 ) ; Result = IDT_8T49N24x_SetRegister ( IicPtr , I2CSlaveAddress , Address + 1 , Data ) ; Data = ( Value >> 8 ) ; Result = IDT_8T49N24x_SetRegister ( IicPtr , I2CSlaveAddress , Address + 2 , Data ) ; Data = ( Value & 0xff ) ; Result = IDT_8T49N24x_SetRegister ( IicPtr , I2CSlaveAddress , Address + 3 , Data ) ; return Result ; }
This function set the Output divider fractional
This function set the Output divider fractional
/* NFRAC_Qm[27:24] */ /* NFRAC_Qm[23:16] */ /* NFRAC_Qm[15:8] */ /* NFRAC_Qm[7:0] */