19.8.5.2.1 Code

Copy-paste the following code to your user application:
spi_select_slave(&spi_master_instance, &slave, true);

dma_start_transfer_job(&example_resource_rx);
dma_start_transfer_job(&example_resource_tx);

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

spi_select_slave(&spi_master_instance, &slave, false);

while (true) {
}