XilinxProcessorIPLib/drivers/v_hdmiphy1/src/xhdmiphy1.c
void XHdmiphy1_SetTxVoltageSwing(XHdmiphy1 *InstancePtr, u8 QuadId,
		XHdmiphy1_ChannelId ChId, u8 Vs)
{
	u32 RegVal;
	u32 MaskVal;
	u32 RegOffset;

	/* Suppress Warning Messages */
	QuadId = QuadId;

	if ((ChId == XHDMIPHY1_CHANNEL_ID_CH1) ||
        (ChId == XHDMIPHY1_CHANNEL_ID_CH2)) {
		RegOffset = XHDMIPHY1_TX_DRIVER_CH12_REG;
	}
	else {
		RegOffset = XHDMIPHY1_TX_DRIVER_CH34_REG;
	}
	RegVal = XHdmiphy1_ReadReg(InstancePtr->Config.BaseAddr, RegOffset);

	MaskVal = XHDMIPHY1_TX_DRIVER_TXDIFFCTRL_MASK(ChId);
	RegVal &= ~MaskVal;
	RegVal |= ((Vs & 0xF) << XHDMIPHY1_TX_DRIVER_TXDIFFCTRL_SHIFT(ChId));
	XHdmiphy1_WriteReg(InstancePtr->Config.BaseAddr, RegOffset, RegVal);

	RegVal = XHdmiphy1_ReadReg(InstancePtr->Config.BaseAddr,
				XHDMIPHY1_TX_DRIVER_EXT_REG);
	MaskVal = XHDMIPHY1_TX_DRIVER_EXT_TXDIFFCTRL_MASK(ChId);
	RegVal &= ~MaskVal;
	RegVal |= ((Vs && 0x10) <<
			XHDMIPHY1_TX_DRIVER_EXT_TXDIFFCTRL_SHIFT(ChId));
	XHdmiphy1_WriteReg(InstancePtr->Config.BaseAddr,
			XHDMIPHY1_TX_DRIVER_EXT_REG, RegVal);
}
/*****************************************************************************/
/**
* This function will set the TX voltage swing value for a given channel.
*
* @param	InstancePtr is a pointer to the XHdmiphy1 core instance.
* @param	QuadId is the GT quad ID to operate on.
* @param	ChId is the channel ID to operate on.
* @param	Vs is the voltage swing value to write.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
This function will set the TX voltage swing value for a given channel.
This function will set the TX voltage swing value for a given channel .
void XHdmiphy1_SetTxVoltageSwing(XHdmiphy1 *InstancePtr, u8 QuadId,
		XHdmiphy1_ChannelId ChId, u8 Vs)
{
	u32 RegVal;
	u32 MaskVal;
	u32 RegOffset;
	QuadId = QuadId;
	if ((ChId == XHDMIPHY1_CHANNEL_ID_CH1) ||
        (ChId == XHDMIPHY1_CHANNEL_ID_CH2)) {
		RegOffset = XHDMIPHY1_TX_DRIVER_CH12_REG;
	}
	else {
		RegOffset = XHDMIPHY1_TX_DRIVER_CH34_REG;
	}
	RegVal = XHdmiphy1_ReadReg(InstancePtr->Config.BaseAddr, RegOffset);
	MaskVal = XHDMIPHY1_TX_DRIVER_TXDIFFCTRL_MASK(ChId);
	RegVal &= ~MaskVal;
	RegVal |= ((Vs & 0xF) << XHDMIPHY1_TX_DRIVER_TXDIFFCTRL_SHIFT(ChId));
	XHdmiphy1_WriteReg(InstancePtr->Config.BaseAddr, RegOffset, RegVal);
	RegVal = XHdmiphy1_ReadReg(InstancePtr->Config.BaseAddr,
				XHDMIPHY1_TX_DRIVER_EXT_REG);
	MaskVal = XHDMIPHY1_TX_DRIVER_EXT_TXDIFFCTRL_MASK(ChId);
	RegVal &= ~MaskVal;
	RegVal |= ((Vs && 0x10) <<
			XHDMIPHY1_TX_DRIVER_EXT_TXDIFFCTRL_SHIFT(ChId));
	XHdmiphy1_WriteReg(InstancePtr->Config.BaseAddr,
			XHDMIPHY1_TX_DRIVER_EXT_REG, RegVal);
}
void XHdmiphy1_SetTxVoltageSwing ( XHdmiphy1 * InstancePtr , u8 QuadId , XHdmiphy1_ChannelId ChId , u8 Vs ) { u32 RegVal ; u32 MaskVal ; u32 RegOffset ; QuadId = QuadId ; if ( ( ChId == XHDMIPHY1_CHANNEL_ID_CH1 ) || ( ChId == XHDMIPHY1_CHANNEL_ID_CH2 ) ) { RegOffset = XHDMIPHY1_TX_DRIVER_CH12_REG ; } else { RegOffset = XHDMIPHY1_TX_DRIVER_CH34_REG ; } RegVal = XHdmiphy1_ReadReg ( InstancePtr -> Config . BaseAddr , RegOffset ) ; MaskVal = XHDMIPHY1_TX_DRIVER_TXDIFFCTRL_MASK ( ChId ) ; RegVal &= ~ MaskVal ; RegVal |= ( ( Vs & 0xF ) << XHDMIPHY1_TX_DRIVER_TXDIFFCTRL_SHIFT ( ChId ) ) ; XHdmiphy1_WriteReg ( InstancePtr -> Config . BaseAddr , RegOffset , RegVal ) ; RegVal = XHdmiphy1_ReadReg ( InstancePtr -> Config . BaseAddr , XHDMIPHY1_TX_DRIVER_EXT_REG ) ; MaskVal = XHDMIPHY1_TX_DRIVER_EXT_TXDIFFCTRL_MASK ( ChId ) ; RegVal &= ~ MaskVal ; RegVal |= ( ( Vs && 0x10 ) << XHDMIPHY1_TX_DRIVER_EXT_TXDIFFCTRL_SHIFT ( ChId ) ) ; XHdmiphy1_WriteReg ( InstancePtr -> Config . BaseAddr , XHDMIPHY1_TX_DRIVER_EXT_REG , RegVal ) ; }
This function will set the TX voltage swing value for a given channel.
This function will set the TX voltage swing value for a given channel .
/* Suppress Warning Messages */