XilinxProcessorIPLib/drivers/v_hdmitxss1/examples/xhdmi_example/video_fmc.c
int Vfmc_PowerDownTiLMK03318(XVfmc *VfmcPtr, u8 Powerdown)
{
	u8 Buffer;
	int ByteCount;
	void *IicPtr = VfmcPtr->IicPtr;

	/* Read IO Expander ouput register */
	ByteCount = Vfmc_I2cRecv(IicPtr, VFMC_I2C_IOEXP_1_ADDR,
			(u8 *)&Buffer, 1, I2C_STOP);

	/* Mask out the TI LMK03318 Power Down pin */
	Buffer &= ~0x02;

	/* Assign Power down pin value */
	Buffer |= ((Powerdown==0) ? 0 : 1<<2);

	/* Write updated values */
	ByteCount += Vfmc_I2cSend(IicPtr, VFMC_I2C_IOEXP_1_ADDR,
			(u8*)&Buffer, 1, I2C_STOP);

	if (ByteCount == 2)
	  return XST_SUCCESS;
	else
	  return XST_FAILURE;
}
/*****************************************************************************/
/**
*
* This function en/disables the power up pin of TI LMK03318 clock generator.
*
* @param  PowerDown true =power down / false= power up.
*
* @return The number of bytes sent.
*
* @note   None.
*
******************************************************************************/
This function en/disables the power up pin of TI LMK03318 clock generator.
This function en / disables the power up pin of TI LMK03318 clock generator .
int Vfmc_PowerDownTiLMK03318(XVfmc *VfmcPtr, u8 Powerdown)
{
	u8 Buffer;
	int ByteCount;
	void *IicPtr = VfmcPtr->IicPtr;
	ByteCount = Vfmc_I2cRecv(IicPtr, VFMC_I2C_IOEXP_1_ADDR,
			(u8 *)&Buffer, 1, I2C_STOP);
	Buffer &= ~0x02;
	Buffer |= ((Powerdown==0) ? 0 : 1<<2);
	ByteCount += Vfmc_I2cSend(IicPtr, VFMC_I2C_IOEXP_1_ADDR,
			(u8*)&Buffer, 1, I2C_STOP);
	if (ByteCount == 2)
	  return XST_SUCCESS;
	else
	  return XST_FAILURE;
}
int Vfmc_PowerDownTiLMK03318 ( XVfmc * VfmcPtr , u8 Powerdown ) { u8 Buffer ; int ByteCount ; void * IicPtr = VfmcPtr -> IicPtr ; ByteCount = Vfmc_I2cRecv ( IicPtr , VFMC_I2C_IOEXP_1_ADDR , ( u8 * ) & Buffer , 1 , I2C_STOP ) ; Buffer &= ~ 0x02 ; Buffer |= ( ( Powerdown == 0 ) ? 0 : 1 << 2 ) ; ByteCount += Vfmc_I2cSend ( IicPtr , VFMC_I2C_IOEXP_1_ADDR , ( u8 * ) & Buffer , 1 , I2C_STOP ) ; if ( ByteCount == 2 ) return XST_SUCCESS ; else return XST_FAILURE ; }
This function en/disables the power up pin of TI LMK03318 clock generator.
This function en / disables the power up pin of TI LMK03318 clock generator .
/* Read IO Expander ouput register */ /* Mask out the TI LMK03318 Power Down pin */ /* Assign Power down pin value */ /* Write updated values */