XilinxProcessorIPLib/drivers/v_hdmitxss1/examples/xhdmi_example/idt_8t49n24x.c
static int IDT_8T49N24x_SetRegister(void *IicPtr, u8 I2CSlaveAddress,
							u16 RegisterAddress, u8 Value)
{
	u32 ByteCount = 0;
	u8 Buffer[3];
	u8 Retry = 0;

	/* Write data */
	Buffer[0] = (RegisterAddress >> 8); 
	Buffer[1] = RegisterAddress & 0xff; 
	Buffer[2] = Value;
	
	while (1) {
		ByteCount = IDT_8T49N24x_I2cSend(IicPtr, I2CSlaveAddress, (u8*)Buffer,
							3, I2C_STOP);
		if (ByteCount != 3) {
			Retry++;

			/* Maximum retries */
			if (Retry == 255) {
				return XST_FAILURE;
			}
		}
	
		else {
			return XST_SUCCESS;
		}
	}  
}
/*****************************************************************************/
/**
*
* This function send a single byte to the IDT 8T49N24x  
*
* @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 send a single byte to the IDT 8T49N24x
This function send a single byte to the IDT 8T49N24x
static int IDT_8T49N24x_SetRegister(void *IicPtr, u8 I2CSlaveAddress,
							u16 RegisterAddress, u8 Value)
{
	u32 ByteCount = 0;
	u8 Buffer[3];
	u8 Retry = 0;
	Buffer[0] = (RegisterAddress >> 8); 
	Buffer[1] = RegisterAddress & 0xff; 
	Buffer[2] = Value;
	while (1) {
		ByteCount = IDT_8T49N24x_I2cSend(IicPtr, I2CSlaveAddress, (u8*)Buffer,
							3, I2C_STOP);
		if (ByteCount != 3) {
			Retry++;
			if (Retry == 255) {
				return XST_FAILURE;
			}
		}
		else {
			return XST_SUCCESS;
		}
	}  
}
static int IDT_8T49N24x_SetRegister ( void * IicPtr , u8 I2CSlaveAddress , u16 RegisterAddress , u8 Value ) { u32 ByteCount = 0 ; u8 Buffer [ 3 ] ; u8 Retry = 0 ; Buffer [ 0 ] = ( RegisterAddress >> 8 ) ; Buffer [ 1 ] = RegisterAddress & 0xff ; Buffer [ 2 ] = Value ; while ( 1 ) { ByteCount = IDT_8T49N24x_I2cSend ( IicPtr , I2CSlaveAddress , ( u8 * ) Buffer , 3 , I2C_STOP ) ; if ( ByteCount != 3 ) { Retry ++ ; if ( Retry == 255 ) { return XST_FAILURE ; } } else { return XST_SUCCESS ; } } }
This function send a single byte to the IDT 8T49N24x
This function send a single byte to the IDT 8T49N24x
/* Write data */ /* Maximum retries */