XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x_intr.c
int XHdcp1x_SetCallback(XHdcp1x *InstancePtr, XHdcp1x_HandlerType HandlerType,
		void *CallbackFunc, void *CallbackRef)
{
	/* Verify arguments. */
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(HandlerType > (XHDCP1X_HANDLER_UNDEFINED));
	Xil_AssertNonvoid(HandlerType < (XHDCP1X_HANDLER_INVALID));
	Xil_AssertNonvoid(CallbackFunc != NULL);
	Xil_AssertNonvoid(CallbackRef != NULL);

	u32 Status;

	/* Check for TX */
	if (!InstancePtr->Config.IsRx) {
		Status = XHdcp1x_TxSetCallback(InstancePtr, HandlerType,
			CallbackFunc, CallbackRef);
	}
	/* Check for RX */
	else if (InstancePtr->Config.IsRx) {
		Status = XHdcp1x_RxSetCallback(InstancePtr, HandlerType,
			CallbackFunc, CallbackRef);
	}
	else {
		Status = XST_FAILURE;
	}

	return (Status);
}
/*****************************************************************************/
/**
* This function installs callback functions for the given HandlerType.
*
* @param	InstancePtr is a pointer to the HDCP core instance.
* @param	HandlerType specifies the type of handler.
* @param	CallbackFunc is the address of the callback function.
* @param	CallbackRef is a user data item that will be passed to the
*		callback function when it is invoked.
*
* @return
*		- XST_SUCCESS if callback function installed successfully.
*		- XST_INVALID_PARAM when HandlerType is invalid.
*
* @note		Invoking this function for a handler that already has been
*		installed replaces it with the new handler.
*
******************************************************************************/
This function installs callback functions for the given HandlerType.
This function installs callback functions for the given HandlerType .
int XHdcp1x_SetCallback(XHdcp1x *InstancePtr, XHdcp1x_HandlerType HandlerType,
		void *CallbackFunc, void *CallbackRef)
{
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(HandlerType > (XHDCP1X_HANDLER_UNDEFINED));
	Xil_AssertNonvoid(HandlerType < (XHDCP1X_HANDLER_INVALID));
	Xil_AssertNonvoid(CallbackFunc != NULL);
	Xil_AssertNonvoid(CallbackRef != NULL);
	u32 Status;
	if (!InstancePtr->Config.IsRx) {
		Status = XHdcp1x_TxSetCallback(InstancePtr, HandlerType,
			CallbackFunc, CallbackRef);
	}
	else if (InstancePtr->Config.IsRx) {
		Status = XHdcp1x_RxSetCallback(InstancePtr, HandlerType,
			CallbackFunc, CallbackRef);
	}
	else {
		Status = XST_FAILURE;
	}
	return (Status);
}
int XHdcp1x_SetCallback ( XHdcp1x * InstancePtr , XHdcp1x_HandlerType HandlerType , void * CallbackFunc , void * CallbackRef ) { Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( HandlerType > ( XHDCP1X_HANDLER_UNDEFINED ) ) ; Xil_AssertNonvoid ( HandlerType < ( XHDCP1X_HANDLER_INVALID ) ) ; Xil_AssertNonvoid ( CallbackFunc != NULL ) ; Xil_AssertNonvoid ( CallbackRef != NULL ) ; u32 Status ; if ( ! InstancePtr -> Config . IsRx ) { Status = XHdcp1x_TxSetCallback ( InstancePtr , HandlerType , CallbackFunc , CallbackRef ) ; } else if ( InstancePtr -> Config . IsRx ) { Status = XHdcp1x_RxSetCallback ( InstancePtr , HandlerType , CallbackFunc , CallbackRef ) ; } else { Status = XST_FAILURE ; } return ( Status ) ; }
This function installs callback functions for the given HandlerType.
This function installs callback functions for the given HandlerType .
/* Verify arguments. */ /* Check for TX */ /* Check for RX */