XilinxProcessorIPLib/drivers/hdcp22_tx_dp/src/xhdcp22_tx.c
static XHdcp22_Tx_PairingInfo *XHdcp22Tx_GetPairingInfo(XHdcp22_Tx *InstancePtr,
	                                                     const u8 *ReceiverId)
{
	int i = 0;
	u8 IllegalRecvID[] = {0x0, 0x0, 0x0, 0x0, 0x0};
	XHdcp22_Tx_PairingInfo * PairingInfoPtr = NULL;

	/* Check for illegal Receiver ID */
	if (memcmp(ReceiverId, IllegalRecvID, XHDCP22_TX_CERT_RCVID_SIZE) == 0) {
		return NULL;
	}

	for (i=0; i<XHDCP22_TX_MAX_STORED_PAIRINGINFO; i++) {
		PairingInfoPtr = &InstancePtr->Info.PairingInfo[i];
		if (memcmp(ReceiverId, PairingInfoPtr->ReceiverId,
		           XHDCP22_TX_CERT_RCVID_SIZE) == 0) {
			return PairingInfoPtr;
		}
	}
	return NULL;
}
/*****************************************************************************/
/**
*
* This function gets a stored pairing info entry from the storage.
*
* @param  ReceiverId is a pointer to a 5-byte receiver Id.
*
* @return A pointer to the found ReceiverId or NULL if the pairing info wasn't
*         stored yet.
*
* @note   None.
*
******************************************************************************/
This function gets a stored pairing info entry from the storage.
This function gets a stored pairing info entry from the storage .
static XHdcp22_Tx_PairingInfo *XHdcp22Tx_GetPairingInfo(XHdcp22_Tx *InstancePtr,
	                                                     const u8 *ReceiverId)
{
	int i = 0;
	u8 IllegalRecvID[] = {0x0, 0x0, 0x0, 0x0, 0x0};
	XHdcp22_Tx_PairingInfo * PairingInfoPtr = NULL;
	if (memcmp(ReceiverId, IllegalRecvID, XHDCP22_TX_CERT_RCVID_SIZE) == 0) {
		return NULL;
	}
	for (i=0; i<XHDCP22_TX_MAX_STORED_PAIRINGINFO; i++) {
		PairingInfoPtr = &InstancePtr->Info.PairingInfo[i];
		if (memcmp(ReceiverId, PairingInfoPtr->ReceiverId,
		           XHDCP22_TX_CERT_RCVID_SIZE) == 0) {
			return PairingInfoPtr;
		}
	}
	return NULL;
}
static XHdcp22_Tx_PairingInfo * XHdcp22Tx_GetPairingInfo ( XHdcp22_Tx * InstancePtr , const u8 * ReceiverId ) { int i = 0 ; u8 IllegalRecvID [ ] = { 0x0 , 0x0 , 0x0 , 0x0 , 0x0 } ; XHdcp22_Tx_PairingInfo * PairingInfoPtr = NULL ; if ( memcmp ( ReceiverId , IllegalRecvID , XHDCP22_TX_CERT_RCVID_SIZE ) == 0 ) { return NULL ; } for ( i = 0 ; i < XHDCP22_TX_MAX_STORED_PAIRINGINFO ; i ++ ) { PairingInfoPtr = & InstancePtr -> Info . PairingInfo [ i ] ; if ( memcmp ( ReceiverId , PairingInfoPtr -> ReceiverId , XHDCP22_TX_CERT_RCVID_SIZE ) == 0 ) { return PairingInfoPtr ; } } return NULL ; }
This function gets a stored pairing info entry from the storage.
This function gets a stored pairing info entry from the storage .
/* Check for illegal Receiver ID */