hdcp1x: Added top-level config structure.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com> Acked-by: Shadul Shaikh <shaduls@xilinx.com>
This commit is contained in:
parent
4f0202854d
commit
86b9f04fd3
2 changed files with 12 additions and 8 deletions
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue