7.8.1.2.1 Code

Add the following code at the start of main():
struct dma_resource example_resource;
Copy the following code to your user application:
dma_start_transfer_job(&example_resource);

dma_trigger_transfer(&example_resource);

while (!transfer_is_done) {
    /* Wait for transfer done */
}

while (true) {
    /* Nothing to do */
}