dp: rx: Added callback for training pattern interrupts.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
parent
1b613594e3
commit
de3fbb4466
2 changed files with 108 additions and 0 deletions
|
@ -145,6 +145,27 @@ typedef struct {
|
||||||
passed to the bandwidth
|
passed to the bandwidth
|
||||||
change callback
|
change callback
|
||||||
function. */
|
function. */
|
||||||
|
XDptx_IntrHandler IntrTp1Handler; /**< Callback function for
|
||||||
|
training pattern 1
|
||||||
|
interrupts. */
|
||||||
|
void *IntrTp1CallbackRef; /**< A pointer to the user data
|
||||||
|
passed to the training
|
||||||
|
pattern 1 callback
|
||||||
|
function. */
|
||||||
|
XDptx_IntrHandler IntrTp2Handler; /**< Callback function for
|
||||||
|
training pattern 2
|
||||||
|
interrupts. */
|
||||||
|
void *IntrTp2CallbackRef; /**< A pointer to the user data
|
||||||
|
passed to the training
|
||||||
|
pattern 2 callback
|
||||||
|
function. */
|
||||||
|
XDptx_IntrHandler IntrTp3Handler; /**< Callback function for
|
||||||
|
training pattern 3
|
||||||
|
interrupts. */
|
||||||
|
void *IntrTp3CallbackRef; /**< A pointer to the user data
|
||||||
|
passed to the training
|
||||||
|
pattern 3 callback
|
||||||
|
function. */
|
||||||
} XDprx;
|
} XDprx;
|
||||||
|
|
||||||
/**************************** Function Prototypes *****************************/
|
/**************************** Function Prototypes *****************************/
|
||||||
|
@ -182,5 +203,11 @@ void XDptx_SetIntrTrainingDoneHandler(XDptx *InstancePtr,
|
||||||
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
||||||
void XDptx_SetIntrBwChangeHandler(XDptx *InstancePtr,
|
void XDptx_SetIntrBwChangeHandler(XDptx *InstancePtr,
|
||||||
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
||||||
|
void XDptx_SetIntrTp1Handler(XDptx *InstancePtr,
|
||||||
|
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
||||||
|
void XDptx_SetIntrTp2Handler(XDptx *InstancePtr,
|
||||||
|
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
||||||
|
void XDptx_SetIntrTp3Handler(XDptx *InstancePtr,
|
||||||
|
XDprx_IntrHandler CallbackFunc, void *CallbackRef);
|
||||||
|
|
||||||
#endif /* XDPRX_H_ */
|
#endif /* XDPRX_H_ */
|
||||||
|
|
|
@ -268,3 +268,84 @@ void XDptx_SetIntrBwChangeHandler(XDptx *InstancePtr,
|
||||||
InstancePtr->IntrBwChangeHandler = CallbackFunc;
|
InstancePtr->IntrBwChangeHandler = CallbackFunc;
|
||||||
InstancePtr->IntrBwChangeCallbackRef = CallbackRef;
|
InstancePtr->IntrBwChangeCallbackRef = CallbackRef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* This function installs a callback function for when a training pattern 1
|
||||||
|
* 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_SetIntrTp1Handler(XDptx *InstancePtr,
|
||||||
|
XDprx_IntrHandler CallbackFunc, void *CallbackRef)
|
||||||
|
{
|
||||||
|
/* Verify arguments. */
|
||||||
|
Xil_AssertVoid(InstancePtr != NULL);
|
||||||
|
Xil_AssertVoid(CallbackFunc != NULL);
|
||||||
|
Xil_AssertVoid(CallbackRef != NULL);
|
||||||
|
|
||||||
|
InstancePtr->IntrTp1Handler = CallbackFunc;
|
||||||
|
InstancePtr->IntrTp1CallbackRef = CallbackRef;
|
||||||
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* This function installs a callback function for when a training pattern 2
|
||||||
|
* 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_SetIntrTp2Handler(XDptx *InstancePtr,
|
||||||
|
XDprx_IntrHandler CallbackFunc, void *CallbackRef)
|
||||||
|
{
|
||||||
|
/* Verify arguments. */
|
||||||
|
Xil_AssertVoid(InstancePtr != NULL);
|
||||||
|
Xil_AssertVoid(CallbackFunc != NULL);
|
||||||
|
Xil_AssertVoid(CallbackRef != NULL);
|
||||||
|
|
||||||
|
InstancePtr->IntrTp2Handler = CallbackFunc;
|
||||||
|
InstancePtr->IntrTp2CallbackRef = CallbackRef;
|
||||||
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* This function installs a callback function for when a training pattern 3
|
||||||
|
* 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_SetIntrTp3Handler(XDptx *InstancePtr,
|
||||||
|
XDprx_IntrHandler CallbackFunc, void *CallbackRef)
|
||||||
|
{
|
||||||
|
/* Verify arguments. */
|
||||||
|
Xil_AssertVoid(InstancePtr != NULL);
|
||||||
|
Xil_AssertVoid(CallbackFunc != NULL);
|
||||||
|
Xil_AssertVoid(CallbackRef != NULL);
|
||||||
|
|
||||||
|
InstancePtr->IntrTp3Handler = CallbackFunc;
|
||||||
|
InstancePtr->IntrTp3CallbackRef = CallbackRef;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue