XilinxProcessorIPLib/drivers/dsi/src/xdsi_intr.c
s32 XDsi_SetCallback(XDsi *InstancePtr, u32 HandleType,
		void *CallbackFunc, void *CallbackRef)
{
	/* Verify arguments */
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(CallbackRef != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);

	switch (HandleType) {
	case XDSI_HANDLER_UNSUPPORT_DATATYPE:
		InstancePtr->UnSupportedDataTypeCallback = CallbackFunc;
		InstancePtr->UnsupportDataTypeRef = CallbackRef;
		break;

	case XDSI_HANDLER_PIXELDATA_UNDERRUN:
		InstancePtr->PixelDataUnderrunCallback = CallbackFunc;
		InstancePtr->PixelDataUnderrundRef = CallbackRef;
		break;

	case XDSI_HANDLER_CMDQ_FIFOFULL:
		InstancePtr->CmdQFIFOFullCallback = CallbackFunc;
		InstancePtr->CmdQFIFOFullRef = CallbackRef;
		break;

	case XDSI_HANDLER_OTHERERROR:
		InstancePtr->ErrorCallback = CallbackFunc;
		InstancePtr->ErrRef = CallbackRef;
		break;

	default:
		/* Invalid value of HandleType */
		return XST_INVALID_PARAM;
	}

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This routine installs an asynchronous callback function for the given
* HandlerType:
*
* <pre>
*
* HandlerType			Invoked by this driver when:
* -----------------------  --------------------------------------------------
* XDSI_HANDLER_UNSUPPORT_DATATYPE Un support data type detected
* XDSI_HANDLER_PIXELDATA_UNDERRUN Byte stream FIFO starves for Pixel during
* 				  HACT transmission
* XDSI_HANDLER_OTHERERROR  Any other type of interrupt has occured like
* 			   Stream Line Buffer Full, Incorrect Lanes, etc
* XDSI_HANDLER_CMDQ_FIFOFULL Command queue FIFO full
*
* </pre>
*
* @param	InstancePtr is the XDsi instance to operate on
* @param 	HandleType is the type of call back to be registered.
* @param	CallbackFunc is the pointer to a call back funtion which
* 		is called when a particular event occurs.
* @param 	CallbackRef is a void pointer to data to be referenced to
* 		by the CallbackFunc
*
* @return
* 		- XST_SUCCESS when handler is installed.
*		- 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 routine installs an asynchronous callback function for the given
HandlerType.



HandlerType                    Invoked by this driver when.

XDSI_HANDLER_UNSUPPORT_DATATYPE Un support data type detected
XDSI_HANDLER_PIXELDATA_UNDERRUN Byte stream FIFO starves for Pixel during
HACT transmission
XDSI_HANDLER_OTHERERROR  Any other type of interrupt has occured like
Stream Line Buffer Full, Incorrect Lanes, etc
XDSI_HANDLER_CMDQ_FIFOFULL Command queue FIFO full


This routine installs an asynchronous callback function for the given HandlerType . HandlerType Invoked by this driver when . XDSI_HANDLER_UNSUPPORT_DATATYPE Un support data type detected XDSI_HANDLER_PIXELDATA_UNDERRUN Byte stream FIFO starves for Pixel during HACT transmission XDSI_HANDLER_OTHERERROR Any other type of interrupt has occured like Stream Line Buffer Full Incorrect Lanes etc XDSI_HANDLER_CMDQ_FIFOFULL Command queue FIFO full
s32 XDsi_SetCallback(XDsi *InstancePtr, u32 HandleType,
		void *CallbackFunc, void *CallbackRef)
{
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(CallbackRef != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	switch (HandleType) {
	case XDSI_HANDLER_UNSUPPORT_DATATYPE:
		InstancePtr->UnSupportedDataTypeCallback = CallbackFunc;
		InstancePtr->UnsupportDataTypeRef = CallbackRef;
		break;
	case XDSI_HANDLER_PIXELDATA_UNDERRUN:
		InstancePtr->PixelDataUnderrunCallback = CallbackFunc;
		InstancePtr->PixelDataUnderrundRef = CallbackRef;
		break;
	case XDSI_HANDLER_CMDQ_FIFOFULL:
		InstancePtr->CmdQFIFOFullCallback = CallbackFunc;
		InstancePtr->CmdQFIFOFullRef = CallbackRef;
		break;
	case XDSI_HANDLER_OTHERERROR:
		InstancePtr->ErrorCallback = CallbackFunc;
		InstancePtr->ErrRef = CallbackRef;
		break;
	default:
		return XST_INVALID_PARAM;
	}
	return XST_SUCCESS;
}
s32 XDsi_SetCallback ( XDsi * InstancePtr , u32 HandleType , void * CallbackFunc , void * CallbackRef ) { Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( CallbackRef != NULL ) ; Xil_AssertNonvoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; switch ( HandleType ) { case XDSI_HANDLER_UNSUPPORT_DATATYPE : InstancePtr -> UnSupportedDataTypeCallback = CallbackFunc ; InstancePtr -> UnsupportDataTypeRef = CallbackRef ; break ; case XDSI_HANDLER_PIXELDATA_UNDERRUN : InstancePtr -> PixelDataUnderrunCallback = CallbackFunc ; InstancePtr -> PixelDataUnderrundRef = CallbackRef ; break ; case XDSI_HANDLER_CMDQ_FIFOFULL : InstancePtr -> CmdQFIFOFullCallback = CallbackFunc ; InstancePtr -> CmdQFIFOFullRef = CallbackRef ; break ; case XDSI_HANDLER_OTHERERROR : InstancePtr -> ErrorCallback = CallbackFunc ; InstancePtr -> ErrRef = CallbackRef ; break ; default : return XST_INVALID_PARAM ; } return XST_SUCCESS ; }
This routine installs an asynchronous callback function for the given
HandlerType:
This routine installs an asynchronous callback function for the given HandlerType :
/* Verify arguments */ /* Invalid value of HandleType */