diff --git a/XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x.c b/XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x.c index 904cc575..54491261 100644 --- a/XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x.c +++ b/XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x.c @@ -104,7 +104,7 @@ XHdcp1x_TimerDelay XHdcp1xTimerDelay = NULL; * @note None. * ******************************************************************************/ -#define IsRX(InstancePtr) ((InstancePtr)->Common.CfgPtr->IsRx) +#define IsRX(InstancePtr) ((InstancePtr)->Config.IsRx) /*****************************************************************************/ /** @@ -117,7 +117,7 @@ XHdcp1x_TimerDelay XHdcp1xTimerDelay = NULL; * @note None. * ******************************************************************************/ -#define IsTX(InstancePtr) (!(InstancePtr)->Common.CfgPtr->IsRx) +#define IsTX(InstancePtr) (!(InstancePtr)->Config.IsRx) /*****************************************************************************/ /** @@ -130,7 +130,7 @@ XHdcp1x_TimerDelay XHdcp1xTimerDelay = NULL; * @note None. * ******************************************************************************/ -#define IsDP(InstancePtr) (!(InstancePtr)->Common.CfgPtr->IsHDMI) +#define IsDP(InstancePtr) (!(InstancePtr)->Config.IsHDMI) /*****************************************************************************/ /** @@ -143,7 +143,7 @@ XHdcp1x_TimerDelay XHdcp1xTimerDelay = NULL; * @note None. * ******************************************************************************/ -#define IsHDMI(InstancePtr) ((InstancePtr)->Common.CfgPtr->IsHDMI) +#define IsHDMI(InstancePtr) ((InstancePtr)->Config.IsHDMI) /************************** Function Definitions *****************************/ @@ -177,6 +177,7 @@ int XHdcp1x_CfgInitialize(XHdcp1x *InstancePtr, const XHdcp1x_Config *CfgPtr, /* Initialize InstancePtr */ memset(InstancePtr, 0, sizeof(XHdcp1x)); InstancePtr->Common.CfgPtr = CfgPtr; + InstancePtr->Config = *CfgPtr; #if defined(INCLUDE_TX) /* Check for TX */ diff --git a/XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x.h b/XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x.h index 9055f1e3..5cc7c858 100644 --- a/XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x.h +++ b/XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x.h @@ -211,10 +211,13 @@ typedef struct { /** * This typedef contains an instance of an HDCP interface */ -typedef union { - XHdcp1x_Common Common; /**< The common interface elements */ - XHdcp1x_Tx Tx; /**< The transmit interface elements */ - XHdcp1x_Rx Rx; /**< The receive interface elements */ +typedef struct { + XHdcp1x_Config Config; /**< The core config */ + union { + XHdcp1x_Common Common; /**< The common interface elements */ + XHdcp1x_Tx Tx; /**< The transmit interface elements */ + XHdcp1x_Rx Rx; /**< The receive interface elements */ + }; } XHdcp1x; /**