7.6.4.2 Function dma_add_descriptor()

Add a DMA transfer descriptor to a DMA resource.

enum status_code dma_add_descriptor( struct dma_resource * resource, DmacDescriptor * descriptor)

This function will add a DMA transfer descriptor to a DMA resource. If there was a transfer descriptor already allocated to the DMA resource, the descriptor will be linked to the next descriptor address.

Table 7-6. Parameters
Data directionParameter nameDescription

[in]

resource

Pointer to the DMA resource

[in]

descriptor

Pointer to the transfer descriptor

Table 7-7. Return Values
Return valueDescription

STATUS_OK

The descriptor is added to the DMA resource

STATUS_BUSY

The DMA resource was busy and the descriptor is not added