XilinxProcessorIPLib/drivers/v_hdmitxss1/examples/xhdmi_example/idt_8t49n24x.c
static int IDT_8T49N24x_GPIO(void *IicPtr, u8 I2CSlaveAddress)
{
	int Result;

	/* GPIO_DIR */
	/* GPIO3 is output */
	/* Rest of the pins are input */
	Result = IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							0x0030, 0x08);

	/* GPIxSEL[2] */
	Result |= IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							0x0031, 0x00);

	/* GPIxSEL[1] */
	Result |= IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							0x0032, 0x00);

	/* GPIxSEL[0] */
	Result |= IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							0x0033, 0x00);

	/* GPOxSEL[2] */
	Result |= IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							0x0034, 0x00);

	/* GPOxSEL[1] */
	Result |= IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							0x0035, 0x00);

	/* GPOxSEL[0] */
	Result |= IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							0x0036, 0x08);

	if (Result != XST_SUCCESS)
		return XST_FAILURE;
	else
		return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function set the GPIO outputs
*
* @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 GPIO outputs
This function set the GPIO outputs
static int IDT_8T49N24x_GPIO(void *IicPtr, u8 I2CSlaveAddress)
{
	int Result;
	Result = IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							0x0030, 0x08);
	Result |= IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							0x0031, 0x00);
	Result |= IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							0x0032, 0x00);
	Result |= IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							0x0033, 0x00);
	Result |= IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							0x0034, 0x00);
	Result |= IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							0x0035, 0x00);
	Result |= IDT_8T49N24x_SetRegister(IicPtr, I2CSlaveAddress,
							0x0036, 0x08);
	if (Result != XST_SUCCESS)
		return XST_FAILURE;
	else
		return XST_SUCCESS;
}
static int IDT_8T49N24x_GPIO ( void * IicPtr , u8 I2CSlaveAddress ) { int Result ; Result = IDT_8T49N24x_SetRegister ( IicPtr , I2CSlaveAddress , 0x0030 , 0x08 ) ; Result |= IDT_8T49N24x_SetRegister ( IicPtr , I2CSlaveAddress , 0x0031 , 0x00 ) ; Result |= IDT_8T49N24x_SetRegister ( IicPtr , I2CSlaveAddress , 0x0032 , 0x00 ) ; Result |= IDT_8T49N24x_SetRegister ( IicPtr , I2CSlaveAddress , 0x0033 , 0x00 ) ; Result |= IDT_8T49N24x_SetRegister ( IicPtr , I2CSlaveAddress , 0x0034 , 0x00 ) ; Result |= IDT_8T49N24x_SetRegister ( IicPtr , I2CSlaveAddress , 0x0035 , 0x00 ) ; Result |= IDT_8T49N24x_SetRegister ( IicPtr , I2CSlaveAddress , 0x0036 , 0x08 ) ; if ( Result != XST_SUCCESS ) return XST_FAILURE ; else return XST_SUCCESS ; }
This function set the GPIO outputs
This function set the GPIO outputs
/* GPIO_DIR */ /* GPIO3 is output */ /* Rest of the pins are input */ /* GPIxSEL[2] */ /* GPIxSEL[1] */ /* GPIxSEL[0] */ /* GPOxSEL[2] */ /* GPOxSEL[1] */ /* GPOxSEL[0] */