This routine installs an asynchronous callback function for the given HandlerType.
Prototype
s32 XMailbox_SetCallBack(XMailbox *InstancePtr, XMailbox_Handler HandlerType, void *CallBackFuncPtr, void *CallBackRefPtr);
Parameters
The following table lists the XMailbox_SetCallBack
function arguments.
Type | Name | Description |
---|---|---|
XMailbox
* |
InstancePtr |
is a pointer to the
XMailbox
instance.
|
XMailbox_Handler
|
HandlerType | specifies which callback is to be attached. |
void * | CallBackFuncPtr | is the address of the callback function. |
void * | CallBackRefPtr | is a user data item that will be passed to the callback function when it is invoked. |
Returns
- XST_SUCCESS when handler is installed.
- XST_FAILURE when HandlerType is invalid.