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