dp: rx: Added callback for vertical blanking interrupts.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
parent
2a79d28de6
commit
fba443ffde
2 changed files with 36 additions and 0 deletions
|
@ -111,6 +111,13 @@ typedef struct {
|
||||||
void *IntrNoVideoCallbackRef; /**< A pointer to the user data
|
void *IntrNoVideoCallbackRef; /**< A pointer to the user data
|
||||||
passed to the no video
|
passed to the no video
|
||||||
callback function. */
|
callback function. */
|
||||||
|
XDptx_IntrHandler IntrVBlankHandler; /**< Callback function for
|
||||||
|
vertical blanking
|
||||||
|
interrupts. */
|
||||||
|
void *IntrVBlankCallbackRef; /**< A pointer to the user data
|
||||||
|
passed to the vertical
|
||||||
|
blanking callback
|
||||||
|
function. */
|
||||||
} XDprx;
|
} XDprx;
|
||||||
|
|
||||||
/**************************** Function Prototypes *****************************/
|
/**************************** Function Prototypes *****************************/
|
||||||
|
@ -138,5 +145,7 @@ void XDptx_SetIntrPowerStateHandler(XDptx *InstancePtr,
|
||||||
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
||||||
void XDptx_SetIntrNoVideoHandler(XDptx *InstancePtr,
|
void XDptx_SetIntrNoVideoHandler(XDptx *InstancePtr,
|
||||||
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
||||||
|
void XDptx_SetIntrVBlankHandler(XDptx *InstancePtr,
|
||||||
|
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
||||||
|
|
||||||
#endif /* XDPRX_H_ */
|
#endif /* XDPRX_H_ */
|
||||||
|
|
|
@ -133,3 +133,30 @@ void XDptx_SetIntrNoVideoHandler(XDptx *InstancePtr,
|
||||||
InstancePtr->IntrNoVideoHandler = CallbackFunc;
|
InstancePtr->IntrNoVideoHandler = CallbackFunc;
|
||||||
InstancePtr->IntrNoVideoCallbackRef = CallbackRef;
|
InstancePtr->IntrNoVideoCallbackRef = CallbackRef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* This function installs a callback function for when a vertical blanking
|
||||||
|
* 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_SetIntrVBlankHandler(XDptx *InstancePtr,
|
||||||
|
XDprx_IntrHandler CallbackFunc, void *CallbackRef)
|
||||||
|
{
|
||||||
|
/* Verify arguments. */
|
||||||
|
Xil_AssertVoid(InstancePtr != NULL);
|
||||||
|
Xil_AssertVoid(CallbackFunc != NULL);
|
||||||
|
Xil_AssertVoid(CallbackRef != NULL);
|
||||||
|
|
||||||
|
InstancePtr->IntrVBlankHandler = CallbackFunc;
|
||||||
|
InstancePtr->IntrVBlankCallbackRef = CallbackRef;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue