1.2.5.58 ADP_BUFFER_IND_CALLBACK Typedef

C

typedef void (*ADP_BUFFER_IND_CALLBACK)(ADP_BUFFER_IND_PARAMS* bufferInd);

Summary

Pointer to a Buffer Indication Event handler function.

Description

This data type defines the required function signature for the ADP Buffer Indication event handling callback function. The ADP Buffer Indication primitive is used to notify the upper layer when the availability of ADP buffers change. A client must register a pointer using the event handling function whose function signature (parameter and return value types) matches the types specified by this function pointer in order to receive Buffer Indication events back from module.

Parameters

ParamDescription
bufferIndPointer to bitmap providing availability of Tx buffers. See ADP_BUFFER_IND_PARAMS

Returns

None.

Example

App_BufferIndication(ADP_BUFFER_IND_PARAMS* bufferInd)
{
    if (bufferInd->largeBuffersAvailable == 1)
    {
        // Large buffer(s) available for Tx
    }

    if (bufferInd->mediumBuffersAvailable == 1)
    {
        // Medium buffer(s) available for Tx
    }

    if (bufferInd->smallBuffersAvailable == 1)
    {
        // Small buffer(s) available for Tx
    }
}

Remarks

This function is invoked whenever the availability status of any kind of buffer changes.