diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdp.c b/XilinxProcessorIPLib/drivers/dp/src/xdp.c index d60eb397..8bf42d24 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdp.c +++ b/XilinxProcessorIPLib/drivers/dp/src/xdp.c @@ -194,7 +194,7 @@ void XDp_CfgInitialize(XDp *InstancePtr, XDp_Config *ConfigPtr, InstancePtr->Config.IsRx = ConfigPtr->IsRx; - if (XDp_CfgGetCoreType(ConfigPtr) == XDP_TX) { + if (XDp_GetCoreType(InstancePtr) == XDP_TX) { /* Set the DisplayPort TX's voltage swing and pre-emphasis * levels to their defaults. */ XDp_TxCfgTxVsOffset(InstancePtr, XDP_TX_VS_LEVEL_OFFSET); @@ -234,7 +234,7 @@ u32 XDp_Initialize(XDp *InstancePtr) Xil_AssertNonvoid(InstancePtr != NULL); Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY); - if (XDp_CfgGetCoreType(&InstancePtr->Config) == XDP_TX) { + if (XDp_GetCoreType(InstancePtr) == XDP_TX) { Status = XDp_TxInitialize(InstancePtr); } else { @@ -3044,7 +3044,7 @@ static u32 XDp_WaitPhyReady(XDp *InstancePtr, u32 Mask) u32 PhyStatus; u32 RegPhyStatus; - if (XDp_CfgGetCoreType(&InstancePtr->Config) == XDP_TX) { + if (XDp_GetCoreType(InstancePtr) == XDP_TX) { RegPhyStatus = XDP_TX_PHY_STATUS; } else { diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdp.h b/XilinxProcessorIPLib/drivers/dp/src/xdp.h index 993a94f5..7b1ddcbc 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdp.h +++ b/XilinxProcessorIPLib/drivers/dp/src/xdp.h @@ -947,20 +947,20 @@ void XDp_RxSetUserPixelWidth(XDp *InstancePtr, u8 UserPixelWidth); /******************************************************************************/ /** - * This is function determines whether the DisplayPort core that the - * configuration structure represents is a transmitter (TX) or a receiver (RX). + * This is function determines whether the DisplayPort core, represented by the + * XDp structure pointed to, is a transmitter (TX) or a receiver (RX). * - * @param ConfigPtr is a pointer to the DisplayPort core's configuration - * structure. + * @param InstancePtr is a pointer to the XDp instance. * - * @return XDP_RX if the configuration structure is for a core of type RX. - * XDP_TX if the configuration structure is for a core of type TX. + * @return XDP_RX if the core is of type RX. + * XDP_TX if the core is of type TX. * * @note C-style signature: - * u32 XDp_CfgGetCoreType(XDp_Config *ConfigPtr) + * u32 XDp_GetCoreType(XDp *InstancePtr) * *******************************************************************************/ -#define XDp_CfgGetCoreType(ConfigPtr) ((ConfigPtr)->IsRx ? XDP_RX : XDP_TX) +#define XDp_GetCoreType(InstancePtr) ((InstancePtr)->Config.IsRx \ + ? XDP_RX : XDP_TX) /******************************* Compatibility ********************************/ diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdp_intr.c b/XilinxProcessorIPLib/drivers/dp/src/xdp_intr.c index 5d4beb66..04955c6f 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdp_intr.c +++ b/XilinxProcessorIPLib/drivers/dp/src/xdp_intr.c @@ -80,7 +80,7 @@ void XDp_InterruptHandler(XDp *InstancePtr) Xil_AssertVoid(InstancePtr != NULL); Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY); - if (XDp_CfgGetCoreType(&InstancePtr->Config) == XDP_TX) { + if (XDp_GetCoreType(InstancePtr) == XDP_TX) { XDp_TxInterruptHandler(InstancePtr); } else { diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdp_selftest.c b/XilinxProcessorIPLib/drivers/dp/src/xdp_selftest.c index c4a2d0c6..905a7859 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdp_selftest.c +++ b/XilinxProcessorIPLib/drivers/dp/src/xdp_selftest.c @@ -230,7 +230,7 @@ u32 XDp_SelfTest(XDp *InstancePtr) Xil_AssertNonvoid(InstancePtr != NULL); Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY); - if (XDp_CfgGetCoreType(&InstancePtr->Config) == XDP_TX) { + if (XDp_GetCoreType(InstancePtr) == XDP_TX) { Status = XDp_TxSelfTest(InstancePtr); } else {