dp: rx: Added callback for valid video interrupts.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
Andrei-Liviu Simion 2015-01-16 14:31:14 -08:00 committed by Nava kishore Manne
parent 937ccc287c
commit 134b32d770
2 changed files with 35 additions and 0 deletions

View file

@ -125,6 +125,12 @@ typedef struct {
passed to the training
lost callback
function. */
XDptx_IntrHandler IntrVideoHandler; /**< Callback function for valid
video interrupts. */
void *IntrVideoCallbackRef; /**< A pointer to the user data
passed to the valid
video callback
function. */
} XDprx;
/**************************** Function Prototypes *****************************/
@ -156,5 +162,7 @@ void XDptx_SetIntrVBlankHandler(XDptx *InstancePtr,
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
void XDptx_SetIntrTrainingLostHandler(XDptx *InstancePtr,
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
void XDptx_SetIntrVideoHandler(XDptx *InstancePtr,
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
#endif /* XDPRX_H_ */

View file

@ -187,3 +187,30 @@ void XDptx_SetIntrTrainingLostHandler(XDptx *InstancePtr,
InstancePtr->IntrTrainingLostHandler = CallbackFunc;
InstancePtr->IntrTrainingLostCallbackRef = CallbackRef;
}
/******************************************************************************/
/**
* This function installs a callback function for when a valid video interrupt
* occurs.
*
* @param InstancePtr is a pointer to the XDprx instance.
* @param CallbackFunc is the address to the callback function.
* @param CallbackRef is the user data item that will be passed to the
* callback function when it is invoked.
*
* @return None.
*
* @note None.
*
*******************************************************************************/
void XDptx_SetIntrVideoHandler(XDptx *InstancePtr,
XDprx_IntrHandler CallbackFunc, void *CallbackRef)
{
/* Verify arguments. */
Xil_AssertVoid(InstancePtr != NULL);
Xil_AssertVoid(CallbackFunc != NULL);
Xil_AssertVoid(CallbackRef != NULL);
InstancePtr->IntrVideoHandler = CallbackFunc;
InstancePtr->IntrVideoCallbackRef = CallbackRef;
}