diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdprx.h b/XilinxProcessorIPLib/drivers/dp/src/xdprx.h index b2178b0a..40149ecd 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdprx.h +++ b/XilinxProcessorIPLib/drivers/dp/src/xdprx.h @@ -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_ */ diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdprx_intr.c b/XilinxProcessorIPLib/drivers/dp/src/xdprx_intr.c index c0332afa..70fb3089 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdprx_intr.c +++ b/XilinxProcessorIPLib/drivers/dp/src/xdprx_intr.c @@ -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; +}