XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x_rx.c
static void XHdcp1x_RxUpdateRi(XHdcp1x *InstancePtr)
{
	char LogBuf[20];
	u8 Buf[4];
	u16 Ri = 0;
	u16 RememberRi = 0;

	/* Read Ri */
	Ri = XHdcp1x_CipherGetRi(InstancePtr);

	/* Update RememberRi */
	RememberRi = Ri;

	/* Initialize theBuf */
	memset(Buf, 0, 4);
	XHDCP1X_PORT_UINT_TO_BUF(Buf, Ri, XHDCP1X_PORT_SIZE_RO * 8);

	/* Update the value of Ro' */
	XHdcp1x_PortWrite(InstancePtr, XHDCP1X_PORT_OFFSET_RO,
			Buf, sizeof(Ri));

#if defined(XHDCP1X_PORT_BIT_BSTATUS_RO_AVAILABLE)
	/* Update the Bstatus to indicate Ro' available */
	XHdcp1x_PortRead(InstancePtr, XHDCP1X_PORT_OFFSET_BSTATUS, Buf,
			XHDCP1X_PORT_SIZE_BSTATUS);
	Buf[0] |= XHDCP1X_PORT_BIT_BSTATUS_RO_AVAILABLE;
	XHdcp1x_PortWrite(InstancePtr, XHDCP1X_PORT_OFFSET_BSTATUS, Buf,
			XHDCP1X_PORT_SIZE_BSTATUS);
#endif

	/* Update statistics */
	InstancePtr->Rx.Stats.RiUpdates++;

	/* Determine theLogBuf */
	snprintf(LogBuf, 20, "update Ri (%04X)", RememberRi);

	/* Log */
	XHdcp1x_RxDebugLog(InstancePtr, LogBuf);
}
/*****************************************************************************/
/**
* This function updates the Ro'/Ri' register of the state machine.
*
* @param	InstancePtr is the receiver instance.
* @param	NextStatePtr is the next state.
*
* @return	None.
*
* @note		This function has to save the value of Ri (in RememberRi) as
*		the macro that converts from a uint16 to a HDCP buffer
*		destroys the original value.
*
******************************************************************************/
This function updates the Ro'/Ri' register of the state machine.
This function updates the Ro ' / Ri ' register of the state machine .
static void XHdcp1x_RxUpdateRi(XHdcp1x *InstancePtr)
{
	char LogBuf[20];
	u8 Buf[4];
	u16 Ri = 0;
	u16 RememberRi = 0;
	Ri = XHdcp1x_CipherGetRi(InstancePtr);
	RememberRi = Ri;
	memset(Buf, 0, 4);
	XHDCP1X_PORT_UINT_TO_BUF(Buf, Ri, XHDCP1X_PORT_SIZE_RO * 8);
	XHdcp1x_PortWrite(InstancePtr, XHDCP1X_PORT_OFFSET_RO,
			Buf, sizeof(Ri));
#if defined(XHDCP1X_PORT_BIT_BSTATUS_RO_AVAILABLE)
	XHdcp1x_PortRead(InstancePtr, XHDCP1X_PORT_OFFSET_BSTATUS, Buf,
			XHDCP1X_PORT_SIZE_BSTATUS);
	Buf[0] |= XHDCP1X_PORT_BIT_BSTATUS_RO_AVAILABLE;
	XHdcp1x_PortWrite(InstancePtr, XHDCP1X_PORT_OFFSET_BSTATUS, Buf,
			XHDCP1X_PORT_SIZE_BSTATUS);
#endif
	InstancePtr->Rx.Stats.RiUpdates++;
	snprintf(LogBuf, 20, "update Ri (%04X)", RememberRi);
	XHdcp1x_RxDebugLog(InstancePtr, LogBuf);
}
static void XHdcp1x_RxUpdateRi ( XHdcp1x * InstancePtr ) { char LogBuf [ 20 ] ; u8 Buf [ 4 ] ; u16 Ri = 0 ; u16 RememberRi = 0 ; Ri = XHdcp1x_CipherGetRi ( InstancePtr ) ; RememberRi = Ri ; memset ( Buf , 0 , 4 ) ; XHDCP1X_PORT_UINT_TO_BUF ( Buf , Ri , XHDCP1X_PORT_SIZE_RO * 8 ) ; XHdcp1x_PortWrite ( InstancePtr , XHDCP1X_PORT_OFFSET_RO , Buf , sizeof ( Ri ) ) ; #if defined ( XHDCP1X_PORT_BIT_BSTATUS_RO_AVAILABLE ) XHdcp1x_PortRead ( InstancePtr , XHDCP1X_PORT_OFFSET_BSTATUS , Buf , XHDCP1X_PORT_SIZE_BSTATUS ) ; Buf [ 0 ] |= XHDCP1X_PORT_BIT_BSTATUS_RO_AVAILABLE ; XHdcp1x_PortWrite ( InstancePtr , XHDCP1X_PORT_OFFSET_BSTATUS , Buf , XHDCP1X_PORT_SIZE_BSTATUS ) ; #endif InstancePtr -> Rx . Stats . RiUpdates ++ ; snprintf ( LogBuf , 20 , " " , RememberRi ) ; XHdcp1x_RxDebugLog ( InstancePtr , LogBuf ) ; }
This function updates the Ro'/Ri' register of the state machine.
This function updates the Ro ' / Ri ' register of the state machine .
/* Read Ri */ /* Update RememberRi */ /* Initialize theBuf */ /* Update the value of Ro' */ /* Update the Bstatus to indicate Ro' available */ /* Update statistics */ /* Determine theLogBuf */ /* Log */