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

	if (Input == 1) {
		Shift = 5;
	}

	else {
		Shift = 4;
	}

	// Enable
	if (Enable) {
		Value = 0x00;		// Enable
	}

	// Disable
	else {
		Value = (1<<Shift);	// Disable reference input
	}
	Mask = (1<<Shift);
	Result = IDT_8T49N24x_ModifyRegister(I2CBaseAddress, I2CSlaveAddress, 0x000a, Value, Mask);

	return Result;
}
/*****************************************************************************/
/**
*
* This function sets disables / enables the reference inputs
*
* @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 disables / enables the reference inputs
This function sets disables / enables the reference inputs
static int IDT_8T49N24x_ReferenceInput(u32 I2CBaseAddress, u8 I2CSlaveAddress, u8 Input, u8 Enable)
{
	int Result;
	u8 Value;
	u8 Mask;
	u8 Shift;
	if (Input == 1) {
		Shift = 5;
	}
	else {
		Shift = 4;
	}
	if (Enable) {
		Value = 0x00;		
	}
	else {
		Value = (1<<Shift);	 reference input
	}
	Mask = (1<<Shift);
	Result = IDT_8T49N24x_ModifyRegister(I2CBaseAddress, I2CSlaveAddress, 0x000a, Value, Mask);
	return Result;
}
static int IDT_8T49N24x_ReferenceInput ( u32 I2CBaseAddress , u8 I2CSlaveAddress , u8 Input , u8 Enable ) { int Result ; u8 Value ; u8 Mask ; u8 Shift ; if ( Input == 1 ) { Shift = 5 ; } else { Shift = 4 ; } if ( Enable ) { Value = 0x00 ; } else { Value = ( 1 << Shift ) ; } Mask = ( 1 << Shift ) ; Result = IDT_8T49N24x_ModifyRegister ( I2CBaseAddress , I2CSlaveAddress , 0x000a , Value , Mask ) ; return Result ; }
This function sets disables / enables the reference inputs
This function sets disables / enables the reference inputs
// Enable // Enable // Disable // Disable reference input