XilinxProcessorIPLib/drivers/v_hdmitxss1/examples/hdcp_key_utility/video_fmc.c
int Vfmc_I2cMuxSelect(void *IicPtr)
{
	u8 Buffer;
	int Status;

#if defined (XPS_BOARD_VCU118)
	Buffer = 0x02;
	Status = Vfmc_I2cSend(IicPtr, 0x75,
					   (u8 *)&Buffer, 1, (I2C_STOP));

	/* Set TCA9548 MUX1 to select port 1 (No connection)*/
	Buffer = 0x02;
	Status = Vfmc_I2cSend(IicPtr, 0x74,
					   (u8 *)&Buffer, 1, (I2C_STOP));


#elif defined (XPS_BOARD_ZCU102)
	/* Set TCA9548 U34 to select port 7 (No connection)*/
	Buffer = 0x80;
	Status = Vfmc_I2cSend(IicPtr, 0x74,
					   (u8 *)&Buffer, 1, (I2C_STOP));

	/* Set TCA9548 U135 to select port 0 (HPC0)*/
	Buffer = 0x01;
	Status = Vfmc_I2cSend(IicPtr, 0x75,
					   (u8 *)&Buffer, 1, (I2C_STOP));

#elif defined (XPS_BOARD_ZCU106)
	/* Set TCA9548 U34 to select port 7 (No connection)*/
	Buffer = 0x80;
	Status = Vfmc_I2cSend(IicPtr, 0x74,
					   (u8 *)&Buffer, 1, (I2C_STOP));

	/* Set TCA9548 U135 to select port 0 (HPC0)*/
	Buffer = 0x01;
	Status = Vfmc_I2cSend(IicPtr, 0x75,
					   (u8 *)&Buffer, 1, (I2C_STOP));

#endif

	/* When a device is found, it returns one byte */
	if (Status)
	  return XST_SUCCESS;
	else
	  return XST_FAILURE;
}
/*****************************************************************************/
/**
*
* This function setup the IIC MUX to select the VFMC on the HPC header
*
* @param  None.
*
* @return The number of bytes sent.
*
* @note   None.
*
******************************************************************************/
This function setup the IIC MUX to select the VFMC on the HPC header
This function setup the IIC MUX to select the VFMC on the HPC header
int Vfmc_I2cMuxSelect(void *IicPtr)
{
	u8 Buffer;
	int Status;
#if defined (XPS_BOARD_VCU118)
	Buffer = 0x02;
	Status = Vfmc_I2cSend(IicPtr, 0x75,
					   (u8 *)&Buffer, 1, (I2C_STOP));
	Buffer = 0x02;
	Status = Vfmc_I2cSend(IicPtr, 0x74,
					   (u8 *)&Buffer, 1, (I2C_STOP));
#elif defined (XPS_BOARD_ZCU102)
	Buffer = 0x80;
	Status = Vfmc_I2cSend(IicPtr, 0x74,
					   (u8 *)&Buffer, 1, (I2C_STOP));
	Buffer = 0x01;
	Status = Vfmc_I2cSend(IicPtr, 0x75,
					   (u8 *)&Buffer, 1, (I2C_STOP));
#elif defined (XPS_BOARD_ZCU106)
	Buffer = 0x80;
	Status = Vfmc_I2cSend(IicPtr, 0x74,
					   (u8 *)&Buffer, 1, (I2C_STOP));
	Buffer = 0x01;
	Status = Vfmc_I2cSend(IicPtr, 0x75,
					   (u8 *)&Buffer, 1, (I2C_STOP));
#endif
	if (Status)
	  return XST_SUCCESS;
	else
	  return XST_FAILURE;
}
int Vfmc_I2cMuxSelect ( void * IicPtr ) { u8 Buffer ; int Status ; #if defined ( XPS_BOARD_VCU118 ) Buffer = 0x02 ; Status = Vfmc_I2cSend ( IicPtr , 0x75 , ( u8 * ) & Buffer , 1 , ( I2C_STOP ) ) ; Buffer = 0x02 ; Status = Vfmc_I2cSend ( IicPtr , 0x74 , ( u8 * ) & Buffer , 1 , ( I2C_STOP ) ) ; #elif defined ( XPS_BOARD_ZCU102 ) Buffer = 0x80 ; Status = Vfmc_I2cSend ( IicPtr , 0x74 , ( u8 * ) & Buffer , 1 , ( I2C_STOP ) ) ; Buffer = 0x01 ; Status = Vfmc_I2cSend ( IicPtr , 0x75 , ( u8 * ) & Buffer , 1 , ( I2C_STOP ) ) ; #elif defined ( XPS_BOARD_ZCU106 ) Buffer = 0x80 ; Status = Vfmc_I2cSend ( IicPtr , 0x74 , ( u8 * ) & Buffer , 1 , ( I2C_STOP ) ) ; Buffer = 0x01 ; Status = Vfmc_I2cSend ( IicPtr , 0x75 , ( u8 * ) & Buffer , 1 , ( I2C_STOP ) ) ; #endif if ( Status ) return XST_SUCCESS ; else return XST_FAILURE ; }
This function setup the IIC MUX to select the VFMC on the HPC header
This function setup the IIC MUX to select the VFMC on the HPC header
/* Set TCA9548 MUX1 to select port 1 (No connection)*/ /* Set TCA9548 U34 to select port 7 (No connection)*/ /* Set TCA9548 U135 to select port 0 (HPC0)*/ /* Set TCA9548 U34 to select port 7 (No connection)*/ /* Set TCA9548 U135 to select port 0 (HPC0)*/ /* When a device is found, it returns one byte */