Executing a transfer

Finally, once the transfer descriptor has been correctly configured and compiled, use the dma_xfer_list() function to perform the transfer:

int dma_xfer_list(unsigned int chan, struct stm_dma_params *p);
Parameters Description
chan The channel number, previously allocated using request_dma().
p The compiled transfer descriptor.
When the channel is no longer needed, it is important to free the channel so that it becomes available to other devices. (See Transfer cleanup and deinitialize.)

Recompiling and re-executing a transfer

A transfer that has already been executed can be re-executed on the same channel if there are no changes to the parameters. A transfer can also be re-executed if there is a change of parameters, but in this case the transfer descritor must be recompiled first. Recompilation in this case simply inserts the new parameters directly into the existing node list.

Changing any of the mode parameters given in the dma_declare_params() function, requires a call to dma_free_descriptor() on each of the descriptors before any subsequent call to dma_params_init().