From 2a79d28de637589287787dc45b5b3bc99006972b Mon Sep 17 00:00:00 2001 From: Andrei-Liviu Simion Date: Fri, 16 Jan 2015 14:22:35 -0800 Subject: [PATCH] dp: rx: Added callback for no video interrupts. Signed-off-by: Andrei-Liviu Simion --- XilinxProcessorIPLib/drivers/dp/src/xdprx.h | 7 +++++ .../drivers/dp/src/xdprx_intr.c | 27 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/XilinxProcessorIPLib/drivers/dp/src/xdprx.h b/XilinxProcessorIPLib/drivers/dp/src/xdprx.h index baadee40..6adcff6a 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdprx.h +++ b/XilinxProcessorIPLib/drivers/dp/src/xdprx.h @@ -106,6 +106,11 @@ typedef struct { passed to the power state change callback function. */ + XDptx_IntrHandler IntrNoVideoHandler; /**< Callback function for + no video interrupts. */ + void *IntrNoVideoCallbackRef; /**< A pointer to the user data + passed to the no video + callback function. */ } XDprx; /**************************** Function Prototypes *****************************/ @@ -131,5 +136,7 @@ void XDptx_SetIntrVmChangeHandler(XDptx *InstancePtr, XDprx_IntrHandler CallbackFunc, void *CallbackRef); void XDptx_SetIntrPowerStateHandler(XDptx *InstancePtr, XDprx_IntrHandler CallbackFunc, void *CallbackRef); +void XDptx_SetIntrNoVideoHandler(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 2c14a42a..8b8a62df 100644 --- a/XilinxProcessorIPLib/drivers/dp/src/xdprx_intr.c +++ b/XilinxProcessorIPLib/drivers/dp/src/xdprx_intr.c @@ -106,3 +106,30 @@ void XDptx_SetIntrPowerStateHandler(XDptx *InstancePtr, InstancePtr->IntrPowerStateHandler = CallbackFunc; InstancePtr->IntrPowerStateCallbackRef = CallbackRef; } + +/******************************************************************************/ +/** + * This function installs a callback function for when a no 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_SetIntrNoVideoHandler(XDptx *InstancePtr, + XDprx_IntrHandler CallbackFunc, void *CallbackRef) +{ + /* Verify arguments. */ + Xil_AssertVoid(InstancePtr != NULL); + Xil_AssertVoid(CallbackFunc != NULL); + Xil_AssertVoid(CallbackRef != NULL); + + InstancePtr->IntrNoVideoHandler = CallbackFunc; + InstancePtr->IntrNoVideoCallbackRef = CallbackRef; +}