dp: rx: Added callback for training lost interrupts.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
parent
fba443ffde
commit
937ccc287c
2 changed files with 37 additions and 1 deletions
|
@ -113,11 +113,18 @@ typedef struct {
|
|||
callback function. */
|
||||
XDptx_IntrHandler IntrVBlankHandler; /**< Callback function for
|
||||
vertical blanking
|
||||
interrupts. */
|
||||
interrupts. */
|
||||
void *IntrVBlankCallbackRef; /**< A pointer to the user data
|
||||
passed to the vertical
|
||||
blanking callback
|
||||
function. */
|
||||
XDptx_IntrHandler IntrTrainingLostHandler; /**< Callback function for
|
||||
training lost
|
||||
interrupts. */
|
||||
void *IntrTrainingLostCallbackRef; /**< A pointer to the user data
|
||||
passed to the training
|
||||
lost callback
|
||||
function. */
|
||||
} XDprx;
|
||||
|
||||
/**************************** Function Prototypes *****************************/
|
||||
|
@ -147,5 +154,7 @@ void XDptx_SetIntrNoVideoHandler(XDptx *InstancePtr,
|
|||
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
||||
void XDptx_SetIntrVBlankHandler(XDptx *InstancePtr,
|
||||
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
||||
void XDptx_SetIntrTrainingLostHandler(XDptx *InstancePtr,
|
||||
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
||||
|
||||
#endif /* XDPRX_H_ */
|
||||
|
|
|
@ -160,3 +160,30 @@ void XDptx_SetIntrVBlankHandler(XDptx *InstancePtr,
|
|||
InstancePtr->IntrVBlankHandler = CallbackFunc;
|
||||
InstancePtr->IntrVBlankCallbackRef = CallbackRef;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/**
|
||||
* This function installs a callback function for when a training lost 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_SetIntrTrainingLostHandler(XDptx *InstancePtr,
|
||||
XDprx_IntrHandler CallbackFunc, void *CallbackRef)
|
||||
{
|
||||
/* Verify arguments. */
|
||||
Xil_AssertVoid(InstancePtr != NULL);
|
||||
Xil_AssertVoid(CallbackFunc != NULL);
|
||||
Xil_AssertVoid(CallbackRef != NULL);
|
||||
|
||||
InstancePtr->IntrTrainingLostHandler = CallbackFunc;
|
||||
InstancePtr->IntrTrainingLostCallbackRef = CallbackRef;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue