XilinxProcessorIPLib/drivers/v_demosaic/src/xv_demosaic_intr.c
void XVDemosaic_SetCallback(XV_demosaic *InstancePtr, u32 HandlerType,
		void *CallbackFunc, void *CallbackRef)
{
	u32 Status;

	/* Verify arguments. */
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(HandlerType >= (XVDEMOSAIC_HANDLER_DONE));
	Xil_AssertNonvoid(CallbackFunc != NULL);
	Xil_AssertNonvoid(CallbackRef != NULL);

	/* Check for handler type */
	switch (HandlerType) {
		case (XVDEMOSAIC_HANDLER_DONE):
			InstancePtr->FrameDoneCallback = (XVDemosaic_Callback)CallbackFunc;
			InstancePtr->CallbackDoneRef = CallbackRef;
			Status = (XST_SUCCESS);
			break;
		case (XVDEMOSAIC_HANDLER_READY):
			InstancePtr->FrameReadyCallback = (XVDemosaic_Callback)CallbackFunc;
			InstancePtr->CallbackReadyRef = CallbackRef;
			Status = (XST_SUCCESS);
			break;
		default:
			Status = (XST_INVALID_PARAM);
			break;
	}
}
/*****************************************************************************/
/**
 *
 * This function installs an asynchronous callback function for the given
 * HandlerType:
 *
 * <pre>
 * HandlerType                     Callback Function Type
 * -----------------------         --------------------------------------------------
 * (XVDEMOSAIC_HANDLER_DONE)       DoneCallback
 * (XVDEMOSAIC_HANDLER_READY)      ReadyCallback
 *
 * @param    InstancePtr is a pointer to the Demosaic IP instance.
 * @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	None.
 *
 * @note     Invoking this function for a handler that already has been
 *       installed replaces it with the new handler.
 *
 ******************************************************************************/
This function installs an asynchronous callback function for the given
HandlerType.



@param    InstancePtr is a pointer to the Demosaic IP instance.
@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      None.

@note     Invoking this function for a handler that already has been
installed replaces it with the new handler.
This function installs an asynchronous callback function for the given HandlerType . @param InstancePtr is a pointer to the Demosaic IP instance . @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 None . @note Invoking this function for a handler that already has been installed replaces it with the new handler .
void XVDemosaic_SetCallback(XV_demosaic *InstancePtr, u32 HandlerType,
		void *CallbackFunc, void *CallbackRef)
{
	u32 Status;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(HandlerType >= (XVDEMOSAIC_HANDLER_DONE));
	Xil_AssertNonvoid(CallbackFunc != NULL);
	Xil_AssertNonvoid(CallbackRef != NULL);
	switch (HandlerType) {
		case (XVDEMOSAIC_HANDLER_DONE):
			InstancePtr->FrameDoneCallback = (XVDemosaic_Callback)CallbackFunc;
			InstancePtr->CallbackDoneRef = CallbackRef;
			Status = (XST_SUCCESS);
			break;
		case (XVDEMOSAIC_HANDLER_READY):
			InstancePtr->FrameReadyCallback = (XVDemosaic_Callback)CallbackFunc;
			InstancePtr->CallbackReadyRef = CallbackRef;
			Status = (XST_SUCCESS);
			break;
		default:
			Status = (XST_INVALID_PARAM);
			break;
	}
}
void XVDemosaic_SetCallback ( XV_demosaic * InstancePtr , u32 HandlerType , void * CallbackFunc , void * CallbackRef ) { u32 Status ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( HandlerType >= ( XVDEMOSAIC_HANDLER_DONE ) ) ; Xil_AssertNonvoid ( CallbackFunc != NULL ) ; Xil_AssertNonvoid ( CallbackRef != NULL ) ; switch ( HandlerType ) { case ( XVDEMOSAIC_HANDLER_DONE ) : InstancePtr -> FrameDoneCallback = ( XVDemosaic_Callback ) CallbackFunc ; InstancePtr -> CallbackDoneRef = CallbackRef ; Status = ( XST_SUCCESS ) ; break ; case ( XVDEMOSAIC_HANDLER_READY ) : InstancePtr -> FrameReadyCallback = ( XVDemosaic_Callback ) CallbackFunc ; InstancePtr -> CallbackReadyRef = CallbackRef ; Status = ( XST_SUCCESS ) ; break ; default : Status = ( XST_INVALID_PARAM ) ; break ; } }
This function installs an asynchronous callback function for the given
 HandlerType:
This function installs an asynchronous callback function for the given HandlerType :
/* Verify arguments. */ /* Check for handler type */