Jump to main content

##

# 2.31.29 DMA_CHANNEL_CALLBACK Typedef

## C

    typedef void (*DMA_CHANNEL_CALLBACK) (DMA_TRANSFER_EVENT event, uintptr_t contextHandle);

## Summary

Pointer to a DMA Transfer Event handler function.

## Description

This data type defines a DMA Transfer Event Handler Function. A DMA PLIB client must register a transfer event handler function of this type to receive transfer related events from the PLIB.

If the event is DMA_TRANSFER_EVENT_BLOCK_TRANSFER_COMPLETE, this means that the data was transferred successfully.

If the event is DMA_TRANSFER_EVENT_ERROR, this means that the data was not transferred successfully.

The other events passed are:

DMA_TRANSFER_EVENT_START_DETECTED DMA_TRANSFER_EVENT_TRANSFER_ABORTED DMA_TRANSFER_EVENT_CELL_TRANSFER_COMPLETE DMA_TRANSFER_EVENT_HALF_BLOCK_TRANSFER_COMPLETE DMA_TRANSFER_EVENT_LINKED_LIST_TRANSFER_COMPLETE

The contextHandle parameter contains the context handle that was provided by the client at the time of registering the event handler. This context handle can be anything that the client considers helpful or necessary to identify the client context associated with the DMA channel that generated the event.

The event handler function executes in an interrupt context of DMA. It is recommended to the application not to perform process intensive operations with in this function.

## Remarks

None.