XilinxProcessorIPLib/drivers/dp14txss/examples/src/dats_dp14/idt_8t49n24x.c
static int IDT_8T49N24x_PreDivider(u32 I2CBaseAddress, u8 I2CSlaveAddress, u32 Value, u8 Input)
{
	int Result;
	u8 Data;
	u16 Address;

	if (Input == 1)
		Address = 0x000e;
	else
		Address = 0x000b;

	// PREx[20:16]
	Data = (Value >> 16) & 0x1f;
	Result = IDT_8T49N24x_SetRegister(I2CBaseAddress, I2CSlaveAddress, Address, Data);

	// PREx[15:8]
	Data = (Value >> 8);
	Result = IDT_8T49N24x_SetRegister(I2CBaseAddress, I2CSlaveAddress, Address+1, Data);

	// PREx[7:0]
	Data = (Value & 0xff);
	Result = IDT_8T49N24x_SetRegister(I2CBaseAddress, I2CSlaveAddress, Address+2, Data);

	return Result;
}
/*****************************************************************************/
/**
*
* This function set the pre-divider
*
* @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 pre-divider
This function set the pre - divider
static int IDT_8T49N24x_PreDivider(u32 I2CBaseAddress, u8 I2CSlaveAddress, u32 Value, u8 Input)
{
	int Result;
	u8 Data;
	u16 Address;
	if (Input == 1)
		Address = 0x000e;
	else
		Address = 0x000b;
	Data = (Value >> 16) & 0x1f;
	Result = IDT_8T49N24x_SetRegister(I2CBaseAddress, I2CSlaveAddress, Address, Data);
	Data = (Value >> 8);
	Result = IDT_8T49N24x_SetRegister(I2CBaseAddress, I2CSlaveAddress, Address+1, Data);
	Data = (Value & 0xff);
	Result = IDT_8T49N24x_SetRegister(I2CBaseAddress, I2CSlaveAddress, Address+2, Data);
	return Result;
}
static int IDT_8T49N24x_PreDivider ( u32 I2CBaseAddress , u8 I2CSlaveAddress , u32 Value , u8 Input ) { int Result ; u8 Data ; u16 Address ; if ( Input == 1 ) Address = 0x000e ; else Address = 0x000b ; Data = ( Value >> 16 ) & 0x1f ; Result = IDT_8T49N24x_SetRegister ( I2CBaseAddress , I2CSlaveAddress , Address , Data ) ; Data = ( Value >> 8 ) ; Result = IDT_8T49N24x_SetRegister ( I2CBaseAddress , I2CSlaveAddress , Address + 1 , Data ) ; Data = ( Value & 0xff ) ; Result = IDT_8T49N24x_SetRegister ( I2CBaseAddress , I2CSlaveAddress , Address + 2 , Data ) ; return Result ; }
This function set the pre-divider
This function set the pre - divider
// PREx[20:16] // PREx[15:8] // PREx[7:0]