XilinxProcessorIPLib/drivers/dppsu/src/xdppsu_serdes.c
void XDpPsu_SetVswingPreemp(XDpPsu *InstancePtr, u8 *AuxData)
{
	u8 Data = 0;
	u8 VsLevelRx = InstancePtr->LinkConfig.VsLevel;
	u8 PeLevelRx = InstancePtr->LinkConfig.PeLevel;

	/* The maximum voltage swing has been reached. */
	if (VsLevelRx >= XDPPSU_MAXIMUM_VS_LEVEL) {
		Data |= XDPPSU_DPCD_TRAINING_LANEX_SET_MAX_VS_MASK;
	}
	/* The maximum pre-emphasis level has been reached. */
	if (PeLevelRx >= XDPPSU_MAXIMUM_PE_LEVEL) {
		Data |= XDPPSU_DPCD_TRAINING_LANEX_SET_MAX_PE_MASK;
	}
	/* Set up the data buffer for writing to the RX device. */
	Data |= (PeLevelRx << XDPPSU_DPCD_TRAINING_LANEX_SET_PE_SHIFT) |
								VsLevelRx;
	memset(AuxData, Data, 4);

	XDpPsu_SetSerdesVswingPreemp(InstancePtr);
	return;
}
/******************************************************************************/
/**
 * This function sets current voltage swing and pre-emphasis level settings from
 * the LinkConfig structure to hardware.
 *
 * @param	InstancePtr is a pointer to the XDpPsu instance.
 * @param	AuxData is a pointer to the array used for preparing a burst
 *		write over the AUX channel.
 *
 * @return
 *		- XST_SUCCESS if writing the settings was successful.
 *		- XST_FAILURE otherwise.
 *
 * @note	None.
*******************************************************************************/
This function sets current voltage swing and pre-emphasis level settings from
the LinkConfig structure to hardware.

@param       InstancePtr is a pointer to the XDpPsu instance.
@param       AuxData is a pointer to the array used for preparing a burst
write over the AUX channel.

@return
- XST_SUCCESS if writing the settings was successful.

@note        None.
This function sets current voltage swing and pre - emphasis level settings from the LinkConfig structure to hardware . @param InstancePtr is a pointer to the XDpPsu instance . @param AuxData is a pointer to the array used for preparing a burst write over the AUX channel . @return - XST_SUCCESS if writing the settings was successful . @note None .
void XDpPsu_SetVswingPreemp(XDpPsu *InstancePtr, u8 *AuxData)
{
	u8 Data = 0;
	u8 VsLevelRx = InstancePtr->LinkConfig.VsLevel;
	u8 PeLevelRx = InstancePtr->LinkConfig.PeLevel;
	if (VsLevelRx >= XDPPSU_MAXIMUM_VS_LEVEL) {
		Data |= XDPPSU_DPCD_TRAINING_LANEX_SET_MAX_VS_MASK;
	}
	if (PeLevelRx >= XDPPSU_MAXIMUM_PE_LEVEL) {
		Data |= XDPPSU_DPCD_TRAINING_LANEX_SET_MAX_PE_MASK;
	}
	Data |= (PeLevelRx << XDPPSU_DPCD_TRAINING_LANEX_SET_PE_SHIFT) |
								VsLevelRx;
	memset(AuxData, Data, 4);
	XDpPsu_SetSerdesVswingPreemp(InstancePtr);
	return;
}
void XDpPsu_SetVswingPreemp ( XDpPsu * InstancePtr , u8 * AuxData ) { u8 Data = 0 ; u8 VsLevelRx = InstancePtr -> LinkConfig . VsLevel ; u8 PeLevelRx = InstancePtr -> LinkConfig . PeLevel ; if ( VsLevelRx >= XDPPSU_MAXIMUM_VS_LEVEL ) { Data |= XDPPSU_DPCD_TRAINING_LANEX_SET_MAX_VS_MASK ; } if ( PeLevelRx >= XDPPSU_MAXIMUM_PE_LEVEL ) { Data |= XDPPSU_DPCD_TRAINING_LANEX_SET_MAX_PE_MASK ; } Data |= ( PeLevelRx << XDPPSU_DPCD_TRAINING_LANEX_SET_PE_SHIFT ) | VsLevelRx ; memset ( AuxData , Data , 4 ) ; XDpPsu_SetSerdesVswingPreemp ( InstancePtr ) ; return ; }
This function sets current voltage swing and pre-emphasis level settings from
 the LinkConfig structure to hardware.
This function sets current voltage swing and pre - emphasis level settings from the LinkConfig structure to hardware .
/* The maximum voltage swing has been reached. */ /* The maximum pre-emphasis level has been reached. */ /* Set up the data buffer for writing to the RX device. */