1.1.4.4.20 DRV_RF215_RX_IND_CALLBACK Typedef
C
typedef void ( *DRV_RF215_RX_IND_CALLBACK ) ( DRV_RF215_RX_INDICATION_OBJ *indObj, uintptr_t context );
Summary
Pointer to a RF215 driver receive indication callback function.
Description
This data type defines the required function signature for the RF215 driver receive event handling callback function. A client uses DRV_RF215_RxIndCallbackRegister to register a pointer to a function which must match the signature (parameter and return value types) specified by this data type.
Parameters
Param | Description |
---|---|
indObj | Pointer to the object containing the data associated to the receive indication (see DRV_RF215_RX_INDICATION_OBJ). |
context | Value identifying the context of the client that registered the callback function. |
Returns
None.
Example
static void APP_RxIndCb(DRV_RF215_RX_INDICATION_OBJ* indObj, uintptr_t ctxt)
{
// The context handle was set to an application specific object
// It is now retrievable easily in the event handler
MY_APP_OBJ myAppObj = (MY_APP_OBJ *) ctxt;
// Reception handling here.
}
DRV_HANDLE drvRf215Handle; // Returned from DRV_RF215_Open
MY_APP_OBJ myAppObj; // Application specific data object
DRV_RF215_RxIndCallbackRegister(drvRf215Handle, APP_RxIndCb,
(uintptr_t) myAppObj);
Remarks
The context parameter contains a handle to the client context, provided at the time the callback function was registered using DRV_RF215_RxIndCallbackRegister. This context value is passed back to the client as parameter. It can be any value necessary to identify the client context or instance (such as a pointer to the client's data) of the client that registered the callback.