dp: rx: Added callback for training done interrupts.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
parent
134b32d770
commit
26829905a9
2 changed files with 36 additions and 0 deletions
|
@ -131,6 +131,13 @@ typedef struct {
|
|||
passed to the valid
|
||||
video callback
|
||||
function. */
|
||||
XDptx_IntrHandler IntrTrainingDoneHandler; /**< Callback function for
|
||||
training done
|
||||
interrupts. */
|
||||
void *IntrTrainingDoneCallbackRef; /**< A pointer to the user data
|
||||
passed to the training
|
||||
done callback
|
||||
function. */
|
||||
} XDprx;
|
||||
|
||||
/**************************** Function Prototypes *****************************/
|
||||
|
@ -164,5 +171,7 @@ void XDptx_SetIntrTrainingLostHandler(XDptx *InstancePtr,
|
|||
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
||||
void XDptx_SetIntrVideoHandler(XDptx *InstancePtr,
|
||||
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
||||
void XDptx_SetIntrTrainingDoneHandler(XDptx *InstancePtr,
|
||||
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
||||
|
||||
#endif /* XDPRX_H_ */
|
||||
|
|
|
@ -214,3 +214,30 @@ void XDptx_SetIntrVideoHandler(XDptx *InstancePtr,
|
|||
InstancePtr->IntrVideoHandler = CallbackFunc;
|
||||
InstancePtr->IntrVideoCallbackRef = CallbackRef;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
/**
|
||||
* This function installs a callback function for when a training done 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_SetIntrTrainingDoneHandler(XDptx *InstancePtr,
|
||||
XDprx_IntrHandler CallbackFunc, void *CallbackRef)
|
||||
{
|
||||
/* Verify arguments. */
|
||||
Xil_AssertVoid(InstancePtr != NULL);
|
||||
Xil_AssertVoid(CallbackFunc != NULL);
|
||||
Xil_AssertVoid(CallbackRef != NULL);
|
||||
|
||||
InstancePtr->IntrTrainingDoneHandler = CallbackFunc;
|
||||
InstancePtr->IntrTrainingDoneCallbackRef = CallbackRef;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue